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

Unified Diff: src/hydrogen.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/x87/full-codegen-x87.cc ('k') | src/scopeinfo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index f652b313ca9765f93e3db44157c7f323be9483e2..2689e42d5c1d89e38bb3f698b6503be70e5bc965 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -5564,7 +5564,6 @@ void HOptimizedGraphBuilder::VisitVariableProxy(VariableProxy* expr) {
} else if (variable->IsGlobalSlot()) {
DCHECK(variable->index() > 0);
DCHECK(variable->IsStaticGlobalObjectProperty());
- // Each var occupies two slots in the context: for reads and writes.
int slot_index = variable->index();
int depth = scope()->ContextChainLength(variable->scope());
@@ -6796,8 +6795,7 @@ void HOptimizedGraphBuilder::HandleGlobalVariableAssignment(
} else if (var->IsGlobalSlot()) {
DCHECK(var->index() > 0);
DCHECK(var->IsStaticGlobalObjectProperty());
- // Each var occupies two slots in the context: for reads and writes.
- int slot_index = var->index() + 1;
+ int slot_index = var->index();
int depth = scope()->ContextChainLength(var->scope());
HStoreGlobalViaContext* instr = Add<HStoreGlobalViaContext>(
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/scopeinfo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698