Tweak logic when analyzing properties of new scripts, bug 720380. r=dvander

This commit is contained in:
Brian Hackett 2012-02-06 11:18:33 -08:00
parent 41aa33e13d
commit fa9f5b52f5

View File

@ -4556,6 +4556,12 @@ AnalyzeNewScriptProperties(JSContext *cx, TypeObject *type, JSFunction *fun, JSO
if (op != JSOP_THIS)
continue;
/* Maintain ordering property on how 'this' is used, as described above. */
if (offset < lastThisPopped) {
*pbaseobj = NULL;
return false;
}
SSAValue thisv = SSAValue::PushedValue(offset, 0);
SSAUseChain *uses = analysis->useChain(thisv);
@ -4565,11 +4571,6 @@ AnalyzeNewScriptProperties(JSContext *cx, TypeObject *type, JSFunction *fun, JSO
return false;
}
/* Maintain ordering property on how 'this' is used, as described above. */
if (offset < lastThisPopped) {
*pbaseobj = NULL;
return false;
}
lastThisPopped = uses->offset;
/* Only handle 'this' values popped in unconditional code. */