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 import '../closure.dart'; | 5 import '../closure.dart'; |
6 import '../common.dart'; | 6 import '../common.dart'; |
7 import '../common_elements.dart' show CommonElements; | 7 import '../common_elements.dart' show CommonElements; |
8 import '../compiler.dart' show Compiler; | 8 import '../compiler.dart' show Compiler; |
9 import '../constants/constant_system.dart'; | 9 import '../constants/constant_system.dart'; |
10 import '../constants/values.dart'; | 10 import '../constants/values.dart'; |
(...skipping 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1621 /// If this field is not `null`, this call is from an inlined constructor and | 1621 /// If this field is not `null`, this call is from an inlined constructor and |
1622 /// we have to register the instantiated type in the code generator. The | 1622 /// we have to register the instantiated type in the code generator. The |
1623 /// [instructionType] of this node is not enough, because we also need the | 1623 /// [instructionType] of this node is not enough, because we also need the |
1624 /// type arguments. See also [SsaFromAstMixin.currentInlinedInstantiations]. | 1624 /// type arguments. See also [SsaFromAstMixin.currentInlinedInstantiations]. |
1625 List<DartType> instantiatedTypes; | 1625 List<DartType> instantiatedTypes; |
1626 | 1626 |
1627 /// If this node creates a closure class, [callMethod] is the call method of | 1627 /// If this node creates a closure class, [callMethod] is the call method of |
1628 /// the closure class. | 1628 /// the closure class. |
1629 FunctionEntity callMethod; | 1629 FunctionEntity callMethod; |
1630 | 1630 |
1631 /// If this node creates a closure class, [closure] is the closurized local | |
1632 /// function. | |
1633 Local localFunction; | |
1634 | |
1635 HCreate(this.element, List<HInstruction> inputs, TypeMask type, | 1631 HCreate(this.element, List<HInstruction> inputs, TypeMask type, |
1636 {this.instantiatedTypes, | 1632 {this.instantiatedTypes, this.hasRtiInput: false, this.callMethod}) |
1637 this.hasRtiInput: false, | |
1638 this.callMethod, | |
1639 this.localFunction}) | |
1640 : super(inputs, type); | 1633 : super(inputs, type); |
1641 | 1634 |
1642 bool get isAllocation => true; | 1635 bool get isAllocation => true; |
1643 | 1636 |
1644 HInstruction get rtiInput { | 1637 HInstruction get rtiInput { |
1645 assert(hasRtiInput); | 1638 assert(hasRtiInput); |
1646 return inputs.last; | 1639 return inputs.last; |
1647 } | 1640 } |
1648 | 1641 |
1649 accept(HVisitor visitor) => visitor.visitCreate(this); | 1642 accept(HVisitor visitor) => visitor.visitCreate(this); |
(...skipping 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3544 // ignore: MISSING_RETURN | 3537 // ignore: MISSING_RETURN |
3545 String get kindAsString { | 3538 String get kindAsString { |
3546 switch (kind) { | 3539 switch (kind) { |
3547 case TypeInfoExpressionKind.COMPLETE: | 3540 case TypeInfoExpressionKind.COMPLETE: |
3548 return 'COMPLETE'; | 3541 return 'COMPLETE'; |
3549 case TypeInfoExpressionKind.INSTANCE: | 3542 case TypeInfoExpressionKind.INSTANCE: |
3550 return 'INSTANCE'; | 3543 return 'INSTANCE'; |
3551 } | 3544 } |
3552 } | 3545 } |
3553 } | 3546 } |
OLD | NEW |