| 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 2517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2528 return new InvokeMethodDirectly(getCopy(node.receiver), node.target, | 2528 return new InvokeMethodDirectly(getCopy(node.receiver), node.target, |
| 2529 node.selector, | 2529 node.selector, |
| 2530 getList(node.arguments), | 2530 getList(node.arguments), |
| 2531 node.sourceInformation, | 2531 node.sourceInformation, |
| 2532 callingConvention: node.callingConvention); | 2532 callingConvention: node.callingConvention); |
| 2533 } | 2533 } |
| 2534 | 2534 |
| 2535 Definition visitInvokeConstructor(InvokeConstructor node) { | 2535 Definition visitInvokeConstructor(InvokeConstructor node) { |
| 2536 return new InvokeConstructor(node.dartType, node.target, node.selector, | 2536 return new InvokeConstructor(node.dartType, node.target, node.selector, |
| 2537 getList(node.arguments), | 2537 getList(node.arguments), |
| 2538 node.sourceInformation); | 2538 node.sourceInformation) |
| 2539 ..allocationSiteType = node.allocationSiteType; |
| 2539 } | 2540 } |
| 2540 | 2541 |
| 2541 Definition visitTypeCast(TypeCast node) { | 2542 Definition visitTypeCast(TypeCast node) { |
| 2542 return new TypeCast(getCopy(node.value), node.dartType, | 2543 return new TypeCast(getCopy(node.value), node.dartType, |
| 2543 getList(node.typeArguments)); | 2544 getList(node.typeArguments)); |
| 2544 } | 2545 } |
| 2545 | 2546 |
| 2546 Definition visitSetMutable(SetMutable node) { | 2547 Definition visitSetMutable(SetMutable node) { |
| 2547 return new SetMutable(getCopy(node.variable), getCopy(node.value)); | 2548 return new SetMutable(getCopy(node.variable), getCopy(node.value)); |
| 2548 } | 2549 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 2562 | 2563 |
| 2563 Definition visitAwait(Await node) { | 2564 Definition visitAwait(Await node) { |
| 2564 return new Await(getCopy(node.input)); | 2565 return new Await(getCopy(node.input)); |
| 2565 } | 2566 } |
| 2566 | 2567 |
| 2567 Definition visitYield(Yield node) { | 2568 Definition visitYield(Yield node) { |
| 2568 return new Yield(getCopy(node.input), node.hasStar); | 2569 return new Yield(getCopy(node.input), node.hasStar); |
| 2569 } | 2570 } |
| 2570 | 2571 |
| 2571 Definition visitLiteralList(LiteralList node) { | 2572 Definition visitLiteralList(LiteralList node) { |
| 2572 return new LiteralList(node.dartType, getList(node.values)); | 2573 return new LiteralList(node.dartType, getList(node.values)) |
| 2574 ..allocationSiteType = node.allocationSiteType; |
| 2573 } | 2575 } |
| 2574 | 2576 |
| 2575 Definition visitLiteralMap(LiteralMap node) { | 2577 Definition visitLiteralMap(LiteralMap node) { |
| 2576 List<LiteralMapEntry> entries = node.entries.map((LiteralMapEntry entry) { | 2578 List<LiteralMapEntry> entries = node.entries.map((LiteralMapEntry entry) { |
| 2577 return new LiteralMapEntry(getCopy(entry.key), getCopy(entry.value)); | 2579 return new LiteralMapEntry(getCopy(entry.key), getCopy(entry.value)); |
| 2578 }).toList(); | 2580 }).toList(); |
| 2579 return new LiteralMap(node.dartType, entries); | 2581 return new LiteralMap(node.dartType, entries); |
| 2580 } | 2582 } |
| 2581 | 2583 |
| 2582 Definition visitConstant(Constant node) { | 2584 Definition visitConstant(Constant node) { |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2830 plug(new Branch.loose(_definitions.getCopy(node.condition), | 2832 plug(new Branch.loose(_definitions.getCopy(node.condition), |
| 2831 _copies[node.trueContinuation.definition], | 2833 _copies[node.trueContinuation.definition], |
| 2832 _copies[node.falseContinuation.definition]) | 2834 _copies[node.falseContinuation.definition]) |
| 2833 ..isStrictCheck = node.isStrictCheck); | 2835 ..isStrictCheck = node.isStrictCheck); |
| 2834 } | 2836 } |
| 2835 | 2837 |
| 2836 visitUnreachable(Unreachable node) { | 2838 visitUnreachable(Unreachable node) { |
| 2837 plug(new Unreachable()); | 2839 plug(new Unreachable()); |
| 2838 } | 2840 } |
| 2839 } | 2841 } |
| OLD | NEW |