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

Unified Diff: vm/intermediate_language.cc

Issue 10544206: Second step for computing SSA: renaming. (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
« vm/intermediate_language.h ('K') | « 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 8786)
+++ vm/intermediate_language.cc (working copy)
@@ -140,6 +140,15 @@
}
+void CreateArrayComp::SetInputAt(intptr_t i, Value* value) {
+ if (i == 0) {
+ inputs_[0] = value;
+ } else {
+ (*elements_)[i - 1] = value;
+ }
+}
+
+
intptr_t BranchInstr::InputCount() const {
return 1;
}
@@ -152,6 +161,15 @@
}
+void BranchInstr::SetInputAt(intptr_t i, Value* value) {
+ if (i == 0) {
+ value_ = value;
+ return;
+ }
+ UNREACHABLE();
+}
+
+
intptr_t ReThrowInstr::InputCount() const {
return 2;
}
@@ -165,6 +183,19 @@
}
+void ReThrowInstr::SetInputAt(intptr_t i, Value* value) {
+ if (i == 0) {
+ exception_ = value;
+ return;
+ }
+ if (i == 1) {
+ stack_trace_ = value;
+ return;
+ }
+ UNREACHABLE();
+}
+
+
intptr_t ThrowInstr::InputCount() const {
return 1;
}
@@ -177,6 +208,15 @@
}
+void ThrowInstr::SetInputAt(intptr_t i, Value* value) {
+ if (i == 0) {
+ exception_ = value;
+ return;
+ }
+ UNREACHABLE();
+}
+
+
intptr_t ReturnInstr::InputCount() const {
return 1;
}
@@ -189,6 +229,15 @@
}
+void ReturnInstr::SetInputAt(intptr_t i, Value* value) {
+ if (i == 0) {
+ value_ = value;
+ return;
+ }
+ UNREACHABLE();
+}
+
+
intptr_t BindInstr::InputCount() const {
return computation()->InputCount();
}
@@ -199,6 +248,11 @@
}
+void BindInstr::SetInputAt(intptr_t i, Value* value) {
+ computation()->SetInputAt(i, value);
+}
+
+
intptr_t PhiInstr::InputCount() const {
return inputs_.length();
}
@@ -209,6 +263,11 @@
}
+void PhiInstr::SetInputAt(intptr_t i, Value* value) {
+ inputs_[i] = value;
+}
+
+
intptr_t DoInstr::InputCount() const {
return computation()->InputCount();
}
@@ -219,6 +278,11 @@
}
+void DoInstr::SetInputAt(intptr_t i, Value* value) {
+ computation()->SetInputAt(i, value);
+}
+
+
intptr_t GraphEntryInstr::InputCount() const {
return 0;
}
@@ -230,6 +294,11 @@
}
+void GraphEntryInstr::SetInputAt(intptr_t i, Value* value) {
+ UNREACHABLE();
+}
+
+
intptr_t TargetEntryInstr::InputCount() const {
return 0;
}
@@ -241,6 +310,11 @@
}
+void TargetEntryInstr::SetInputAt(intptr_t i, Value* value) {
+ UNREACHABLE();
+}
+
+
intptr_t JoinEntryInstr::InputCount() const {
return 0;
}
@@ -252,6 +326,11 @@
}
+void JoinEntryInstr::SetInputAt(intptr_t i, Value* value) {
+ UNREACHABLE();
+}
+
+
// ==== Recording assigned variables.
void Computation::RecordAssignedVars(BitVector* assigned_vars) {
// Nothing to do for the base class.
« vm/intermediate_language.h ('K') | « vm/intermediate_language.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698