| 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 RUNTIME_VM_FLOW_GRAPH_BUILDER_H_ | 5 #ifndef RUNTIME_VM_FLOW_GRAPH_BUILDER_H_ |
| 6 #define RUNTIME_VM_FLOW_GRAPH_BUILDER_H_ | 6 #define RUNTIME_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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 | 537 |
| 538 private: | 538 private: |
| 539 // Construct and concatenate a Branch instruction to this graph fragment. | 539 // Construct and concatenate a Branch instruction to this graph fragment. |
| 540 // Closes the fragment and sets the output parameters. | 540 // Closes the fragment and sets the output parameters. |
| 541 virtual void ReturnValue(Value* value); | 541 virtual void ReturnValue(Value* value); |
| 542 | 542 |
| 543 // Either merges the definition into a BranchInstr (Comparison, BooleanNegate) | 543 // Either merges the definition into a BranchInstr (Comparison, BooleanNegate) |
| 544 // or adds the definition to the graph and returns a use of its value. | 544 // or adds the definition to the graph and returns a use of its value. |
| 545 virtual void ReturnDefinition(Definition* definition); | 545 virtual void ReturnDefinition(Definition* definition); |
| 546 | 546 |
| 547 void MergeBranchWithComparison(ComparisonInstr* comp); | 547 void MergeBranchWithStrictCompare(StrictCompareInstr* comp); |
| 548 void MergeBranchWithNegate(BooleanNegateInstr* comp); | 548 void MergeBranchWithNegate(BooleanNegateInstr* comp); |
| 549 | 549 |
| 550 BlockEntryInstr* CreateSuccessorFor( | 550 BlockEntryInstr* CreateSuccessorFor( |
| 551 const GrowableArray<TargetEntryInstr**>& branches) const; | 551 const GrowableArray<TargetEntryInstr**>& branches) const; |
| 552 | 552 |
| 553 void ConnectBranchesTo(const GrowableArray<TargetEntryInstr**>& branches, | 553 void ConnectBranchesTo(const GrowableArray<TargetEntryInstr**>& branches, |
| 554 JoinEntryInstr* join) const; | 554 JoinEntryInstr* join) const; |
| 555 | 555 |
| 556 // Output parameters. | 556 // Output parameters. |
| 557 GrowableArray<TargetEntryInstr**> true_successor_addresses_; | 557 GrowableArray<TargetEntryInstr**> true_successor_addresses_; |
| 558 GrowableArray<TargetEntryInstr**> false_successor_addresses_; | 558 GrowableArray<TargetEntryInstr**> false_successor_addresses_; |
| 559 | 559 |
| 560 TokenPosition condition_token_pos_; | 560 TokenPosition condition_token_pos_; |
| 561 }; | 561 }; |
| 562 | 562 |
| 563 } // namespace dart | 563 } // namespace dart |
| 564 | 564 |
| 565 #endif // RUNTIME_VM_FLOW_GRAPH_BUILDER_H_ | 565 #endif // RUNTIME_VM_FLOW_GRAPH_BUILDER_H_ |
| OLD | NEW |