| 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 | 311 |
| 312 Value* BuildNullValue(); | 312 Value* BuildNullValue(); |
| 313 | 313 |
| 314 private: | 314 private: |
| 315 // Specify a definition of the final result. Adds the definition to | 315 // Specify a definition of the final result. Adds the definition to |
| 316 // the graph, but normally overridden in subclasses. | 316 // the graph, but normally overridden in subclasses. |
| 317 virtual void ReturnDefinition(Definition* definition) { | 317 virtual void ReturnDefinition(Definition* definition) { |
| 318 Do(definition); | 318 Do(definition); |
| 319 } | 319 } |
| 320 | 320 |
| 321 protected: |
| 321 // Returns true if the run-time type check can be eliminated. | 322 // Returns true if the run-time type check can be eliminated. |
| 322 bool CanSkipTypeCheck(intptr_t token_pos, | 323 bool CanSkipTypeCheck(intptr_t token_pos, |
| 323 Value* value, | 324 Value* value, |
| 324 const AbstractType& dst_type, | 325 const AbstractType& dst_type, |
| 325 const String& dst_name); | 326 const String& dst_name); |
| 326 | 327 |
| 328 private: |
| 327 // Shared global state. | 329 // Shared global state. |
| 328 FlowGraphBuilder* owner_; | 330 FlowGraphBuilder* owner_; |
| 329 | 331 |
| 330 // Input parameters. | 332 // Input parameters. |
| 331 intptr_t temp_index_; | 333 intptr_t temp_index_; |
| 332 | 334 |
| 333 // Output parameters. | 335 // Output parameters. |
| 334 Instruction* entry_; | 336 Instruction* entry_; |
| 335 Instruction* exit_; | 337 Instruction* exit_; |
| 336 }; | 338 }; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 // Output parameters. | 447 // Output parameters. |
| 446 GrowableArray<TargetEntryInstr**> true_successor_addresses_; | 448 GrowableArray<TargetEntryInstr**> true_successor_addresses_; |
| 447 GrowableArray<TargetEntryInstr**> false_successor_addresses_; | 449 GrowableArray<TargetEntryInstr**> false_successor_addresses_; |
| 448 | 450 |
| 449 intptr_t condition_token_pos_; | 451 intptr_t condition_token_pos_; |
| 450 }; | 452 }; |
| 451 | 453 |
| 452 } // namespace dart | 454 } // namespace dart |
| 453 | 455 |
| 454 #endif // VM_FLOW_GRAPH_BUILDER_H_ | 456 #endif // VM_FLOW_GRAPH_BUILDER_H_ |
| OLD | NEW |