Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Unified Diff: src/full-codegen/arm64/full-codegen-arm64.cc

Issue 1258213002: [stubs] Use a single slot for context globals. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698