Bug 899296 - Restore bytecode-level constant folding in lazily compiled functions. r=jorendorff.

This commit is contained in:
Boris Zbarsky 2013-09-12 11:08:21 -05:00
parent 11a385b278
commit fe1fc8267b

View File

@ -2249,7 +2249,6 @@ Parser<FullParseHandler>::standaloneLazyFunction(HandleFunction fun, unsigned st
return null();
}
if (fun->isNamedLambda()) {
if (AtomDefnPtr p = pc->lexdeps->lookup(fun->name())) {
Definition *dn = p.value().get<FullParseHandler>();
@ -2263,6 +2262,9 @@ Parser<FullParseHandler>::standaloneLazyFunction(HandleFunction fun, unsigned st
if (!pc->generateFunctionBindings(context, alloc, bindings))
return null();
if (!FoldConstants(context, &pn, this))
return null();
return pn;
}