Backout 44465ef545e3 (Bug 786126) - Are we fast yet regression.
authorNicolas B. Pierron <npierron@mozilla.com>
Fri, 28 Sep 2012 22:58:10 -0700
changeset 108715 59665618b6c99e30e014fa5181fc73b6b008c2e3
parent 108714 68c4c30ff6f0a8ad3cd37a24dd3db452c24d9f3b
child 108716 963b6aadad7c20b9c5c50791bb79189a8bd07d4a
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
bugs786126
milestone18.0a1
backs out44465ef545e3f46c59939a742acfdbb9558c8e03
Backout 44465ef545e3 (Bug 786126) - Are we fast yet regression.
js/src/ion/IonBuilder.cpp
js/src/jsinfer.h
--- a/js/src/ion/IonBuilder.cpp
+++ b/js/src/ion/IonBuilder.cpp
@@ -5909,34 +5909,17 @@ IonBuilder::jsop_getprop(HandlePropertyN
 
         MPassArg *wrapper = MPassArg::New(obj);
         current->push(wrapper);
         current->add(wrapper);
 
         return makeCallBarrier(getter, 0, false, types, barrier);
     }
 
-    // If the input is guaranteed to be an object, then we want
-    // to specialize it via an slot load or an IC.  If it's
-    // guaranteed to be an object or NULL, then we do the same
-    // thing except prefixed by a fallible unbox.
-    bool targetIsObject = (unary.ival == MIRType_Object);
-
-    if (!targetIsObject) {
-        if (unaryTypes.inTypes->objectOrSentinel()) {
-            // Fallibly unwrap the object before getprop.  Getprop
-            // on null or undefined will cause exception anyway.
-            MUnbox *unbox = MUnbox::New(obj, MIRType_Object, MUnbox::Fallible);
-            current->add(unbox);
-            obj = unbox;
-            targetIsObject = true;
-        }
-    }
-
-    if (targetIsObject) {
+    if (unary.ival == MIRType_Object) {
         MIRType rvalType = MIRType_Value;
         if (!barrier && !IsNullOrUndefined(unary.rval))
             rvalType = unary.rval;
 
         Shape *objShape;
         if ((objShape = mjit::GetPICSingleShape(cx, script_, pc, info().constructing())) &&
             !objShape->inDictionary())
         {
--- a/js/src/jsinfer.h
+++ b/js/src/jsinfer.h
@@ -566,29 +566,16 @@ class StackTypeSet : public TypeSet
     /* Get any type tag which all values in this set must have. */
     JSValueType getKnownTypeTag();
 
     bool isMagicArguments() { return getKnownTypeTag() == JSVAL_TYPE_MAGIC; }
 
     /* Whether this value may be an object. */
     bool maybeObject() { return unknownObject() || baseObjectCount() > 0; }
 
-    /*
-     * Whether this typeset represents a potentially sentineled object value:
-     * where the value may be an object, but maybe potentially null or undefined.
-     * This returns false in situations where the value cannot ever be an object.
-     */
-    bool objectOrSentinel() {
-        TypeFlags flags = TYPE_FLAG_UNDEFINED | TYPE_FLAG_NULL | TYPE_FLAG_ANYOBJECT;
-        if (baseFlags() & (~flags & TYPE_FLAG_BASE_MASK))
-            return false;
-
-        return hasAnyFlag(TYPE_FLAG_ANYOBJECT) || baseObjectCount() > 0;
-    }
-
     /* Whether the type set contains objects with any of a set of flags. */
     bool hasObjectFlags(JSContext *cx, TypeObjectFlags flags);
 
     /*
      * Get the typed array type of all objects in this set. Returns
      * TypedArray::TYPE_MAX if the set contains different array types.
      */
     int getTypedArrayType();