Commit d8bc3758 authored by verwaest's avatar verwaest Committed by Commit bot

Force eager compilation on closure scopes only

In theory the flag could otherwise be set on a blockscope that might be finalized (removed) before PropagateScopeInfo can propagate the flag around. In that case we'd lose the flag.

BUG=v8:5209

Review-Url: https://codereview.chromium.org/2267683002
Cr-Commit-Position: refs/heads/master@{#38781}
parent e77802f6
......@@ -2018,8 +2018,7 @@ Statement* Parser::ParseNativeDeclaration(bool* ok) {
// isn't lazily compiled. The extension structures are only
// accessible while parsing the first time not when reparsing
// because of lazy compilation.
// TODO(adamk): Should this be GetClosureScope()?
GetDeclarationScope()->ForceEagerCompilation();
GetClosureScope()->ForceEagerCompilation();
// TODO(1240846): It's weird that native function declarations are
// introduced dynamically when we meet their declarations, whereas
......@@ -5020,7 +5019,7 @@ Expression* Parser::ParseV8Intrinsic(bool* ok) {
if (extension_ != NULL) {
// The extension structures are only accessible while parsing the
// very first time not when reparsing because of lazy compilation.
GetDeclarationScope()->ForceEagerCompilation();
GetClosureScope()->ForceEagerCompilation();
}
const Runtime::Function* function = Runtime::FunctionForName(name->string());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment