[INFER] Add object test when statically walking the prototype chain for CALLPROP, bug 645985.

This commit is contained in:
Brian Hackett 2011-03-29 15:57:38 -07:00
parent 1f1a4d216c
commit d7434b87f6
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,5 @@
function f(o) {
o += "";
o.hasOwnProperty("x");
}
f({});

View File

@ -4476,7 +4476,7 @@ mjit::Compiler::testSingletonPropertyTypes(FrameEntry *top, jsid id, bool *testO
case JSVAL_TYPE_OBJECT:
case JSVAL_TYPE_UNKNOWN:
if (types->objectCount == 1) {
if (types->objectCount == 1 && !top->isNotType(JSVAL_TYPE_OBJECT)) {
JS_ASSERT_IF(top->isTypeKnown(), top->isType(JSVAL_TYPE_OBJECT));
types::TypeObject *object = (types::TypeObject *) types->objectSet;
if (object->proto) {