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 "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "platform/globals.h" | 9 #include "platform/globals.h" |
10 #include "vm/allocation.h" | 10 #include "vm/allocation.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 FlowGraph* caller_graph_; | 117 FlowGraph* caller_graph_; |
118 Definition* call_; | 118 Definition* call_; |
119 GrowableArray<Data> exits_; | 119 GrowableArray<Data> exits_; |
120 }; | 120 }; |
121 | 121 |
122 | 122 |
123 // Build a flow graph from a parsed function's AST. | 123 // Build a flow graph from a parsed function's AST. |
124 class FlowGraphBuilder : public ValueObject { | 124 class FlowGraphBuilder : public ValueObject { |
125 public: | 125 public: |
126 // The inlining context is NULL if not inlining. The osr_id is the deopt | 126 // The inlining context is NULL if not inlining. The osr_id is the deopt |
127 // id of the OSR entry or Thread::kNoDeoptId if not compiling for OSR. | 127 // id of the OSR entry or Compiler::kNoOSRDeoptId if not compiling for OSR. |
128 FlowGraphBuilder(const ParsedFunction& parsed_function, | 128 FlowGraphBuilder(const ParsedFunction& parsed_function, |
129 const ZoneGrowableArray<const ICData*>& ic_data_array, | 129 const ZoneGrowableArray<const ICData*>& ic_data_array, |
130 InlineExitCollector* exit_collector, | 130 InlineExitCollector* exit_collector, |
131 intptr_t osr_id); | 131 intptr_t osr_id); |
132 | 132 |
133 FlowGraph* BuildGraph(); | 133 FlowGraph* BuildGraph(); |
134 | 134 |
135 const ParsedFunction& parsed_function() const { return parsed_function_; } | 135 const ParsedFunction& parsed_function() const { return parsed_function_; } |
136 const Function& function() const { return parsed_function_.function(); } | 136 const Function& function() const { return parsed_function_.function(); } |
137 const ZoneGrowableArray<const ICData*>& ic_data_array() const { | 137 const ZoneGrowableArray<const ICData*>& ic_data_array() const { |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 | 241 |
242 // The expression stack height. | 242 // The expression stack height. |
243 intptr_t temp_count_; | 243 intptr_t temp_count_; |
244 | 244 |
245 // Outgoing argument stack height. | 245 // Outgoing argument stack height. |
246 intptr_t args_pushed_; | 246 intptr_t args_pushed_; |
247 | 247 |
248 // A stack of enclosing nested statements. | 248 // A stack of enclosing nested statements. |
249 NestedStatement* nesting_stack_; | 249 NestedStatement* nesting_stack_; |
250 | 250 |
251 // The deopt id of the OSR entry or Thread::kNoDeoptId if not compiling | 251 // The deopt id of the OSR entry orCompiler::kNoOSRDeoptId if not compiling |
252 // for OSR. | 252 // for OSR. |
253 const intptr_t osr_id_; | 253 const intptr_t osr_id_; |
254 | 254 |
255 intptr_t jump_count_; | 255 intptr_t jump_count_; |
256 ZoneGrowableArray<JoinEntryInstr*>* await_joins_; | 256 ZoneGrowableArray<JoinEntryInstr*>* await_joins_; |
257 | 257 |
258 DISALLOW_IMPLICIT_CONSTRUCTORS(FlowGraphBuilder); | 258 DISALLOW_IMPLICIT_CONSTRUCTORS(FlowGraphBuilder); |
259 }; | 259 }; |
260 | 260 |
261 | 261 |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 // Output parameters. | 602 // Output parameters. |
603 GrowableArray<TargetEntryInstr**> true_successor_addresses_; | 603 GrowableArray<TargetEntryInstr**> true_successor_addresses_; |
604 GrowableArray<TargetEntryInstr**> false_successor_addresses_; | 604 GrowableArray<TargetEntryInstr**> false_successor_addresses_; |
605 | 605 |
606 intptr_t condition_token_pos_; | 606 intptr_t condition_token_pos_; |
607 }; | 607 }; |
608 | 608 |
609 } // namespace dart | 609 } // namespace dart |
610 | 610 |
611 #endif // VM_FLOW_GRAPH_BUILDER_H_ | 611 #endif // VM_FLOW_GRAPH_BUILDER_H_ |
OLD | NEW |