mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-14 15:37:55 +00:00
Bug 899296 - Restore bytecode-level constant folding in lazily compiled functions. r=jorendorff.
This commit is contained in:
parent
11a385b278
commit
fe1fc8267b
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user