| Index: src/arm/full-codegen-arm.cc
|
| diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc
|
| index 1710b609dc68740a60cb1984cdbb9223415e99f5..4cb4bbff5ffa5d382db507f52fbe79581e62dcc5 100644
|
| --- a/src/arm/full-codegen-arm.cc
|
| +++ b/src/arm/full-codegen-arm.cc
|
| @@ -195,10 +195,10 @@ void FullCodeGenerator::Generate() {
|
| // Argument to NewContext is the function, which is still in r1.
|
| Comment cmnt(masm_, "[ Allocate context");
|
| bool need_write_barrier = true;
|
| - if (FLAG_harmony_scoping && info->scope()->is_global_scope()) {
|
| + if (FLAG_harmony_scoping && info->scope()->is_script_scope()) {
|
| __ push(r1);
|
| __ Push(info->scope()->GetScopeInfo());
|
| - __ CallRuntime(Runtime::kNewGlobalContext, 2);
|
| + __ CallRuntime(Runtime::kNewScriptContext, 2);
|
| } else if (heap_slots <= FastNewContextStub::kMaximumSlots) {
|
| FastNewContextStub stub(isolate(), heap_slots);
|
| __ CallStub(&stub);
|
| @@ -937,7 +937,7 @@ void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) {
|
| EmitDebugCheckDeclarationContext(variable);
|
|
|
| // Load instance object.
|
| - __ LoadContext(r1, scope_->ContextChainLength(scope_->GlobalScope()));
|
| + __ LoadContext(r1, scope_->ContextChainLength(scope_->ScriptScope()));
|
| __ ldr(r1, ContextOperand(r1, variable->interface()->Index()));
|
| __ ldr(r1, ContextOperand(r1, Context::EXTENSION_INDEX));
|
|
|
| @@ -5085,7 +5085,7 @@ void FullCodeGenerator::LoadContextField(Register dst, int context_index) {
|
|
|
| void FullCodeGenerator::PushFunctionArgumentForContextAllocation() {
|
| Scope* declaration_scope = scope()->DeclarationScope();
|
| - if (declaration_scope->is_global_scope() ||
|
| + if (declaration_scope->is_script_scope() ||
|
| declaration_scope->is_module_scope()) {
|
| // Contexts nested in the native context have a canonical empty function
|
| // as their closure, not the anonymous closure containing the global
|
|
|