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