Bug 1567579 - Store inner FunctionBoxes instead of inner functions r=tcampbell

This is a good preparation fo deferred function allocation (Bug 1569315),
but also removes some awkward rooting / type issues in deferred lazyscript
allocation

Differential Revision: https://phabricator.services.mozilla.com/D39745
This commit is contained in:
Matthew Gaudet
2019-07-31 19:27:57 +00:00
parent 2b0501c598
commit b711ad8e20
6 changed files with 31 additions and 30 deletions

View File

@@ -391,9 +391,10 @@ JS::Result<Ok> BinASTParserPerTokenizer<Tok>::finishLazyFunction(
BINJS_TRY_DECL(lazy, LazyScript::Create(cx_, fun, sourceObject_,
pc_->closedOverBindingsForLazy(),
pc_->innerFunctionsForLazy, start,
end, start, end, /* lineno = */ 0,
start, ParseGoal::Script));
pc_->innerFunctionBoxesForLazy,
start, end, start, end,
/* lineno = */ 0, start,
ParseGoal::Script));
if (funbox->strict()) {
lazy->setStrict();