Loading js/src/ion/IonBuilder.cpp +1 −18 Original line number Diff line number Diff line Loading @@ -5914,24 +5914,7 @@ IonBuilder::jsop_getprop(HandlePropertyName name) 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; Loading js/src/jsinfer.h +0 −13 Original line number Diff line number Diff line Loading @@ -571,19 +571,6 @@ class StackTypeSet : public TypeSet /* 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); Loading Loading
js/src/ion/IonBuilder.cpp +1 −18 Original line number Diff line number Diff line Loading @@ -5914,24 +5914,7 @@ IonBuilder::jsop_getprop(HandlePropertyName name) 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; Loading
js/src/jsinfer.h +0 −13 Original line number Diff line number Diff line Loading @@ -571,19 +571,6 @@ class StackTypeSet : public TypeSet /* 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); Loading