Bug 870814 - IonMonkey: Enable native dense int32 when cache isn't monitored, r=jandem
authorHannes Verschore <hv1989@gmail.com>
Tue, 14 May 2013 23:19:04 +0200
changeset 131935 bf0bcf4ecf28b0a935478f25be28c1757efd4881
parent 131934 975667697d0b6a9997daace037f480e3a626d8c1
child 131936 b880a068345e6fc2ec6255a9d1199e33a365a065
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersjandem
bugs870814
milestone24.0a1
Bug 870814 - IonMonkey: Enable native dense int32 when cache isn't monitored, r=jandem
js/src/ion/IonCaches.cpp
--- a/js/src/ion/IonCaches.cpp
+++ b/js/src/ion/IonCaches.cpp
@@ -2381,29 +2381,32 @@ GetElementIC::update(JSContext *cx, size
             !cache.index().constant() &&
             (cache.index().reg().hasValue() ||
              cache.index().reg().type() == MIRType_Int32) &&
             (cache.output().hasValue() || !cache.output().typedReg().isFloat()))
         {
             if (!cache.attachArgumentsElement(cx, ion, obj))
                 return false;
             attachedStub = true;
-        } else if (obj->isNative() && cache.monitoredResult()) {
+        }
+        if (!attachedStub && obj->isNative() && cache.monitoredResult()) {
             uint32_t dummy;
             if (idval.isString() && JSID_IS_ATOM(id) && !JSID_TO_ATOM(id)->isIndex(&dummy)) {
                 RootedPropertyName name(cx, JSID_TO_ATOM(id)->asPropertyName());
                 if (!cache.attachGetProp(cx, ion, obj, idval, name))
                     return false;
                 attachedStub = true;
             }
-        } else if (!cache.hasDenseStub() && obj->isNative() && idval.isInt32()) {
+        }
+        if (!attachedStub && !cache.hasDenseStub() && obj->isNative() && idval.isInt32()) {
             if (!cache.attachDenseElement(cx, ion, obj, idval))
                 return false;
             attachedStub = true;
-        } else if (obj->isTypedArray()) {
+        }
+        if (!attachedStub && obj->isTypedArray()) {
             if ((idval.isInt32()) ||
                 (idval.isString() && GetIndexFromString(idval.toString()) != UINT32_MAX))
             {
                 int arrayType = TypedArray::type(obj);
                 bool floatOutput = arrayType == TypedArray::TYPE_FLOAT32 ||
                                    arrayType == TypedArray::TYPE_FLOAT64;
                 if (!floatOutput || cache.output().hasValue()) {
                     if (!cache.attachTypedArrayElement(cx, ion, obj, idval))