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

Side by Side Diff: runtime/vm/flow_graph_builder.h

Issue 10805008: Revert "Revert "Introduce Goto instructions to the flow graph."" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/flow_graph_allocator.cc ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_FLOW_GRAPH_BUILDER_H_ 5 #ifndef VM_FLOW_GRAPH_BUILDER_H_
6 #define VM_FLOW_GRAPH_BUILDER_H_ 6 #define VM_FLOW_GRAPH_BUILDER_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 bool is_open() const { return is_empty() || exit_ != NULL; } 115 bool is_open() const { return is_empty() || exit_ != NULL; }
116 116
117 void Bailout(const char* reason); 117 void Bailout(const char* reason);
118 118
119 // Append a graph fragment to this graph. Assumes this graph is open. 119 // Append a graph fragment to this graph. Assumes this graph is open.
120 void Append(const EffectGraphVisitor& other_fragment); 120 void Append(const EffectGraphVisitor& other_fragment);
121 // Append a computation with one use. Assumes this graph is open. 121 // Append a computation with one use. Assumes this graph is open.
122 UseVal* Bind(Computation* computation); 122 UseVal* Bind(Computation* computation);
123 // Append a computation with no uses. Assumes this graph is open. 123 // Append a computation with no uses. Assumes this graph is open.
124 void Do(Computation* computation); 124 void Do(Computation* computation);
125 // Append a single (non-Bind, non-Do) instruction. Assumes this graph is 125 // Append a single (non-Definition, non-Entry) instruction. Assumes this
126 // open. 126 // graph is open.
127 void AddInstruction(Instruction* instruction); 127 void AddInstruction(Instruction* instruction);
128 // Append a Goto (unconditional control flow) instruction and close
129 // the graph fragment. Assumes this graph fragment is open.
130 void Goto(JoinEntryInstr* join);
128 131
129 // Append a 'diamond' branch and join to this graph, depending on which 132 // Append a 'diamond' branch and join to this graph, depending on which
130 // parts are reachable. Assumes this graph is open. 133 // parts are reachable. Assumes this graph is open.
131 void Join(const TestGraphVisitor& test_fragment, 134 void Join(const TestGraphVisitor& test_fragment,
132 const EffectGraphVisitor& true_fragment, 135 const EffectGraphVisitor& true_fragment,
133 const EffectGraphVisitor& false_fragment); 136 const EffectGraphVisitor& false_fragment);
134 137
135 // Append a 'while loop' test and back edge to this graph, depending on 138 // Append a 'while loop' test and back edge to this graph, depending on
136 // which parts are reachable. Afterward, the graph exit is the false 139 // which parts are reachable. Afterward, the graph exit is the false
137 // successor of the loop condition. 140 // successor of the loop condition.
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 // Output parameters. 337 // Output parameters.
335 TargetEntryInstr** true_successor_address_; 338 TargetEntryInstr** true_successor_address_;
336 TargetEntryInstr** false_successor_address_; 339 TargetEntryInstr** false_successor_address_;
337 340
338 intptr_t condition_token_pos_; 341 intptr_t condition_token_pos_;
339 }; 342 };
340 343
341 } // namespace dart 344 } // namespace dart
342 345
343 #endif // VM_FLOW_GRAPH_BUILDER_H_ 346 #endif // VM_FLOW_GRAPH_BUILDER_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_allocator.cc ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698