| 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; |
| 11 import '../types/types.dart' show TypeMask; |
| 11 import '../universe/universe.dart' show Selector, SelectorKind; | 12 import '../universe/universe.dart' show Selector, SelectorKind; |
| 12 | 13 |
| 13 import 'builtin_operator.dart'; | 14 import 'builtin_operator.dart'; |
| 14 export 'builtin_operator.dart'; | 15 export 'builtin_operator.dart'; |
| 15 | 16 |
| 16 abstract class Node { | 17 abstract class Node { |
| 17 /// A pointer to the parent node. Is null until set by optimization passes. | 18 /// A pointer to the parent node. Is null until set by optimization passes. |
| 18 Node parent; | 19 Node parent; |
| 19 | 20 |
| 20 accept(Visitor visitor); | 21 accept(Visitor visitor); |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 /// | 264 /// |
| 264 /// The [selector] records the names of named arguments. The value of named | 265 /// The [selector] records the names of named arguments. The value of named |
| 265 /// arguments occur at the end of the [arguments] list, in normalized order. | 266 /// arguments occur at the end of the [arguments] list, in normalized order. |
| 266 /// | 267 /// |
| 267 /// Discussion: | 268 /// Discussion: |
| 268 /// If the [selector] is a [TypedSelector], the type information contained | 269 /// If the [selector] is a [TypedSelector], the type information contained |
| 269 /// there is used by optimization passes. This is likely to change. | 270 /// there is used by optimization passes. This is likely to change. |
| 270 class InvokeMethod extends Expression implements Invoke { | 271 class InvokeMethod extends Expression implements Invoke { |
| 271 Reference<Primitive> receiver; | 272 Reference<Primitive> receiver; |
| 272 Selector selector; | 273 Selector selector; |
| 274 TypeMask mask; |
| 273 final List<Reference<Primitive>> arguments; | 275 final List<Reference<Primitive>> arguments; |
| 274 final Reference<Continuation> continuation; | 276 final Reference<Continuation> continuation; |
| 275 final SourceInformation sourceInformation; | 277 final SourceInformation sourceInformation; |
| 276 | 278 |
| 277 /// If true, it is known that the receiver cannot be `null`. | 279 /// If true, it is known that the receiver cannot be `null`. |
| 278 /// | 280 /// |
| 279 /// This field is `null` until initialized by optimization phases. | 281 /// This field is `null` until initialized by optimization phases. |
| 280 bool receiverIsNotNull; | 282 bool receiverIsNotNull; |
| 281 | 283 |
| 282 InvokeMethod(Primitive receiver, | 284 InvokeMethod(Primitive receiver, |
| 283 this.selector, | 285 this.selector, |
| 286 this.mask, |
| 284 List<Primitive> arguments, | 287 List<Primitive> arguments, |
| 285 Continuation continuation, | 288 Continuation continuation, |
| 286 {this.sourceInformation}) | 289 {this.sourceInformation}) |
| 287 : this.receiver = new Reference<Primitive>(receiver), | 290 : this.receiver = new Reference<Primitive>(receiver), |
| 288 this.arguments = _referenceList(arguments), | 291 this.arguments = _referenceList(arguments), |
| 289 this.continuation = new Reference<Continuation>(continuation); | 292 this.continuation = new Reference<Continuation>(continuation); |
| 290 | 293 |
| 291 accept(Visitor visitor) => visitor.visitInvokeMethod(this); | 294 accept(Visitor visitor) => visitor.visitInvokeMethod(this); |
| 292 } | 295 } |
| 293 | 296 |
| (...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1256 const RemovalVisitor(); | 1259 const RemovalVisitor(); |
| 1257 | 1260 |
| 1258 processReference(Reference reference) { | 1261 processReference(Reference reference) { |
| 1259 reference.unlink(); | 1262 reference.unlink(); |
| 1260 } | 1263 } |
| 1261 | 1264 |
| 1262 static void remove(Node node) { | 1265 static void remove(Node node) { |
| 1263 (const RemovalVisitor()).visit(node); | 1266 (const RemovalVisitor()).visit(node); |
| 1264 } | 1267 } |
| 1265 } | 1268 } |
| OLD | NEW |