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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 10939031: Replace start_env with initial_definitions in GraphEntryInstr. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Review comments 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_inliner.cc ('k') | runtime/vm/il_printer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_optimizer.cc
diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
index 03dffe17a25ac2b3e3b2c2d2110b8f53d73f5722..69ce617a95a4153ed5c243bc22bf836ddad0e42a 100644
--- a/runtime/vm/flow_graph_optimizer.cc
+++ b/runtime/vm/flow_graph_optimizer.cc
@@ -126,10 +126,9 @@ void FlowGraphOptimizer::SelectRepresentations() {
// Process all instructions and insert conversions where needed.
GraphEntryInstr* graph_entry = block_order_[0]->AsGraphEntry();
- // Visit incoming parameters.
- for (intptr_t i = 0; i < graph_entry->start_env()->Length(); i++) {
- Value* val = graph_entry->start_env()->ValueAt(i);
- InsertConversionsFor(val->definition());
+ // Visit incoming parameters and constants.
+ for (intptr_t i = 0; i < graph_entry->initial_definitions()->length(); i++) {
+ InsertConversionsFor((*graph_entry->initial_definitions())[i]);
}
for (intptr_t i = 0; i < block_order_.length(); ++i) {
@@ -1289,17 +1288,11 @@ void FlowGraphTypePropagator::VisitInstanceOf(InstanceOfInstr* instr) {
void FlowGraphTypePropagator::VisitGraphEntry(GraphEntryInstr* graph_entry) {
- if (graph_entry->start_env() == NULL) {
- return;
- }
// Visit incoming parameters.
- for (intptr_t i = 0; i < graph_entry->start_env()->Length(); i++) {
- Value* val = graph_entry->start_env()->ValueAt(i);
- ParameterInstr* param = val->definition()->AsParameter();
- if (param != NULL) {
- ASSERT(param->index() == i);
- VisitParameter(param);
- }
+ for (intptr_t i = 0; i < graph_entry->initial_definitions()->length(); i++) {
+ ParameterInstr* param =
+ (*graph_entry->initial_definitions())[i]->AsParameter();
+ if (param != NULL) VisitParameter(param);
}
}
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | runtime/vm/il_printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698