Skip to content
Snippets Groups Projects
Commit 3510de64 authored by Nicolas B. Pierron's avatar Nicolas B. Pierron
Browse files

Bug 1760334 - Add FakeStencilGlobalScope for parsing inner module functions. r=arai

When delazifying inner module functions on-demand, the JSObject global is
defined as the enclosing scope. This scope is set by the
`CompilationStencil::instantiateStencilAfterPreparation`, as it is shared
between all instantiated modules.

The problem is that the Global scope is not explicit in the Stencil. Thus, when
doing a concurrent delazification from a Stencil, the global scope is not listed
as the enclosing scope of the module.

This patch, hacks the InputScope to work-around the lack of enclosing scope of
Modules, to artificially add a fake-GlobalScope, which is later used by other
functions, such as `ScopeContext::seachInEnclosingScope` to resolve named values
such as `undefined`.

Differential Revision: https://phabricator.services.mozilla.com/D141512
parent 09c3ebe5
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment