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 interface HVisitor<R> { | 5 interface HVisitor<R> { |
6 R visitAdd(HAdd node); | 6 R visitAdd(HAdd node); |
7 R visitBitAnd(HBitAnd node); | 7 R visitBitAnd(HBitAnd node); |
8 R visitBitNot(HBitNot node); | 8 R visitBitNot(HBitNot node); |
9 R visitBitOr(HBitOr node); | 9 R visitBitOr(HBitOr node); |
10 R visitBitXor(HBitXor node); | 10 R visitBitXor(HBitXor node); |
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 if (this === other) return true; | 697 if (this === other) return true; |
698 other = other.dominator; | 698 other = other.dominator; |
699 } while (other !== null && other.id >= id); | 699 } while (other !== null && other.id >= id); |
700 return false; | 700 return false; |
701 } | 701 } |
702 } | 702 } |
703 | 703 |
704 | 704 |
705 class HInstruction implements Hashable { | 705 class HInstruction implements Hashable { |
706 Element sourceElement; | 706 Element sourceElement; |
| 707 Token sourcePosition; |
707 | 708 |
708 final int id; | 709 final int id; |
709 static int idCounter; | 710 static int idCounter; |
710 | 711 |
711 final List<HInstruction> inputs; | 712 final List<HInstruction> inputs; |
712 final List<HInstruction> usedBy; | 713 final List<HInstruction> usedBy; |
713 | 714 |
714 HBasicBlock block; | 715 HBasicBlock block; |
715 HInstruction previous = null; | 716 HInstruction previous = null; |
716 HInstruction next = null; | 717 HInstruction next = null; |
(...skipping 1943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2660 HBasicBlock get start() => expression.start; | 2661 HBasicBlock get start() => expression.start; |
2661 HBasicBlock get end() { | 2662 HBasicBlock get end() { |
2662 // We don't create a switch block if there are no cases. | 2663 // We don't create a switch block if there are no cases. |
2663 assert(!statements.isEmpty()); | 2664 assert(!statements.isEmpty()); |
2664 return statements.last().end; | 2665 return statements.last().end; |
2665 } | 2666 } |
2666 | 2667 |
2667 bool accept(HStatementInformationVisitor visitor) => | 2668 bool accept(HStatementInformationVisitor visitor) => |
2668 visitor.visitSwitchInfo(this); | 2669 visitor.visitSwitchInfo(this); |
2669 } | 2670 } |
OLD | NEW |