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

Unified Diff: runtime/vm/flow_graph_builder.h

Issue 10916119: Allow test context to have multiple true and false branch slots. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.h
diff --git a/runtime/vm/flow_graph_builder.h b/runtime/vm/flow_graph_builder.h
index 46105e63914e375b31dab0328efb32a5cb4dc9c0..eea796d7635f659593da870fe1d9c07231c2f18d 100644
--- a/runtime/vm/flow_graph_builder.h
+++ b/runtime/vm/flow_graph_builder.h
@@ -343,18 +343,17 @@ class TestGraphVisitor : public ValueGraphVisitor {
intptr_t temp_index,
intptr_t condition_token_pos)
: ValueGraphVisitor(owner, temp_index),
- true_successor_address_(NULL),
- false_successor_address_(NULL),
+ true_successor_addresses_(1),
+ false_successor_addresses_(1),
condition_token_pos_(condition_token_pos) { }
- TargetEntryInstr** true_successor_address() const {
- ASSERT(true_successor_address_ != NULL);
- return true_successor_address_;
- }
- TargetEntryInstr** false_successor_address() const {
- ASSERT(false_successor_address_ != NULL);
- return false_successor_address_;
- }
+ void IfFalseGoto(JoinEntryInstr* join) const;
+ void IfTrueGoto(JoinEntryInstr* join) const;
+
+ BlockEntryInstr* CreateTrueSuccessor() const;
+ BlockEntryInstr* CreateFalseSuccessor() const;
+
+ virtual void VisitBinaryOpNode(BinaryOpNode* node);
intptr_t condition_token_pos() const { return condition_token_pos_; }
@@ -370,9 +369,16 @@ class TestGraphVisitor : public ValueGraphVisitor {
void MergeBranchWithComparison(ComparisonComp* comp);
void MergeBranchWithNegate(BooleanNegateComp* comp);
+ BlockEntryInstr* CreateSuccessorFor(
+ const GrowableArray<TargetEntryInstr**>& branches) const;
+
+ void ConnectBranchesTo(
+ const GrowableArray<TargetEntryInstr**>& branches,
+ JoinEntryInstr* join) const;
+
// Output parameters.
- TargetEntryInstr** true_successor_address_;
- TargetEntryInstr** false_successor_address_;
+ GrowableArray<TargetEntryInstr**> true_successor_addresses_;
+ GrowableArray<TargetEntryInstr**> false_successor_addresses_;
intptr_t condition_token_pos_;
};
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698