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