Backout 44465ef545e3 (Bug 786126) - Are we fast yet regression.

This commit is contained in:
Nicolas B. Pierron 2012-09-28 22:58:10 -07:00
parent d8f8957970
commit bb4f0d8eac
2 changed files with 1 additions and 31 deletions

View File

@ -5914,24 +5914,7 @@ IonBuilder::jsop_getprop(HandlePropertyName name)
return makeCallBarrier(getter, 0, false, types, barrier); return makeCallBarrier(getter, 0, false, types, barrier);
} }
// If the input is guaranteed to be an object, then we want if (unary.ival == MIRType_Object) {
// 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) {
MIRType rvalType = MIRType_Value; MIRType rvalType = MIRType_Value;
if (!barrier && !IsNullOrUndefined(unary.rval)) if (!barrier && !IsNullOrUndefined(unary.rval))
rvalType = unary.rval; rvalType = unary.rval;

View File

@ -571,19 +571,6 @@ class StackTypeSet : public TypeSet
/* Whether this value may be an object. */ /* Whether this value may be an object. */
bool maybeObject() { return unknownObject() || baseObjectCount() > 0; } 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. */ /* Whether the type set contains objects with any of a set of flags. */
bool hasObjectFlags(JSContext *cx, TypeObjectFlags flags); bool hasObjectFlags(JSContext *cx, TypeObjectFlags flags);