| 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 abstract class HVisitor<R> { | 5 abstract class HVisitor<R> { |
| 6 R visitAdd(HAdd node); | 6 R visitAdd(HAdd node); |
| 7 R visitBailoutTarget(HBailoutTarget node); | 7 R visitBailoutTarget(HBailoutTarget node); |
| 8 R visitBitAnd(HBitAnd node); | 8 R visitBitAnd(HBitAnd node); |
| 9 R visitBitNot(HBitNot node); | 9 R visitBitNot(HBitNot node); |
| 10 R visitBitOr(HBitOr node); | 10 R visitBitOr(HBitOr node); |
| (...skipping 1539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1550 bool isJsStatement(HTypeMap types) => true; | 1550 bool isJsStatement(HTypeMap types) => true; |
| 1551 String toString() => "FieldSet $element"; | 1551 String toString() => "FieldSet $element"; |
| 1552 } | 1552 } |
| 1553 | 1553 |
| 1554 class HLocalGet extends HFieldGet { | 1554 class HLocalGet extends HFieldGet { |
| 1555 HLocalGet(Element element, HLocalValue local) : super(element, local); | 1555 HLocalGet(Element element, HLocalValue local) : super(element, local); |
| 1556 | 1556 |
| 1557 accept(HVisitor visitor) => visitor.visitLocalGet(this); | 1557 accept(HVisitor visitor) => visitor.visitLocalGet(this); |
| 1558 | 1558 |
| 1559 HLocalValue get local => inputs[0]; | 1559 HLocalValue get local => inputs[0]; |
| 1560 |
| 1561 void prepareGvn(HTypeMap types) { |
| 1562 // No need to use GVN for a [HLocalGet], it is just a local |
| 1563 // access. |
| 1564 clearAllSideEffects(); |
| 1565 } |
| 1560 } | 1566 } |
| 1561 | 1567 |
| 1562 class HLocalSet extends HFieldSet { | 1568 class HLocalSet extends HFieldSet { |
| 1563 HLocalSet(Element element, HLocalValue local, HInstruction value) | 1569 HLocalSet(Element element, HLocalValue local, HInstruction value) |
| 1564 : super(element, local, value); | 1570 : super(element, local, value); |
| 1565 | 1571 |
| 1566 accept(HVisitor visitor) => visitor.visitLocalSet(this); | 1572 accept(HVisitor visitor) => visitor.visitLocalSet(this); |
| 1567 | 1573 |
| 1568 HLocalValue get local => inputs[0]; | 1574 HLocalValue get local => inputs[0]; |
| 1569 } | 1575 } |
| (...skipping 1402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2972 HBasicBlock get start => expression.start; | 2978 HBasicBlock get start => expression.start; |
| 2973 HBasicBlock get end { | 2979 HBasicBlock get end { |
| 2974 // We don't create a switch block if there are no cases. | 2980 // We don't create a switch block if there are no cases. |
| 2975 assert(!statements.isEmpty()); | 2981 assert(!statements.isEmpty()); |
| 2976 return statements.last().end; | 2982 return statements.last().end; |
| 2977 } | 2983 } |
| 2978 | 2984 |
| 2979 bool accept(HStatementInformationVisitor visitor) => | 2985 bool accept(HStatementInformationVisitor visitor) => |
| 2980 visitor.visitSwitchInfo(this); | 2986 visitor.visitSwitchInfo(this); |
| 2981 } | 2987 } |
| OLD | NEW |