| Index: src/mips64/full-codegen-mips64.cc
|
| diff --git a/src/mips64/full-codegen-mips64.cc b/src/mips64/full-codegen-mips64.cc
|
| index 4fb5629af34a8b98ac7ea44fa5a0305423c0ed0d..ecce5087f95bcec040b91d17c0b15cdeb1cc162b 100644
|
| --- a/src/mips64/full-codegen-mips64.cc
|
| +++ b/src/mips64/full-codegen-mips64.cc
|
| @@ -201,10 +201,10 @@ void FullCodeGenerator::Generate() {
|
| Comment cmnt(masm_, "[ Allocate context");
|
| // Argument to NewContext is the function, which is still in a1.
|
| bool need_write_barrier = true;
|
| - if (FLAG_harmony_scoping && info->scope()->is_global_scope()) {
|
| + if (FLAG_harmony_scoping && info->scope()->is_script_scope()) {
|
| __ push(a1);
|
| __ 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);
|
| @@ -924,7 +924,7 @@ void FullCodeGenerator::VisitModuleDeclaration(ModuleDeclaration* declaration) {
|
| EmitDebugCheckDeclarationContext(variable);
|
|
|
| // Load instance object.
|
| - __ LoadContext(a1, scope_->ContextChainLength(scope_->GlobalScope()));
|
| + __ LoadContext(a1, scope_->ContextChainLength(scope_->ScriptScope()));
|
| __ ld(a1, ContextOperand(a1, variable->interface()->Index()));
|
| __ ld(a1, ContextOperand(a1, Context::EXTENSION_INDEX));
|
|
|
| @@ -5047,7 +5047,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
|
|
|