| 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 /// Discussion: | 262 /// Discussion: |
| 263 /// If the [selector] is a [TypedSelector], the type information contained | 263 /// If the [selector] is a [TypedSelector], the type information contained |
| 264 /// there is used by optimization passes. This is likely to change. | 264 /// there is used by optimization passes. This is likely to change. |
| 265 class InvokeMethod extends Expression implements Invoke { | 265 class InvokeMethod extends Expression implements Invoke { |
| 266 Reference<Primitive> receiver; | 266 Reference<Primitive> receiver; |
| 267 Selector selector; | 267 Selector selector; |
| 268 final List<Reference<Primitive>> arguments; | 268 final List<Reference<Primitive>> arguments; |
| 269 final Reference<Continuation> continuation; | 269 final Reference<Continuation> continuation; |
| 270 final SourceInformation sourceInformation; | 270 final SourceInformation sourceInformation; |
| 271 | 271 |
| 272 /// If true, it is known that the receiver cannot be `null`. |
| 273 /// |
| 274 /// This field is `null` until initialized by optimization phases. |
| 275 bool receiverIsNotNull; |
| 276 |
| 272 InvokeMethod(Primitive receiver, | 277 InvokeMethod(Primitive receiver, |
| 273 this.selector, | 278 this.selector, |
| 274 List<Primitive> arguments, | 279 List<Primitive> arguments, |
| 275 Continuation continuation, | 280 Continuation continuation, |
| 276 {this.sourceInformation}) | 281 {this.sourceInformation}) |
| 277 : this.receiver = new Reference<Primitive>(receiver), | 282 : this.receiver = new Reference<Primitive>(receiver), |
| 278 this.arguments = _referenceList(arguments), | 283 this.arguments = _referenceList(arguments), |
| 279 this.continuation = new Reference<Continuation>(continuation); | 284 this.continuation = new Reference<Continuation>(continuation); |
| 280 | 285 |
| 281 accept(Visitor visitor) => visitor.visitInvokeMethod(this); | 286 accept(Visitor visitor) => visitor.visitInvokeMethod(this); |
| (...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1165 processNonTailThrow(node); | 1170 processNonTailThrow(node); |
| 1166 processReference(node.value); | 1171 processReference(node.value); |
| 1167 } | 1172 } |
| 1168 | 1173 |
| 1169 processCreateInvocationMirror(CreateInvocationMirror node) {} | 1174 processCreateInvocationMirror(CreateInvocationMirror node) {} |
| 1170 visitCreateInvocationMirror(CreateInvocationMirror node) { | 1175 visitCreateInvocationMirror(CreateInvocationMirror node) { |
| 1171 processCreateInvocationMirror(node); | 1176 processCreateInvocationMirror(node); |
| 1172 node.arguments.forEach(processReference); | 1177 node.arguments.forEach(processReference); |
| 1173 } | 1178 } |
| 1174 } | 1179 } |
| OLD | NEW |