| OLD | NEW |
| 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 21 matching lines...) Expand all Loading... |
| 32 // Cannot give a NULL reason because we use it to detect bailout. | 32 // Cannot give a NULL reason because we use it to detect bailout. |
| 33 ASSERT(!HasBailedOut() && (reason != NULL)); | 33 ASSERT(!HasBailedOut() && (reason != NULL)); |
| 34 bailout_reason_ = reason; | 34 bailout_reason_ = reason; |
| 35 } | 35 } |
| 36 void TraceBailout() const; | 36 void TraceBailout() const; |
| 37 void PrintGraph() const; | 37 void PrintGraph() const; |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 const ParsedFunction& parsed_function_; | 40 const ParsedFunction& parsed_function_; |
| 41 const char* bailout_reason_; | 41 const char* bailout_reason_; |
| 42 GrowableArray<Instruction*> postorder_block_entries_; | 42 GrowableArray<BlockEntryInstr*> postorder_block_entries_; |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 | 45 |
| 46 #define DEFINE_VISIT(type, name) virtual void Visit##type(type* node); | 46 #define DEFINE_VISIT(type, name) virtual void Visit##type(type* node); |
| 47 | 47 |
| 48 class TestGraphVisitor; | 48 class TestGraphVisitor; |
| 49 | 49 |
| 50 // Translate an AstNode to a control-flow graph fragment for its effects | 50 // Translate an AstNode to a control-flow graph fragment for its effects |
| 51 // (e.g., a statement or an expression in an effect context). Implements a | 51 // (e.g., a statement or an expression in an effect context). Implements a |
| 52 // function from an AstNode and next temporary index to a graph fragment | 52 // function from an AstNode and next temporary index to a graph fragment |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 TargetEntryInstr** true_successor_address_; | 213 TargetEntryInstr** true_successor_address_; |
| 214 TargetEntryInstr** false_successor_address_; | 214 TargetEntryInstr** false_successor_address_; |
| 215 }; | 215 }; |
| 216 | 216 |
| 217 #undef DEFINE_VISIT | 217 #undef DEFINE_VISIT |
| 218 | 218 |
| 219 | 219 |
| 220 } // namespace dart | 220 } // namespace dart |
| 221 | 221 |
| 222 #endif // VM_FLOW_GRAPH_BUILDER_H_ | 222 #endif // VM_FLOW_GRAPH_BUILDER_H_ |
| OLD | NEW |