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

Unified Diff: runtime/vm/flow_graph_allocator.cc

Issue 10908091: Remove classes Computation and BindInstr. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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
Index: runtime/vm/flow_graph_allocator.cc
diff --git a/runtime/vm/flow_graph_allocator.cc b/runtime/vm/flow_graph_allocator.cc
index ee601440942b68051a83b30767f9426bb172a6dd..83c13daecf3ede5f104d6039799c4293daef643a 100644
--- a/runtime/vm/flow_graph_allocator.cc
+++ b/runtime/vm/flow_graph_allocator.cc
@@ -86,7 +86,7 @@ FlowGraphAllocator::FlowGraphAllocator(const FlowGraph& flow_graph)
// Remove environments from the instructions which can't deoptimize.
// Replace dead phis uses with null values in environments.
void FlowGraphAllocator::EliminateEnvironmentUses() {
- Definition* constant_null =
+ ConstantInstr* constant_null =
postorder_.Last()->AsGraphEntry()->constant_null();
for (intptr_t i = 0; i < block_order_.length(); ++i) {
BlockEntryInstr* block = block_order_[i];
@@ -563,14 +563,12 @@ void FlowGraphAllocator::BuildLiveRanges() {
}
// Process global constants.
- BindInstr* null_defn = graph_entry->constant_null()->AsBind();
+ ConstantInstr* null_defn = graph_entry->constant_null();
LiveRange* range = GetLiveRange(null_defn->ssa_temp_index());
range->AddUseInterval(graph_entry->start_pos(), graph_entry->end_pos());
range->DefineAt(graph_entry->start_pos());
- range->set_assigned_location(
- Location::Constant(null_defn->computation()->AsConstant()->value()));
- range->set_spill_slot(
- Location::Constant(null_defn->computation()->AsConstant()->value()));
+ range->set_assigned_location(Location::Constant(null_defn->value()));
+ range->set_spill_slot(Location::Constant(null_defn->value()));
range->finger()->Initialize(range);
UsePosition* use =
range->finger()->FirstRegisterBeneficialUse(graph_entry->start_pos());
@@ -762,7 +760,7 @@ void FlowGraphAllocator::ProcessEnvironmentUses(BlockEntryInstr* block,
continue;
}
- ConstantComp* constant = def->AsConstant();
+ ConstantInstr* constant = def->AsConstant();
if (constant != NULL) {
locations[i] = Location::Constant(constant->value());
continue;

Powered by Google App Engine
This is Rietveld 408576698