Index: src/full-codegen/x87/full-codegen-x87.cc |
diff --git a/src/full-codegen/x87/full-codegen-x87.cc b/src/full-codegen/x87/full-codegen-x87.cc |
index 1e93fe1fa86a029e662a5f6e5fe76d20c7fde88b..8f40e0513f55d046c4b388496a445bcc67769260 100644 |
--- a/src/full-codegen/x87/full-codegen-x87.cc |
+++ b/src/full-codegen/x87/full-codegen-x87.cc |
@@ -1333,7 +1333,6 @@ 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) { |
@@ -2613,8 +2612,7 @@ 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)); |