Index: runtime/vm/flow_graph_builder.h |
=================================================================== |
--- runtime/vm/flow_graph_builder.h (revision 6612) |
+++ runtime/vm/flow_graph_builder.h (working copy) |
@@ -275,12 +275,20 @@ |
// |
// We expect that AstNode in test contexts either have only nonlocal exits |
// or else control flow has both true and false successors. |
+// |
+// The node_id and token_index are used in checked mode to verify that the |
+// condition of the test is of type bool. |
class TestGraphVisitor : public ValueGraphVisitor { |
public: |
- TestGraphVisitor(FlowGraphBuilder* owner, intptr_t temp_index) |
+ TestGraphVisitor(FlowGraphBuilder* owner, |
+ intptr_t temp_index, |
+ intptr_t condition_node_id, |
+ intptr_t condition_token_index) |
: ValueGraphVisitor(owner, temp_index), |
true_successor_address_(NULL), |
- false_successor_address_(NULL) { |
+ false_successor_address_(NULL), |
+ condition_node_id_(condition_node_id), |
+ condition_token_index_(condition_token_index) { |
} |
// Visit functions overridden by this class. |
@@ -296,6 +304,9 @@ |
return false_successor_address_; |
} |
+ intptr_t condition_node_id() const { return condition_node_id_; } |
+ intptr_t condition_token_index() const { return condition_token_index_; } |
+ |
private: |
// Construct and concatenate a Branch instruction to this graph fragment. |
// Closes the fragment and sets the output parameters. |
@@ -311,6 +322,9 @@ |
// Output parameters. |
TargetEntryInstr** true_successor_address_; |
TargetEntryInstr** false_successor_address_; |
+ |
+ intptr_t condition_node_id_; |
+ intptr_t condition_token_index_; |
}; |
} // namespace dart |
Property changes on: runtime/vm/flow_graph_builder.h |
___________________________________________________________________ |
Deleted: svn:eol-style |
- LF |