| 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 1423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1434 setAllSideEffects(); | 1434 setAllSideEffects(); |
| 1435 setDependsOnSomething(); | 1435 setDependsOnSomething(); |
| 1436 } | 1436 } |
| 1437 } | 1437 } |
| 1438 toString() => 'invoke dynamic setter: $selector'; | 1438 toString() => 'invoke dynamic setter: $selector'; |
| 1439 accept(HVisitor visitor) => visitor.visitInvokeDynamicSetter(this); | 1439 accept(HVisitor visitor) => visitor.visitInvokeDynamicSetter(this); |
| 1440 } | 1440 } |
| 1441 | 1441 |
| 1442 class HInvokeStatic extends HInvoke { | 1442 class HInvokeStatic extends HInvoke { |
| 1443 /** The first input must be the target. */ | 1443 /** The first input must be the target. */ |
| 1444 HInvokeStatic(inputs, [HType knownType = HType.UNKNOWN]) : super(inputs) { | 1444 HInvokeStatic(inputs, HType type) : super(inputs) { |
| 1445 guaranteedType = knownType; | 1445 guaranteedType = type; |
| 1446 } | 1446 } |
| 1447 | 1447 |
| 1448 toString() => 'invoke static: ${element.name}'; | 1448 toString() => 'invoke static: ${element.name}'; |
| 1449 accept(HVisitor visitor) => visitor.visitInvokeStatic(this); | 1449 accept(HVisitor visitor) => visitor.visitInvokeStatic(this); |
| 1450 int typeCode() => HInstruction.INVOKE_STATIC_TYPECODE; | 1450 int typeCode() => HInstruction.INVOKE_STATIC_TYPECODE; |
| 1451 Element get element => target.element; | 1451 Element get element => target.element; |
| 1452 HStatic get target => inputs[0]; | 1452 HStatic get target => inputs[0]; |
| 1453 } | 1453 } |
| 1454 | 1454 |
| 1455 class HInvokeSuper extends HInvokeStatic { | 1455 class HInvokeSuper extends HInvokeStatic { |
| 1456 final bool isSetter; | 1456 final bool isSetter; |
| 1457 HInvokeSuper(inputs, {this.isSetter: false}) : super(inputs); | 1457 HInvokeSuper(inputs, {this.isSetter: false}) : super(inputs, HType.UNKNOWN); |
| 1458 toString() => 'invoke super: ${element.name}'; | 1458 toString() => 'invoke super: ${element.name}'; |
| 1459 accept(HVisitor visitor) => visitor.visitInvokeSuper(this); | 1459 accept(HVisitor visitor) => visitor.visitInvokeSuper(this); |
| 1460 | 1460 |
| 1461 HInstruction get value { | 1461 HInstruction get value { |
| 1462 assert(isSetter); | 1462 assert(isSetter); |
| 1463 // Index 0: the element, index 1: 'this'. | 1463 // Index 0: the element, index 1: 'this'. |
| 1464 return inputs[2]; | 1464 return inputs[2]; |
| 1465 } | 1465 } |
| 1466 } | 1466 } |
| 1467 | 1467 |
| (...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2702 HBasicBlock get start => expression.start; | 2702 HBasicBlock get start => expression.start; |
| 2703 HBasicBlock get end { | 2703 HBasicBlock get end { |
| 2704 // We don't create a switch block if there are no cases. | 2704 // We don't create a switch block if there are no cases. |
| 2705 assert(!statements.isEmpty); | 2705 assert(!statements.isEmpty); |
| 2706 return statements.last.end; | 2706 return statements.last.end; |
| 2707 } | 2707 } |
| 2708 | 2708 |
| 2709 bool accept(HStatementInformationVisitor visitor) => | 2709 bool accept(HStatementInformationVisitor visitor) => |
| 2710 visitor.visitSwitchInfo(this); | 2710 visitor.visitSwitchInfo(this); |
| 2711 } | 2711 } |
| OLD | NEW |