Index: src/full-codegen/arm64/full-codegen-arm64.cc |
diff --git a/src/full-codegen/arm64/full-codegen-arm64.cc b/src/full-codegen/arm64/full-codegen-arm64.cc |
index 78681b4683499368feddee72f33b80214838583d..40af62cf1953f2b95a2b129b24c3a722eef8b3ea 100644 |
--- a/src/full-codegen/arm64/full-codegen-arm64.cc |
+++ b/src/full-codegen/arm64/full-codegen-arm64.cc |
@@ -1397,7 +1397,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) { |
@@ -2399,8 +2398,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) { |
__ Mov(StoreGlobalViaContextDescriptor::SlotRegister(), slot); |