mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-31 17:18:57 +00:00
@@ -950,14 +950,8 @@ Parser<FullParseHandler>::checkFunctionArguments()
|
||||
FunctionBox* funbox = pc->sc->asFunctionBox();
|
||||
funbox->setArgumentsHasLocalBinding();
|
||||
|
||||
/*
|
||||
* If a script has both explicit mentions of 'arguments' and dynamic
|
||||
* name lookups which could access the arguments, an arguments object
|
||||
* must be created eagerly. The SSA analysis used for lazy arguments
|
||||
* cannot cope with dynamic name accesses, so any 'arguments' accessed
|
||||
* via a NAME opcode must force construction of the arguments object.
|
||||
*/
|
||||
if (pc->sc->bindingsAccessedDynamically() && maybeArgDef)
|
||||
/* Dynamic scope access destroys all hope of optimization. */
|
||||
if (pc->sc->bindingsAccessedDynamically())
|
||||
funbox->setDefinitelyNeedsArgsObj();
|
||||
|
||||
/*
|
||||
@@ -985,9 +979,6 @@ Parser<FullParseHandler>::checkFunctionArguments()
|
||||
funbox->setDefinitelyNeedsArgsObj();
|
||||
}
|
||||
}
|
||||
/* Watch for mutation of arguments through e.g. eval(). */
|
||||
if (pc->sc->bindingsAccessedDynamically())
|
||||
funbox->setDefinitelyNeedsArgsObj();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user