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

Unified Diff: vm/intermediate_language.cc

Issue 10735002: Add support for fixed parameters in SSA builder and fix a bug in the pre-order graph traversal. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 6 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 | « vm/intermediate_language.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/intermediate_language.cc
===================================================================
--- vm/intermediate_language.cc (revision 9340)
+++ vm/intermediate_language.cc (working copy)
@@ -286,6 +286,22 @@
}
+intptr_t ParameterInstr::InputCount() const {
+ return 0;
+}
+
+
+Value* ParameterInstr::InputAt(intptr_t i) const {
+ UNREACHABLE();
+ return NULL;
+}
+
+
+void ParameterInstr::SetInputAt(intptr_t i, Value* value) {
+ UNREACHABLE();
+}
+
+
intptr_t DoInstr::InputCount() const {
return computation()->InputCount();
}
@@ -441,13 +457,12 @@
ASSERT(!IsTargetEntry() || (preorder_number() == -1));
if (preorder_number() >= 0) return;
- // 3. The last entry in the preorder array is the spanning-tree parent.
- intptr_t parent_number = preorder->length() - 1;
- parent->Add(parent_number);
+ // 3. The current block is the spanning-tree parent.
+ parent->Add(current_block->preorder_number());
// 4. Assign preorder number and add the block entry to the list.
// Allocate an empty set of assigned variables for the block.
- set_preorder_number(parent_number + 1);
+ set_preorder_number(preorder->length());
preorder->Add(this);
BitVector* vars =
(variable_count == 0) ? NULL : new BitVector(variable_count);
« no previous file with comments | « vm/intermediate_language.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698