 Chromium Code Reviews
 Chromium Code Reviews Issue 2398023002:
  [wasm] asm.js - Parse and convert asm.js to wasm a function at a time.  (Closed)
    
  
    Issue 2398023002:
  [wasm] asm.js - Parse and convert asm.js to wasm a function at a time.  (Closed) 
  | Index: src/ast/scopes.cc | 
| diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc | 
| index 4ce1c0d85f7970f0b1cd5807d0519aac825d88c3..5e33c22e938ebad8448cab778401d0bcdee9859a 100644 | 
| --- a/src/ast/scopes.cc | 
| +++ b/src/ast/scopes.cc | 
| @@ -542,13 +542,15 @@ void DeclarationScope::Analyze(ParseInfo* info, AnalyzeMode mode) { | 
| scope->HoistSloppyBlockFunctions(&factory); | 
| } | 
| - // We are compiling one of three cases: | 
| + // We are compiling one of four cases: | 
| // 1) top-level code, | 
| // 2) a function/eval/module on the top-level | 
| // 3) a function/eval in a scope that was already resolved. | 
| + // 4) an asm.js function | 
| DCHECK(scope->scope_type() == SCRIPT_SCOPE || | 
| scope->outer_scope()->scope_type() == SCRIPT_SCOPE || | 
| - scope->outer_scope()->already_resolved_); | 
| + scope->outer_scope()->already_resolved_ || | 
| + (info->asm_function_scope() && scope->scope_type() == FUNCTION_SCOPE)); | 
| 
Toon Verwaest
2016/11/29 14:39:59
is_function_scope()
 
bradn
2016/11/29 22:09:06
Done.
 | 
| // The outer scope is never lazy. | 
| scope->set_should_eager_compile(); |