| 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 | 210 |
| 211 Value* BuildNullValue(); | 211 Value* BuildNullValue(); |
| 212 | 212 |
| 213 private: | 213 private: |
| 214 // Specify a computation as the final result. Adds a Do instruction to | 214 // Specify a computation as the final result. Adds a Do instruction to |
| 215 // the graph, but normally overridden in subclasses. | 215 // the graph, but normally overridden in subclasses. |
| 216 virtual void ReturnComputation(Computation* computation) { | 216 virtual void ReturnComputation(Computation* computation) { |
| 217 Do(computation); | 217 Do(computation); |
| 218 } | 218 } |
| 219 | 219 |
| 220 // Returns true if the run-time type check can be eliminated. |
| 221 bool CanSkipTypeCheck(intptr_t token_pos, |
| 222 Value* value, |
| 223 const AbstractType& dst_type, |
| 224 const String& dst_name); |
| 225 |
| 220 // Shared global state. | 226 // Shared global state. |
| 221 FlowGraphBuilder* owner_; | 227 FlowGraphBuilder* owner_; |
| 222 | 228 |
| 223 // Input parameters. | 229 // Input parameters. |
| 224 intptr_t temp_index_; | 230 intptr_t temp_index_; |
| 225 | 231 |
| 226 // Output parameters. | 232 // Output parameters. |
| 227 Instruction* entry_; | 233 Instruction* entry_; |
| 228 Instruction* exit_; | 234 Instruction* exit_; |
| 229 }; | 235 }; |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 // Output parameters. | 330 // Output parameters. |
| 325 TargetEntryInstr** true_successor_address_; | 331 TargetEntryInstr** true_successor_address_; |
| 326 TargetEntryInstr** false_successor_address_; | 332 TargetEntryInstr** false_successor_address_; |
| 327 | 333 |
| 328 intptr_t condition_token_pos_; | 334 intptr_t condition_token_pos_; |
| 329 }; | 335 }; |
| 330 | 336 |
| 331 } // namespace dart | 337 } // namespace dart |
| 332 | 338 |
| 333 #endif // VM_FLOW_GRAPH_BUILDER_H_ | 339 #endif // VM_FLOW_GRAPH_BUILDER_H_ |
| OLD | NEW |