OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 | 4 |
5 library dart2js.kernel.backend_strategy; | 5 library dart2js.kernel.backend_strategy; |
6 | 6 |
7 import 'package:kernel/ast.dart' as ir; | 7 import 'package:kernel/ast.dart' as ir; |
8 | 8 |
9 import '../backend_strategy.dart'; | 9 import '../backend_strategy.dart'; |
10 import '../closure.dart'; | 10 import '../closure.dart'; |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 _compiler, | 179 _compiler, |
180 _elementMap, | 180 _elementMap, |
181 new KernelToTypeInferenceMapImpl(closedWorld), | 181 new KernelToTypeInferenceMapImpl(closedWorld), |
182 localsMap, | 182 localsMap, |
183 closedWorld, | 183 closedWorld, |
184 _compiler.codegenWorldBuilder, | 184 _compiler.codegenWorldBuilder, |
185 work.registry, | 185 work.registry, |
186 _compiler.backendStrategy.closureDataLookup, | 186 _compiler.backendStrategy.closureDataLookup, |
187 // TODO(redemption): Support these: | 187 // TODO(redemption): Support these: |
188 const SourceInformationBuilder(), | 188 const SourceInformationBuilder(), |
189 null, // Function node used as capture scope id. | 189 null); // Function node used as capture scope id. |
190 targetIsConstructorBody: false); | |
191 return builder.build(); | 190 return builder.build(); |
192 } | 191 } |
193 } | 192 } |
194 | 193 |
195 class KernelToTypeInferenceMapImpl implements KernelToTypeInferenceMap { | 194 class KernelToTypeInferenceMapImpl implements KernelToTypeInferenceMap { |
196 final ClosedWorld _closedWorld; | 195 final ClosedWorld _closedWorld; |
197 | 196 |
198 KernelToTypeInferenceMapImpl(this._closedWorld); | 197 KernelToTypeInferenceMapImpl(this._closedWorld); |
199 | 198 |
200 @override | 199 @override |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 Iterable<ClassEntity> sortClasses(Iterable<ClassEntity> classes) { | 316 Iterable<ClassEntity> sortClasses(Iterable<ClassEntity> classes) { |
318 return classes.toList() | 317 return classes.toList() |
319 ..sort((ClassEntity a, ClassEntity b) { | 318 ..sort((ClassEntity a, ClassEntity b) { |
320 int r = _compareLibraries(a.library, b.library); | 319 int r = _compareLibraries(a.library, b.library); |
321 if (r != 0) return r; | 320 if (r != 0) return r; |
322 return _compareNodes( | 321 return _compareNodes( |
323 a, elementMap.getClassNode(a), b, elementMap.getClassNode(b)); | 322 a, elementMap.getClassNode(a), b, elementMap.getClassNode(b)); |
324 }); | 323 }); |
325 } | 324 } |
326 } | 325 } |
OLD | NEW |