| Index: src/scopes.cc
|
| diff --git a/src/scopes.cc b/src/scopes.cc
|
| index e1297b332ca52bd224bce0129ae3c72d3419ceac..440c7f280b4820c2dd814a2f6187b4705e6de99a 100644
|
| --- a/src/scopes.cc
|
| +++ b/src/scopes.cc
|
| @@ -160,6 +160,8 @@ void Scope::SetDefaults(ScopeType scope_type,
|
| scope_inside_with_ = false;
|
| scope_contains_with_ = false;
|
| scope_calls_eval_ = false;
|
| + asm_module_ = false;
|
| + asm_function_ = outer_scope != NULL && outer_scope->asm_module_;
|
| // Inherit the strict mode from the parent scope.
|
| strict_mode_ = outer_scope != NULL ? outer_scope->strict_mode_ : SLOPPY;
|
| outer_scope_calls_sloppy_eval_ = false;
|
| @@ -222,6 +224,8 @@ Scope* Scope::DeserializeScopeChain(Context* context, Scope* global_scope,
|
| Handle<ScopeInfo>(scope_info),
|
| global_scope->ast_value_factory_,
|
| zone);
|
| + if (scope_info->IsAsmFunction()) current_scope->asm_function_ = true;
|
| + if (scope_info->IsAsmModule()) current_scope->asm_module_ = true;
|
| } else if (context->IsBlockContext()) {
|
| ScopeInfo* scope_info = ScopeInfo::cast(context->extension());
|
| current_scope = new(zone) Scope(current_scope,
|
| @@ -1165,6 +1169,9 @@ void Scope::PropagateScopeInfo(bool outer_scope_calls_sloppy_eval ) {
|
| if (inner->force_eager_compilation_) {
|
| force_eager_compilation_ = true;
|
| }
|
| + if (asm_module_ && inner->scope_type() == FUNCTION_SCOPE) {
|
| + inner->asm_function_ = true;
|
| + }
|
| }
|
| }
|
|
|
|
|