Index: src/full-codegen/x64/full-codegen-x64.cc |
diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc |
index 3e1897806eaeb355ea83f438754c6d89c523359b..1839d2c22219417d0f26e865c2866ebe1c514e87 100644 |
--- a/src/full-codegen/x64/full-codegen-x64.cc |
+++ b/src/full-codegen/x64/full-codegen-x64.cc |
@@ -1369,18 +1369,15 @@ void FullCodeGenerator::EmitGlobalVariableLoad(VariableProxy* proxy, |
if (var->IsGlobalSlot()) { |
DCHECK(var->index() > 0); |
DCHECK(var->IsStaticGlobalObjectProperty()); |
- // Each var occupies two slots in the context: for reads and writes. |
int const slot = var->index(); |
int const depth = scope()->ContextChainLength(var->scope()); |
if (depth <= LoadGlobalViaContextStub::kMaximumDepth) { |
__ Set(LoadGlobalViaContextDescriptor::SlotRegister(), slot); |
- __ Move(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,18 +2619,16 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, |
int const depth = scope()->ContextChainLength(var->scope()); |
if (depth <= StoreGlobalViaContextStub::kMaximumDepth) { |
__ Set(StoreGlobalViaContextDescriptor::SlotRegister(), slot); |
- __ Move(StoreGlobalViaContextDescriptor::NameRegister(), var->name()); |
DCHECK(StoreGlobalViaContextDescriptor::ValueRegister().is(rax)); |
StoreGlobalViaContextStub stub(isolate(), depth, language_mode()); |
__ CallStub(&stub); |
} else { |
__ Push(Smi::FromInt(slot)); |
- __ Push(var->name()); |
__ Push(rax); |
__ CallRuntime(is_strict(language_mode()) |
? Runtime::kStoreGlobalViaContext_Strict |
: Runtime::kStoreGlobalViaContext_Sloppy, |
- 3); |
+ 2); |
} |
} else if (var->mode() == LET && op != Token::INIT_LET) { |