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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 HGraph build(CodegenWorkItem work, ClosedWorld closedWorld) { | 131 HGraph build(CodegenWorkItem work, ClosedWorld closedWorld) { |
132 KernelSsaBuilder builder = new KernelSsaBuilder( | 132 KernelSsaBuilder builder = new KernelSsaBuilder( |
133 work.element, | 133 work.element, |
134 work.element.enclosingClass, | 134 work.element.enclosingClass, |
135 _elementMap.getMemberNode(work.element), | 135 _elementMap.getMemberNode(work.element), |
136 _compiler, | 136 _compiler, |
137 _elementMap, | 137 _elementMap, |
138 new KernelToTypeInferenceMapImpl(closedWorld), | 138 new KernelToTypeInferenceMapImpl(closedWorld), |
139 new KernelToLocalsMapImpl(work.element), | 139 new KernelToLocalsMapImpl(work.element), |
140 closedWorld, | 140 closedWorld, |
| 141 _compiler.codegenWorldBuilder, |
141 work.registry, | 142 work.registry, |
142 // TODO(johnniwinther): Support these: | 143 // TODO(johnniwinther): Support these: |
143 const KernelClosureClassMaps(), | 144 const KernelClosureClassMaps(), |
144 const SourceInformationBuilder(), | 145 const SourceInformationBuilder(), |
145 null, // Function node used as capture scope id. | 146 null, // Function node used as capture scope id. |
146 targetIsConstructorBody: false); | 147 targetIsConstructorBody: false); |
147 return builder.build(); | 148 return builder.build(); |
148 } | 149 } |
149 } | 150 } |
150 | 151 |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 Iterable<ClassEntity> sortClasses(Iterable<ClassEntity> classes) { | 347 Iterable<ClassEntity> sortClasses(Iterable<ClassEntity> classes) { |
347 return classes.toList() | 348 return classes.toList() |
348 ..sort((ClassEntity a, ClassEntity b) { | 349 ..sort((ClassEntity a, ClassEntity b) { |
349 int r = _compareLibraries(a.library, b.library); | 350 int r = _compareLibraries(a.library, b.library); |
350 if (r != 0) return r; | 351 if (r != 0) return r; |
351 return _compareNodes( | 352 return _compareNodes( |
352 a, elementMap.getClassNode(a), b, elementMap.getClassNode(b)); | 353 a, elementMap.getClassNode(a), b, elementMap.getClassNode(b)); |
353 }); | 354 }); |
354 } | 355 } |
355 } | 356 } |
OLD | NEW |