-
- Downloads
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
Showing
- js/src/frontend/CompilationStencil.h 67 additions, 10 deletionsjs/src/frontend/CompilationStencil.h
- js/src/frontend/ScopeBindingCache.h 20 additions, 0 deletionsjs/src/frontend/ScopeBindingCache.h
- js/src/frontend/Stencil.cpp 59 additions, 0 deletionsjs/src/frontend/Stencil.cpp
- js/src/jit-test/tests/parser/stencil-eager-delazify-certviewer.js 35 additions, 0 deletions...it-test/tests/parser/stencil-eager-delazify-certviewer.js
Loading
Please register or sign in to comment