Bug 1142843 - Optimize accesses through prototypes with typed object receivers in baseline and ion, r=jandem.

This commit is contained in:
Brian Hackett
2015-03-28 17:03:45 -07:00
parent c6596c5fa8
commit a6ac744c4d
7 changed files with 118 additions and 102 deletions

View File

@@ -2936,16 +2936,20 @@ js::LookupPropertyPure(ExclusiveContext* cx, JSObject* obj, jsid id, JSObject**
break;
return false;
} while (0);
} else {
// Search for a property on an unboxed object. Other non-native objects
// are not handled here.
if (!obj->is<UnboxedPlainObject>())
return false;
} else if (obj->is<UnboxedPlainObject>()) {
if (obj->as<UnboxedPlainObject>().containsUnboxedOrExpandoProperty(cx, id)) {
*objp = obj;
MarkNonNativePropertyFound<NoGC>(propp);
return true;
}
} else if (obj->is<TypedObject>()) {
if (obj->as<TypedObject>().typeDescr().hasProperty(cx->names(), id)) {
*objp = obj;
MarkNonNativePropertyFound<NoGC>(propp);
return true;
}
} else {
return false;
}
obj = obj->getProto();