| 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 part of ssa; | 5 part of ssa; |
| 6 | 6 |
| 7 abstract class HVisitor<R> { | 7 abstract class HVisitor<R> { |
| 8 R visitAdd(HAdd node); | 8 R visitAdd(HAdd node); |
| 9 R visitBailoutTarget(HBailoutTarget node); | 9 R visitBailoutTarget(HBailoutTarget node); |
| 10 R visitBitAnd(HBitAnd node); | 10 R visitBitAnd(HBitAnd node); |
| (...skipping 1410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1421 } | 1421 } |
| 1422 | 1422 |
| 1423 HType computeDesiredTypeForNonTargetInput(HInstruction input, | 1423 HType computeDesiredTypeForNonTargetInput(HInstruction input, |
| 1424 HTypeMap types, | 1424 HTypeMap types, |
| 1425 Compiler compiler) { | 1425 Compiler compiler) { |
| 1426 return HType.UNKNOWN; | 1426 return HType.UNKNOWN; |
| 1427 } | 1427 } |
| 1428 } | 1428 } |
| 1429 | 1429 |
| 1430 class HInvokeSuper extends HInvokeStatic { | 1430 class HInvokeSuper extends HInvokeStatic { |
| 1431 final bool isSendSet; | 1431 final bool isSetter; |
| 1432 final bool isPropertyAccess; | 1432 HInvokeSuper(inputs, {this.isSetter: false}) : super(inputs); |
| 1433 HInvokeSuper(inputs, {this.isSendSet: false, this.isPropertyAccess: false}) | |
| 1434 : super(inputs); | |
| 1435 toString() => 'invoke super: ${element.name}'; | 1433 toString() => 'invoke super: ${element.name}'; |
| 1436 accept(HVisitor visitor) => visitor.visitInvokeSuper(this); | 1434 accept(HVisitor visitor) => visitor.visitInvokeSuper(this); |
| 1437 | 1435 |
| 1438 HInstruction get value { | 1436 HInstruction get value { |
| 1439 assert(isSendSet); | 1437 assert(isSetter); |
| 1440 // Index 0: the element, index 1: 'this'. | 1438 // Index 0: the element, index 1: 'this'. |
| 1441 return inputs[2]; | 1439 return inputs[2]; |
| 1442 } | 1440 } |
| 1443 } | 1441 } |
| 1444 | 1442 |
| 1445 abstract class HFieldAccess extends HInstruction { | 1443 abstract class HFieldAccess extends HInstruction { |
| 1446 final Element element; | 1444 final Element element; |
| 1447 | 1445 |
| 1448 HFieldAccess(Element element, List<HInstruction> inputs) | 1446 HFieldAccess(Element element, List<HInstruction> inputs) |
| 1449 : this.element = element, | 1447 : this.element = element, |
| (...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2952 HBasicBlock get start => expression.start; | 2950 HBasicBlock get start => expression.start; |
| 2953 HBasicBlock get end { | 2951 HBasicBlock get end { |
| 2954 // We don't create a switch block if there are no cases. | 2952 // We don't create a switch block if there are no cases. |
| 2955 assert(!statements.isEmpty); | 2953 assert(!statements.isEmpty); |
| 2956 return statements.last.end; | 2954 return statements.last.end; |
| 2957 } | 2955 } |
| 2958 | 2956 |
| 2959 bool accept(HStatementInformationVisitor visitor) => | 2957 bool accept(HStatementInformationVisitor visitor) => |
| 2960 visitor.visitSwitchInfo(this); | 2958 visitor.visitSwitchInfo(this); |
| 2961 } | 2959 } |
| OLD | NEW |