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 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
698 if (this === other) return true; | 698 if (this === other) return true; |
699 other = other.dominator; | 699 other = other.dominator; |
700 } while (other !== null && other.id >= id); | 700 } while (other !== null && other.id >= id); |
701 return false; | 701 return false; |
702 } | 702 } |
703 } | 703 } |
704 | 704 |
705 | 705 |
706 class HInstruction implements Hashable { | 706 class HInstruction implements Hashable { |
707 Element sourceElement; | 707 Element sourceElement; |
708 Token sourceToken; | |
floitsch
2012/07/17 14:46:53
I'm not sure we should expose the position-type to
podivilov
2012/07/17 16:42:46
OK, let's declare it as "Token sourcePosition" for
| |
708 | 709 |
709 final int id; | 710 final int id; |
710 static int idCounter; | 711 static int idCounter; |
711 | 712 |
712 final List<HInstruction> inputs; | 713 final List<HInstruction> inputs; |
713 final List<HInstruction> usedBy; | 714 final List<HInstruction> usedBy; |
714 | 715 |
715 HBasicBlock block; | 716 HBasicBlock block; |
716 HInstruction previous = null; | 717 HInstruction previous = null; |
717 HInstruction next = null; | 718 HInstruction next = null; |
(...skipping 1943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2661 HBasicBlock get start() => expression.start; | 2662 HBasicBlock get start() => expression.start; |
2662 HBasicBlock get end() { | 2663 HBasicBlock get end() { |
2663 // We don't create a switch block if there are no cases. | 2664 // We don't create a switch block if there are no cases. |
2664 assert(!statements.isEmpty()); | 2665 assert(!statements.isEmpty()); |
2665 return statements.last().end; | 2666 return statements.last().end; |
2666 } | 2667 } |
2667 | 2668 |
2668 bool accept(HStatementInformationVisitor visitor) => | 2669 bool accept(HStatementInformationVisitor visitor) => |
2669 visitor.visitSwitchInfo(this); | 2670 visitor.visitSwitchInfo(this); |
2670 } | 2671 } |
OLD | NEW |