OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_INTERMEDIATE_LANGUAGE_H_ | 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ |
6 #define VM_INTERMEDIATE_LANGUAGE_H_ | 6 #define VM_INTERMEDIATE_LANGUAGE_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 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 | 653 |
654 Instruction* previous() const { return previous_; } | 654 Instruction* previous() const { return previous_; } |
655 void set_previous(Instruction* instr) { | 655 void set_previous(Instruction* instr) { |
656 ASSERT(!IsBlockEntry()); | 656 ASSERT(!IsBlockEntry()); |
657 previous_ = instr; | 657 previous_ = instr; |
658 } | 658 } |
659 | 659 |
660 Instruction* next() const { return next_; } | 660 Instruction* next() const { return next_; } |
661 void set_next(Instruction* instr) { | 661 void set_next(Instruction* instr) { |
662 ASSERT(!IsGraphEntry()); | 662 ASSERT(!IsGraphEntry()); |
663 ASSERT(!IsReturn()); | |
664 ASSERT(!IsBranch() || (instr == NULL)); | 663 ASSERT(!IsBranch() || (instr == NULL)); |
665 ASSERT(!IsPhi()); | 664 ASSERT(!IsPhi()); |
666 ASSERT(instr == NULL || !instr->IsBlockEntry()); | 665 ASSERT(instr == NULL || !instr->IsBlockEntry()); |
667 // TODO(fschneider): Also add Throw and ReThrow to the list of instructions | 666 // TODO(fschneider): Also add Throw and ReThrow to the list of instructions |
668 // that do not have a successor. Currently, the graph builder will continue | 667 // that do not have a successor. Currently, the graph builder will continue |
669 // to append instruction in case of a Throw inside an expression. This | 668 // to append instructions in case of a Throw inside an expression. This |
670 // condition should be handled in the graph builder | 669 // condition should be handled in the graph builder. |
| 670 // Note: there can be instructions after a return statement if the |
| 671 // return is a "continuation return" in asynchronous code. |
671 next_ = instr; | 672 next_ = instr; |
672 } | 673 } |
673 | 674 |
674 // Link together two instruction. | 675 // Link together two instruction. |
675 void LinkTo(Instruction* next) { | 676 void LinkTo(Instruction* next) { |
676 ASSERT(this != next); | 677 ASSERT(this != next); |
677 this->set_next(next); | 678 this->set_next(next); |
678 next->set_previous(this); | 679 next->set_previous(this); |
679 } | 680 } |
680 | 681 |
(...skipping 7730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8411 Isolate* isolate, bool opt) const { \ | 8412 Isolate* isolate, bool opt) const { \ |
8412 UNIMPLEMENTED(); \ | 8413 UNIMPLEMENTED(); \ |
8413 return NULL; \ | 8414 return NULL; \ |
8414 } \ | 8415 } \ |
8415 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 8416 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
8416 | 8417 |
8417 | 8418 |
8418 } // namespace dart | 8419 } // namespace dart |
8419 | 8420 |
8420 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 8421 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
OLD | NEW |