| 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 'cps_fragment.dart' show CpsFragment; | 7 import 'cps_fragment.dart' show CpsFragment; |
| 8 import '../constants/values.dart' as values; | 8 import '../constants/values.dart' as values; |
| 9 import '../dart_types.dart' show DartType, InterfaceType, TypeVariableType; | 9 import '../dart_types.dart' show DartType, InterfaceType, TypeVariableType; |
| 10 import '../elements/elements.dart'; | 10 import '../elements/elements.dart'; |
| (...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 | 582 |
| 583 Primitive dartArgument(int n) => dartArgumentReference(n).definition; | 583 Primitive dartArgument(int n) => dartArgumentReference(n).definition; |
| 584 | 584 |
| 585 /// If true, it is known that the receiver cannot be `null`. | 585 /// If true, it is known that the receiver cannot be `null`. |
| 586 bool receiverIsNotNull = false; | 586 bool receiverIsNotNull = false; |
| 587 | 587 |
| 588 InvokeMethod(Primitive receiver, | 588 InvokeMethod(Primitive receiver, |
| 589 this.selector, | 589 this.selector, |
| 590 this.mask, | 590 this.mask, |
| 591 List<Primitive> arguments, | 591 List<Primitive> arguments, |
| 592 [this.sourceInformation]) | 592 {this.sourceInformation, |
| 593 this.callingConvention: CallingConvention.Normal}) |
| 593 : this.receiver = new Reference<Primitive>(receiver), | 594 : this.receiver = new Reference<Primitive>(receiver), |
| 594 this.arguments = _referenceList(arguments); | 595 this.arguments = _referenceList(arguments); |
| 595 | 596 |
| 596 InvokeMethod.byReference(this.receiver, | |
| 597 this.selector, | |
| 598 this.mask, | |
| 599 this.arguments, | |
| 600 this.sourceInformation); | |
| 601 | |
| 602 accept(Visitor visitor) => visitor.visitInvokeMethod(this); | 597 accept(Visitor visitor) => visitor.visitInvokeMethod(this); |
| 603 | 598 |
| 604 bool get hasValue => true; | 599 bool get hasValue => true; |
| 605 | 600 |
| 606 void setParentPointers() { | 601 void setParentPointers() { |
| 607 receiver.parent = this; | 602 receiver.parent = this; |
| 608 _setParentsOnList(arguments, this); | 603 _setParentsOnList(arguments, this); |
| 609 } | 604 } |
| 610 } | 605 } |
| 611 | 606 |
| (...skipping 1864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2476 visitContinuation(Continuation node) {} | 2471 visitContinuation(Continuation node) {} |
| 2477 | 2472 |
| 2478 Definition visitInvokeStatic(InvokeStatic node) { | 2473 Definition visitInvokeStatic(InvokeStatic node) { |
| 2479 return new InvokeStatic(node.target, node.selector, getList(node.arguments), | 2474 return new InvokeStatic(node.target, node.selector, getList(node.arguments), |
| 2480 node.sourceInformation); | 2475 node.sourceInformation); |
| 2481 } | 2476 } |
| 2482 | 2477 |
| 2483 Definition visitInvokeMethod(InvokeMethod node) { | 2478 Definition visitInvokeMethod(InvokeMethod node) { |
| 2484 return new InvokeMethod(getCopy(node.receiver), node.selector, node.mask, | 2479 return new InvokeMethod(getCopy(node.receiver), node.selector, node.mask, |
| 2485 getList(node.arguments), | 2480 getList(node.arguments), |
| 2486 node.sourceInformation); | 2481 sourceInformation: node.sourceInformation, |
| 2482 callingConvention: node.callingConvention); |
| 2487 } | 2483 } |
| 2488 | 2484 |
| 2489 Definition visitInvokeMethodDirectly(InvokeMethodDirectly node) { | 2485 Definition visitInvokeMethodDirectly(InvokeMethodDirectly node) { |
| 2490 return new InvokeMethodDirectly(getCopy(node.receiver), node.target, | 2486 return new InvokeMethodDirectly(getCopy(node.receiver), node.target, |
| 2491 node.selector, | 2487 node.selector, |
| 2492 getList(node.arguments), | 2488 getList(node.arguments), |
| 2493 node.sourceInformation); | 2489 node.sourceInformation); |
| 2494 } | 2490 } |
| 2495 | 2491 |
| 2496 Definition visitInvokeConstructor(InvokeConstructor node) { | 2492 Definition visitInvokeConstructor(InvokeConstructor node) { |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2788 plug(new Branch.loose(_definitions.getCopy(node.condition), | 2784 plug(new Branch.loose(_definitions.getCopy(node.condition), |
| 2789 _copies[node.trueContinuation.definition], | 2785 _copies[node.trueContinuation.definition], |
| 2790 _copies[node.falseContinuation.definition]) | 2786 _copies[node.falseContinuation.definition]) |
| 2791 ..isStrictCheck = node.isStrictCheck); | 2787 ..isStrictCheck = node.isStrictCheck); |
| 2792 } | 2788 } |
| 2793 | 2789 |
| 2794 visitUnreachable(Unreachable node) { | 2790 visitUnreachable(Unreachable node) { |
| 2795 plug(new Unreachable()); | 2791 plug(new Unreachable()); |
| 2796 } | 2792 } |
| 2797 } | 2793 } |
| OLD | NEW |