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

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

Issue 23923005: Change --print-ast output to be more regular. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // - (i0, i1): an open graph fragment 201 // - (i0, i1): an open graph fragment
202 class EffectGraphVisitor : public AstNodeVisitor { 202 class EffectGraphVisitor : public AstNodeVisitor {
203 public: 203 public:
204 EffectGraphVisitor(FlowGraphBuilder* owner, 204 EffectGraphVisitor(FlowGraphBuilder* owner,
205 intptr_t temp_index) 205 intptr_t temp_index)
206 : owner_(owner), 206 : owner_(owner),
207 temp_index_(temp_index), 207 temp_index_(temp_index),
208 entry_(NULL), 208 entry_(NULL),
209 exit_(NULL) { } 209 exit_(NULL) { }
210 210
211 #define DEFINE_VISIT(type, name) virtual void Visit##type(type* node); 211 #define DECLARE_VISIT(BaseName) \
212 NODE_LIST(DEFINE_VISIT) 212 virtual void Visit##BaseName##Node(BaseName##Node* node);
213 #undef DEFINE_VISIT 213
214 FOR_EACH_NODE(DECLARE_VISIT)
215 #undef DECLARE_VISIT
214 216
215 FlowGraphBuilder* owner() const { return owner_; } 217 FlowGraphBuilder* owner() const { return owner_; }
216 intptr_t temp_index() const { return temp_index_; } 218 intptr_t temp_index() const { return temp_index_; }
217 Instruction* entry() const { return entry_; } 219 Instruction* entry() const { return entry_; }
218 Instruction* exit() const { return exit_; } 220 Instruction* exit() const { return exit_; }
219 221
220 bool is_empty() const { return entry_ == NULL; } 222 bool is_empty() const { return entry_ == NULL; }
221 bool is_open() const { return is_empty() || exit_ != NULL; } 223 bool is_open() const { return is_empty() || exit_ != NULL; }
222 224
223 void Bailout(const char* reason); 225 void Bailout(const char* reason);
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 // Output parameters. 522 // Output parameters.
521 GrowableArray<TargetEntryInstr**> true_successor_addresses_; 523 GrowableArray<TargetEntryInstr**> true_successor_addresses_;
522 GrowableArray<TargetEntryInstr**> false_successor_addresses_; 524 GrowableArray<TargetEntryInstr**> false_successor_addresses_;
523 525
524 intptr_t condition_token_pos_; 526 intptr_t condition_token_pos_;
525 }; 527 };
526 528
527 } // namespace dart 529 } // namespace dart
528 530
529 #endif // VM_FLOW_GRAPH_BUILDER_H_ 531 #endif // VM_FLOW_GRAPH_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698