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