| 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 'cps_ir_nodes_sexpr.dart'; | 8 import 'cps_ir_nodes_sexpr.dart'; |
| 9 import '../constants/values.dart' as values; | 9 import '../constants/values.dart' as values; |
| 10 import '../dart_types.dart' show DartType, InterfaceType, TypeVariableType; | 10 import '../dart_types.dart' show DartType, InterfaceType, TypeVariableType; |
| (...skipping 2080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2091 conditionRef.parent = this; | 2091 conditionRef.parent = this; |
| 2092 trueContinuationRef.parent = this; | 2092 trueContinuationRef.parent = this; |
| 2093 falseContinuationRef.parent = this; | 2093 falseContinuationRef.parent = this; |
| 2094 } | 2094 } |
| 2095 } | 2095 } |
| 2096 | 2096 |
| 2097 // ---------------------------------------------------------------------------- | 2097 // ---------------------------------------------------------------------------- |
| 2098 // UTILITY STUFF | 2098 // UTILITY STUFF |
| 2099 // ---------------------------------------------------------------------------- | 2099 // ---------------------------------------------------------------------------- |
| 2100 | 2100 |
| 2101 Reference<Primitive> _reference(Primitive definition) { | |
| 2102 return new Reference<Primitive>(definition); | |
| 2103 } | |
| 2104 | |
| 2105 Reference<Primitive> _optionalReference(Primitive definition) { | 2101 Reference<Primitive> _optionalReference(Primitive definition) { |
| 2106 return definition == null ? null : new Reference<Primitive>(definition); | 2102 return definition == null ? null : new Reference<Primitive>(definition); |
| 2107 } | 2103 } |
| 2108 | 2104 |
| 2109 List<Reference<Primitive>> _referenceList(Iterable<Primitive> definitions) { | 2105 List<Reference<Primitive>> _referenceList(Iterable<Primitive> definitions) { |
| 2110 return definitions.map((e) => new Reference<Primitive>(e)).toList(); | 2106 return definitions.map((e) => new Reference<Primitive>(e)).toList(); |
| 2111 } | 2107 } |
| 2112 | 2108 |
| 2113 Iterable<Primitive> _dereferenceList(List<Reference<Primitive>> references) { | 2109 Iterable<Primitive> _dereferenceList(List<Reference<Primitive>> references) { |
| 2114 return references.map((ref) => ref.definition); | 2110 return references.map((ref) => ref.definition); |
| (...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3118 _definitions.getCopy(node.conditionRef), | 3114 _definitions.getCopy(node.conditionRef), |
| 3119 _copies[node.trueContinuation], | 3115 _copies[node.trueContinuation], |
| 3120 _copies[node.falseContinuation], | 3116 _copies[node.falseContinuation], |
| 3121 node.sourceInformation)..isStrictCheck = node.isStrictCheck); | 3117 node.sourceInformation)..isStrictCheck = node.isStrictCheck); |
| 3122 } | 3118 } |
| 3123 | 3119 |
| 3124 visitUnreachable(Unreachable node) { | 3120 visitUnreachable(Unreachable node) { |
| 3125 plug(new Unreachable()); | 3121 plug(new Unreachable()); |
| 3126 } | 3122 } |
| 3127 } | 3123 } |
| OLD | NEW |