Index: src/ast/scopes.cc |
diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc |
index 4ce1c0d85f7970f0b1cd5807d0519aac825d88c3..b907b484a546f289537a78470fa6ff540d57bf61 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->is_function_scope())); |
// The outer scope is never lazy. |
scope->set_should_eager_compile(); |