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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 10332139: Fix a pair of flow graph construction issues. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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 5f28215f9589f4cb6dcbd9e1875d014a250c9ab8..88e0b8d25d7ee8f989f792d16c7f48e7c710e742 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -12,73 +12,24 @@ namespace dart {
// ==== Support for visiting flow graphs.
#define DEFINE_ACCEPT(ShortName, ClassName) \
- void ClassName::Accept(FlowGraphVisitor* visitor) { \
- visitor->Visit##ShortName(this); \
- }
+void ClassName::Accept(FlowGraphVisitor* visitor) { \
+ visitor->Visit##ShortName(this); \
+}
FOR_EACH_COMPUTATION(DEFINE_ACCEPT)
#undef DEFINE_ACCEPT
-Instruction* JoinEntryInstr::Accept(FlowGraphVisitor* visitor) {
- visitor->VisitJoinEntry(this);
- return successor_;
-}
-
-
-Instruction* TargetEntryInstr::Accept(FlowGraphVisitor* visitor) {
- visitor->VisitTargetEntry(this);
- return successor_;
-}
-
-
-Instruction* PickTempInstr::Accept(FlowGraphVisitor* visitor) {
- visitor->VisitPickTemp(this);
- return successor_;
-}
-
-
-Instruction* TuckTempInstr::Accept(FlowGraphVisitor* visitor) {
- visitor->VisitTuckTemp(this);
- return successor_;
-}
-
-
-Instruction* DoInstr::Accept(FlowGraphVisitor* visitor) {
- visitor->VisitDo(this);
- return successor_;
+#define DEFINE_ACCEPT(ShortName) \
+Instruction* ShortName##Instr::Accept(FlowGraphVisitor* visitor) { \
+ visitor->Visit##ShortName(this); \
+ return StraightLineSuccessor(); \
}
+FOR_EACH_INSTRUCTION(DEFINE_ACCEPT)
-Instruction* BindInstr::Accept(FlowGraphVisitor* visitor) {
- visitor->VisitBind(this);
- return successor_;
-}
-
-
-Instruction* ReturnInstr::Accept(FlowGraphVisitor* visitor) {
- visitor->VisitReturn(this);
- return NULL;
-}
-
-
-Instruction* ThrowInstr::Accept(FlowGraphVisitor* visitor) {
- visitor->VisitThrow(this);
- return NULL;
-}
-
-
-Instruction* ReThrowInstr::Accept(FlowGraphVisitor* visitor) {
- visitor->VisitReThrow(this);
- return NULL;
-}
-
-
-Instruction* BranchInstr::Accept(FlowGraphVisitor* visitor) {
- visitor->VisitBranch(this);
- return NULL;
-}
+#undef DEFINE_ACCEPT
// Default implementation of visiting basic blocks. Can be overridden.
« 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