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

Unified Diff: runtime/vm/flow_graph_allocator.cc

Issue 10917085: Revert "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
« no previous file with comments | « runtime/vm/flow_graph.cc ('k') | runtime/vm/flow_graph_builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_allocator.cc
diff --git a/runtime/vm/flow_graph_allocator.cc b/runtime/vm/flow_graph_allocator.cc
index 83c13daecf3ede5f104d6039799c4293daef643a..ee601440942b68051a83b30767f9426bb172a6dd 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() {
- ConstantInstr* constant_null =
+ Definition* constant_null =
postorder_.Last()->AsGraphEntry()->constant_null();
for (intptr_t i = 0; i < block_order_.length(); ++i) {
BlockEntryInstr* block = block_order_[i];
@@ -563,12 +563,14 @@ void FlowGraphAllocator::BuildLiveRanges() {
}
// Process global constants.
- ConstantInstr* null_defn = graph_entry->constant_null();
+ BindInstr* null_defn = graph_entry->constant_null()->AsBind();
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->value()));
- range->set_spill_slot(Location::Constant(null_defn->value()));
+ range->set_assigned_location(
+ Location::Constant(null_defn->computation()->AsConstant()->value()));
+ range->set_spill_slot(
+ Location::Constant(null_defn->computation()->AsConstant()->value()));
range->finger()->Initialize(range);
UsePosition* use =
range->finger()->FirstRegisterBeneficialUse(graph_entry->start_pos());
@@ -760,7 +762,7 @@ void FlowGraphAllocator::ProcessEnvironmentUses(BlockEntryInstr* block,
continue;
}
- ConstantInstr* constant = def->AsConstant();
+ ConstantComp* constant = def->AsConstant();
if (constant != NULL) {
locations[i] = Location::Constant(constant->value());
continue;
« no previous file with comments | « runtime/vm/flow_graph.cc ('k') | runtime/vm/flow_graph_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698