| Index: src/arm64/full-codegen-arm64.cc
|
| diff --git a/src/arm64/full-codegen-arm64.cc b/src/arm64/full-codegen-arm64.cc
|
| index 426287540e4e2b523b9ed40c9030504f5ee79cf3..be3417f34f06aaafb0f2c98dd61cb0d183923f2e 100644
|
| --- a/src/arm64/full-codegen-arm64.cc
|
| +++ b/src/arm64/full-codegen-arm64.cc
|
| @@ -196,10 +196,10 @@ void FullCodeGenerator::Generate() {
|
| // Argument to NewContext is the function, which is still in x1.
|
| 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()) {
|
| __ Mov(x10, Operand(info->scope()->GetScopeInfo()));
|
| __ Push(x1, x10);
|
| - __ CallRuntime(Runtime::kNewGlobalContext, 2);
|
| + __ CallRuntime(Runtime::kNewScriptContext, 2);
|
| } else if (heap_slots <= FastNewContextStub::kMaximumSlots) {
|
| FastNewContextStub stub(isolate(), heap_slots);
|
| __ CallStub(&stub);
|
| @@ -934,7 +934,7 @@ void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) {
|
| EmitDebugCheckDeclarationContext(variable);
|
|
|
| // Load instance object.
|
| - __ LoadContext(x1, scope_->ContextChainLength(scope_->GlobalScope()));
|
| + __ LoadContext(x1, scope_->ContextChainLength(scope_->ScriptScope()));
|
| __ Ldr(x1, ContextMemOperand(x1, variable->interface()->Index()));
|
| __ Ldr(x1, ContextMemOperand(x1, Context::EXTENSION_INDEX));
|
|
|
| @@ -5111,7 +5111,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
|
|
|