| 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 bebd0fbbe995082b337e4f5095f588668e1b80e3..6652c92e9fd2f0a9dbdf1d48bab44a3ae11031bb 100644
|
| --- a/src/full-codegen/ia32/full-codegen-ia32.cc
|
| +++ b/src/full-codegen/ia32/full-codegen-ia32.cc
|
| @@ -1340,7 +1340,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) {
|
| @@ -2620,8 +2619,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));
|
|
|