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 143426 bf0bcf4ecf28b0a935478f25be28c1757efd4881
parent 143425 975667697d0b6a9997daace037f480e3a626d8c1
child 143427 b880a068345e6fc2ec6255a9d1199e33a365a065
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs870814
milestone24.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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))