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

Unified Diff: runtime/vm/flow_graph_allocator.cc

Issue 10800080: Add higher-level accesses to Environment. Print flow graph after register allocation. Most interest… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | « runtime/vm/compiler.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_allocator.cc
===================================================================
--- runtime/vm/flow_graph_allocator.cc (revision 9819)
+++ runtime/vm/flow_graph_allocator.cc (working copy)
@@ -470,22 +470,22 @@
// TODO(vegorov): these uses should _not_ require register but for now
// they do because we don't support spilling at all.
if (current->env() != NULL) {
- const GrowableArray<Value*>& values = current->env()->values();
- GrowableArray<Location>* locations = current->env()->locations();
+ Environment* env = current->env();
+ const GrowableArray<Value*>& values = env->values();
for (intptr_t j = 0; j < values.length(); j++) {
Value* val = values[j];
if (val->IsUse()) {
- locations->Add(Location::RequiresRegister());
+ env->AddLocation(Location::RequiresRegister());
const intptr_t use = val->AsUse()->definition()->ssa_temp_index();
UseValue(current,
block->start_pos(),
pos,
use,
- &(*locations)[j],
+ env->LocationSlotAt(j),
true);
} else {
- locations->Add(Location::NoLocation());
+ env->AddLocation(Location::NoLocation());
}
}
}
@@ -497,7 +497,7 @@
BlockLocation(temp, pos);
} else if (temp.IsUnallocated()) {
UseInterval* temp_interval = new UseInterval(
- kTempVirtualRegister, pos, pos + 1, NULL);
+ kTempVirtualRegister, pos, pos + 1, NULL);
temp_interval->AddUse(NULL, pos, locs->temp_slot(j));
AddToUnallocated(temp_interval);
} else {
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698