| 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 'dart:collection'; | 6 import 'dart:collection'; |
| 7 import '../constants/values.dart' as values; | 7 import '../constants/values.dart' as values; |
| 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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 /// The [selector] records the names of named arguments. The value of named | 398 /// The [selector] records the names of named arguments. The value of named |
| 399 /// arguments occur at the end of the [arguments] list, in normalized order. | 399 /// arguments occur at the end of the [arguments] list, in normalized order. |
| 400 class InvokeMethod extends CallExpression { | 400 class InvokeMethod extends CallExpression { |
| 401 Reference<Primitive> receiver; | 401 Reference<Primitive> receiver; |
| 402 Selector selector; | 402 Selector selector; |
| 403 TypeMask mask; | 403 TypeMask mask; |
| 404 final List<Reference<Primitive>> arguments; | 404 final List<Reference<Primitive>> arguments; |
| 405 final Reference<Continuation> continuation; | 405 final Reference<Continuation> continuation; |
| 406 final SourceInformation sourceInformation; | 406 final SourceInformation sourceInformation; |
| 407 | 407 |
| 408 /// If true, the [receiver] is intercepted and the actual receiver is in |
| 409 /// the first argument. Otherwise, the [receiver] is the actual receiver. |
| 410 /// |
| 411 /// This flag is always false for non-intercepted selectors, but it may also |
| 412 /// be false for intercepted selectors after dummy receiver optimization |
| 413 /// (in this case the first argument is a dummy value). |
| 414 /// |
| 415 /// It is always false before the unsugaring pass, where interceptors have |
| 416 /// not yet been introduced. |
| 417 bool receiverIsIntercepted = false; |
| 418 |
| 408 /// If true, it is known that the receiver cannot be `null`. | 419 /// If true, it is known that the receiver cannot be `null`. |
| 409 bool receiverIsNotNull = false; | 420 bool receiverIsNotNull = false; |
| 410 | 421 |
| 411 InvokeMethod(Primitive receiver, | 422 InvokeMethod(Primitive receiver, |
| 412 this.selector, | 423 this.selector, |
| 413 this.mask, | 424 this.mask, |
| 414 List<Primitive> arguments, | 425 List<Primitive> arguments, |
| 415 Continuation continuation, | 426 Continuation continuation, |
| 416 [this.sourceInformation]) | 427 [this.sourceInformation]) |
| 417 : this.receiver = new Reference<Primitive>(receiver), | 428 : this.receiver = new Reference<Primitive>(receiver), |
| (...skipping 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1733 /// Visit a just-deleted subterm and unlink all [Reference]s in it. | 1744 /// Visit a just-deleted subterm and unlink all [Reference]s in it. |
| 1734 class RemovalVisitor extends RecursiveVisitor { | 1745 class RemovalVisitor extends RecursiveVisitor { |
| 1735 processReference(Reference reference) { | 1746 processReference(Reference reference) { |
| 1736 reference.unlink(); | 1747 reference.unlink(); |
| 1737 } | 1748 } |
| 1738 | 1749 |
| 1739 static void remove(Node node) { | 1750 static void remove(Node node) { |
| 1740 (new RemovalVisitor()).visit(node); | 1751 (new RemovalVisitor()).visit(node); |
| 1741 } | 1752 } |
| 1742 } | 1753 } |
| OLD | NEW |