Fully deserialize the scope chain after parsing, not before
To avoid a dependency on the heap during parsing, we only create a scope chain without linking to the associated ScopeInfo objects before parsing. This is enough to avoid special cases during parsing of arrow functions / eval. Looking at the outer scope's variables during parsing was only needed for hosting sloppy block functions inside eval. To be able to do this now, we hoist for the outer-most eval scope after parsing, in DeclarationScope::Analyze. DeclarationScope::Analyze is also where we replace the outer scope chain with the fully deserialized version, so variables can be resolved. Also, this unifies background and foreground thread parsing, as we don't have to worry about ScopeInfos getting accessed before we're back on the main thread. BUG=v8:5215 R=verwaest@chromium.org,marja@chromium.org,adamk@chromium.org Review-Url: https://codereview.chromium.org/2306413002 Cr-Commit-Position: refs/heads/master@{#39452}
Showing
Please
register
or
sign in
to comment