OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library tree_ir_nodes; | 5 library tree_ir_nodes; |
6 | 6 |
7 import '../constants/values.dart' as values; | 7 import '../constants/values.dart' as values; |
8 import '../dart_types.dart' show DartType, InterfaceType, TypeVariableType; | 8 import '../dart_types.dart' show DartType, InterfaceType, TypeVariableType; |
9 import '../elements/elements.dart'; | 9 import '../elements/elements.dart'; |
10 import '../io/source_information.dart' show SourceInformation; | 10 import '../io/source_information.dart' show SourceInformation; |
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
737 DartType dartType; | 737 DartType dartType; |
738 | 738 |
739 GetTypeTestProperty(this.object, this.dartType); | 739 GetTypeTestProperty(this.object, this.dartType); |
740 | 740 |
741 accept(ExpressionVisitor visitor) => | 741 accept(ExpressionVisitor visitor) => |
742 visitor.visitGetTypeTestProperty(this); | 742 visitor.visitGetTypeTestProperty(this); |
743 accept1(ExpressionVisitor1 visitor, arg) => | 743 accept1(ExpressionVisitor1 visitor, arg) => |
744 visitor.visitGetTypeTestProperty(this, arg); | 744 visitor.visitGetTypeTestProperty(this, arg); |
745 } | 745 } |
746 | 746 |
747 | |
748 /// Read the value of a field, possibly provoking its initializer to evaluate, | 747 /// Read the value of a field, possibly provoking its initializer to evaluate, |
749 /// or tear off a static method. | 748 /// or tear off a static method. |
750 class GetStatic extends Expression { | 749 class GetStatic extends Expression { |
751 Element element; | 750 Element element; |
752 SourceInformation sourceInformation; | 751 SourceInformation sourceInformation; |
| 752 bool useLazyGetter = false; |
753 | 753 |
754 GetStatic(this.element, this.sourceInformation); | 754 GetStatic(this.element, this.sourceInformation); |
755 | 755 |
| 756 GetStatic.lazy(this.element, this.sourceInformation) : useLazyGetter = true; |
| 757 |
756 accept(ExpressionVisitor visitor) => visitor.visitGetStatic(this); | 758 accept(ExpressionVisitor visitor) => visitor.visitGetStatic(this); |
757 accept1(ExpressionVisitor1 visitor, arg) => visitor.visitGetStatic(this, arg); | 759 accept1(ExpressionVisitor1 visitor, arg) => visitor.visitGetStatic(this, arg); |
758 } | 760 } |
759 | 761 |
760 class SetStatic extends Expression { | 762 class SetStatic extends Expression { |
761 Element element; | 763 Element element; |
762 Expression value; | 764 Expression value; |
763 SourceInformation sourceInformation; | 765 SourceInformation sourceInformation; |
764 | 766 |
765 SetStatic(this.element, this.value, this.sourceInformation); | 767 SetStatic(this.element, this.value, this.sourceInformation); |
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1600 | 1602 |
1601 /// Number of uses of the current fallthrough target. | 1603 /// Number of uses of the current fallthrough target. |
1602 int get useCount => _stack.last.useCount; | 1604 int get useCount => _stack.last.useCount; |
1603 | 1605 |
1604 /// Indicate that a statement will fall through to the current fallthrough | 1606 /// Indicate that a statement will fall through to the current fallthrough |
1605 /// target. | 1607 /// target. |
1606 void use() { | 1608 void use() { |
1607 ++_stack.last.useCount; | 1609 ++_stack.last.useCount; |
1608 } | 1610 } |
1609 } | 1611 } |
OLD | NEW |