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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 10316005: Automatically assign temporary indices to definitions in the IL. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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/intermediate_language.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index 418366e429ab13b734a4f4716aac11e1b01e31ed..fce978527984c0ab947d66657db42c4494058d81 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -92,6 +92,106 @@ void FlowGraphVisitor::VisitBlocks() {
}
+// ==== Per-instruction input counts.
+intptr_t AssertAssignableComp::InputCount() const {
+ // Value and optional instantiator type arguments.
+ return (instantiator_type_arguments() == NULL) ? 1 : 2;
+}
+
+
+intptr_t InstanceOfComp::InputCount() const {
+ // Value and optional type_arguments.
+ return (type_arguments() == NULL) ? 1 : 2;
+}
+
+
+intptr_t CreateClosureComp::InputCount() const {
+ // Optional type arguments.
+ return (type_arguments() == NULL) ? 0 : 1;
+}
+
+
+intptr_t InstanceCallComp::InputCount() const {
+ return ArgumentCount();
+}
+
+
+intptr_t StaticCallComp::InputCount() const {
+ return ArgumentCount();
+}
+
+
+intptr_t ClosureCallComp::InputCount() const {
+ // Context and arguments.
+ return 1 + ArgumentCount();
+}
+
+
+intptr_t AllocateObjectComp::InputCount() const {
+ return arguments().length();
+}
+
+
+intptr_t AllocateObjectWithBoundsCheckComp::InputCount() const {
+ return arguments().length();
+}
+
+
+intptr_t CreateArrayComp::InputCount() const {
+ return ElementCount();
+}
+
+
+intptr_t BranchInstr::InputCount() const {
+ return 1;
+}
+
+
+intptr_t ReThrowInstr::InputCount() const {
+ return 2;
+}
+
+
+intptr_t ThrowInstr::InputCount() const {
+ return 1;
+}
+
+
+intptr_t ReturnInstr::InputCount() const {
+ return 1;
+}
+
+
+intptr_t BindInstr::InputCount() const {
+ return computation()->InputCount();
+}
+
+
+intptr_t DoInstr::InputCount() const {
+ return computation()->InputCount();
+}
+
+
+intptr_t TuckTempInstr::InputCount() const {
+ return 0;
+}
+
+
+intptr_t PickTempInstr::InputCount() const {
+ return 0;
+}
+
+
+intptr_t TargetEntryInstr::InputCount() const {
+ return 0;
+}
+
+
+intptr_t JoinEntryInstr::InputCount() const {
+ return 0;
+}
+
+
// ==== Postorder graph traversal.
void JoinEntryInstr::DiscoverBlocks(
BlockEntryInstr* current_block,
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698