[INFER] Check for heavyweight functions when deciding to inline, bug 645645.

This commit is contained in:
Brian Hackett 2011-03-29 06:39:09 -07:00
parent 20901cf7b7
commit aa6b5e0e2f
2 changed files with 5 additions and 0 deletions

View File

@ -0,0 +1,4 @@
function f() {
f = Math.x;
}
f();

View File

@ -309,6 +309,7 @@ Script::analyze(JSContext *cx, JSScript *script)
isInlineable = true;
if (script->nClosedArgs || script->nClosedVars ||
(script->fun && script->fun->isHeavyweight()) ||
script->usesEval || script->usesArguments || cx->compartment->debugMode) {
isInlineable = false;
}