| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 library dart2js.ir_nodes; | 4 library dart2js.ir_nodes; |
| 5 | 5 |
| 6 import '../constants/expressions.dart'; | 6 import '../constants/expressions.dart'; |
| 7 import '../constants/values.dart' as values show ConstantValue; | 7 import '../constants/values.dart' as values show ConstantValue; |
| 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 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 accept(Visitor visitor) => visitor.visitSetField(this); | 609 accept(Visitor visitor) => visitor.visitSetField(this); |
| 610 } | 610 } |
| 611 | 611 |
| 612 /// Directly reads from a field on a given object. | 612 /// Directly reads from a field on a given object. |
| 613 /// | 613 /// |
| 614 /// The [object] must either be `null` or an object that has [field]. | 614 /// The [object] must either be `null` or an object that has [field]. |
| 615 class GetField extends Primitive { | 615 class GetField extends Primitive { |
| 616 final Reference<Primitive> object; | 616 final Reference<Primitive> object; |
| 617 FieldElement field; | 617 FieldElement field; |
| 618 | 618 |
| 619 /// True if the receiver is known not to be null. | 619 /// True if the object is known not to be null. |
| 620 // TODO(asgerf): This is a placeholder until we agree on how to track | 620 // TODO(asgerf): This is a placeholder until we agree on how to track |
| 621 // side effects. | 621 // side effects. |
| 622 bool objectIsNotNull = false; | 622 bool objectIsNotNull = false; |
| 623 | 623 |
| 624 GetField(Primitive object, this.field) | 624 GetField(Primitive object, this.field) |
| 625 : this.object = new Reference<Primitive>(object); | 625 : this.object = new Reference<Primitive>(object); |
| 626 | 626 |
| 627 accept(Visitor visitor) => visitor.visitGetField(this); | 627 accept(Visitor visitor) => visitor.visitGetField(this); |
| 628 | 628 |
| 629 @override | 629 @override |
| (...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1271 const RemovalVisitor(); | 1271 const RemovalVisitor(); |
| 1272 | 1272 |
| 1273 processReference(Reference reference) { | 1273 processReference(Reference reference) { |
| 1274 reference.unlink(); | 1274 reference.unlink(); |
| 1275 } | 1275 } |
| 1276 | 1276 |
| 1277 static void remove(Node node) { | 1277 static void remove(Node node) { |
| 1278 (const RemovalVisitor()).visit(node); | 1278 (const RemovalVisitor()).visit(node); |
| 1279 } | 1279 } |
| 1280 } | 1280 } |
| OLD | NEW |