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/expressions.dart'; | 7 import '../constants/expressions.dart'; |
8 import '../constants/values.dart' as values; | 8 import '../constants/values.dart' as values; |
9 import '../dart_types.dart' show DartType, InterfaceType, TypeVariableType; | 9 import '../dart_types.dart' show DartType, InterfaceType, TypeVariableType; |
10 import '../elements/elements.dart'; | 10 import '../elements/elements.dart'; |
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 | 688 |
689 accept(ExpressionVisitor visitor) => visitor.visitCreateInstance(this); | 689 accept(ExpressionVisitor visitor) => visitor.visitCreateInstance(this); |
690 accept1(ExpressionVisitor1 visitor, arg) { | 690 accept1(ExpressionVisitor1 visitor, arg) { |
691 return visitor.visitCreateInstance(this, arg); | 691 return visitor.visitCreateInstance(this, arg); |
692 } | 692 } |
693 } | 693 } |
694 | 694 |
695 class GetField extends Expression { | 695 class GetField extends Expression { |
696 Expression object; | 696 Expression object; |
697 Element field; | 697 Element field; |
| 698 bool objectIsNotNull; |
698 | 699 |
699 GetField(this.object, this.field); | 700 GetField(this.object, this.field, {this.objectIsNotNull: false}); |
700 | 701 |
701 accept(ExpressionVisitor visitor) => visitor.visitGetField(this); | 702 accept(ExpressionVisitor visitor) => visitor.visitGetField(this); |
702 accept1(ExpressionVisitor1 visitor, arg) => visitor.visitGetField(this, arg); | 703 accept1(ExpressionVisitor1 visitor, arg) => visitor.visitGetField(this, arg); |
703 } | 704 } |
704 | 705 |
705 class SetField extends Expression { | 706 class SetField extends Expression { |
706 Expression object; | 707 Expression object; |
707 Element field; | 708 Element field; |
708 Expression value; | 709 Expression value; |
709 | 710 |
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1452 | 1453 |
1453 /// Number of uses of the current fallthrough target. | 1454 /// Number of uses of the current fallthrough target. |
1454 int get useCount => _stack.last.useCount; | 1455 int get useCount => _stack.last.useCount; |
1455 | 1456 |
1456 /// Indicate that a statement will fall through to the current fallthrough | 1457 /// Indicate that a statement will fall through to the current fallthrough |
1457 /// target. | 1458 /// target. |
1458 void use() { | 1459 void use() { |
1459 ++_stack.last.useCount; | 1460 ++_stack.last.useCount; |
1460 } | 1461 } |
1461 } | 1462 } |
OLD | NEW |