Index: src/full-codegen/ia32/full-codegen-ia32.cc |
diff --git a/src/full-codegen/ia32/full-codegen-ia32.cc b/src/full-codegen/ia32/full-codegen-ia32.cc |
index 2bec10772900e005d52eb8c5aac5773257f5dfba..ca86a1e136766c5b2b939fd7ce3b7e51de111ca4 100644 |
--- a/src/full-codegen/ia32/full-codegen-ia32.cc |
+++ b/src/full-codegen/ia32/full-codegen-ia32.cc |
@@ -1345,13 +1345,11 @@ void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, |
int const depth = scope()->ContextChainLength(var->scope()); |
if (depth <= LoadGlobalViaContextStub::kMaximumDepth) { |
__ Move(LoadGlobalViaContextDescriptor::SlotRegister(), Immediate(slot)); |
- __ mov(LoadGlobalViaContextDescriptor::NameRegister(), var->name()); |
LoadGlobalViaContextStub stub(isolate(), depth); |
__ CallStub(&stub); |
} else { |
__ Push(Smi::FromInt(slot)); |
- __ Push(var->name()); |
- __ CallRuntime(Runtime::kLoadGlobalViaContext, 2); |
+ __ CallRuntime(Runtime::kLoadGlobalViaContext, 1); |
} |
} else { |
@@ -2622,23 +2620,20 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, |
// Global var, const, or let. |
DCHECK(var->index() > 0); |
DCHECK(var->IsStaticGlobalObjectProperty()); |
- // Each var occupies two slots in the context: for reads and writes. |
- int const slot = var->index() + 1; |
+ int const slot = var->index(); |
int const depth = scope()->ContextChainLength(var->scope()); |
if (depth <= StoreGlobalViaContextStub::kMaximumDepth) { |
__ Move(StoreGlobalViaContextDescriptor::SlotRegister(), Immediate(slot)); |
- __ mov(StoreGlobalViaContextDescriptor::NameRegister(), var->name()); |
DCHECK(StoreGlobalViaContextDescriptor::ValueRegister().is(eax)); |
StoreGlobalViaContextStub stub(isolate(), depth, language_mode()); |
__ CallStub(&stub); |
} else { |
__ Push(Smi::FromInt(slot)); |
- __ Push(var->name()); |
__ Push(eax); |
__ CallRuntime(is_strict(language_mode()) |
? Runtime::kStoreGlobalViaContext_Strict |
: Runtime::kStoreGlobalViaContext_Sloppy, |
- 3); |
+ 2); |
} |
} else if (var->mode() == LET && op != Token::INIT_LET) { |