| 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.frontend_strategy; | 5 library dart2js.kernel.frontend_strategy; |
| 6 | 6 |
| 7 import '../closure.dart'; | 7 import '../closure.dart'; |
| 8 import '../common.dart'; | 8 import '../common.dart'; |
| 9 import '../common_elements.dart'; | 9 import '../common_elements.dart'; |
| 10 import '../common/backend_api.dart'; | 10 import '../common/backend_api.dart'; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 import '../native/resolver.dart'; | 30 import '../native/resolver.dart'; |
| 31 import '../options.dart'; | 31 import '../options.dart'; |
| 32 import '../serialization/task.dart'; | 32 import '../serialization/task.dart'; |
| 33 import '../patch_parser.dart'; | 33 import '../patch_parser.dart'; |
| 34 import '../resolved_uri_translator.dart'; | 34 import '../resolved_uri_translator.dart'; |
| 35 import '../universe/world_builder.dart'; | 35 import '../universe/world_builder.dart'; |
| 36 import '../universe/world_impact.dart'; | 36 import '../universe/world_impact.dart'; |
| 37 import '../world.dart'; | 37 import '../world.dart'; |
| 38 import 'element_map.dart'; | 38 import 'element_map.dart'; |
| 39 import 'element_map_impl.dart'; | 39 import 'element_map_impl.dart'; |
| 40 import 'kernel_backend_strategy.dart'; | |
| 41 | 40 |
| 42 /// Front end strategy that loads '.dill' files and builds a resolved element | 41 /// Front end strategy that loads '.dill' files and builds a resolved element |
| 43 /// model from kernel IR nodes. | 42 /// model from kernel IR nodes. |
| 44 class KernelFrontEndStrategy extends FrontendStrategyBase { | 43 class KernelFrontEndStrategy extends FrontendStrategyBase { |
| 45 CompilerOptions _options; | 44 CompilerOptions _options; |
| 46 KernelToElementMapForImpactImpl _elementMap; | 45 KernelToElementMapForImpactImpl _elementMap; |
| 47 | 46 |
| 48 KernelAnnotationProcessor _annotationProcesser; | 47 KernelAnnotationProcessor _annotationProcesser; |
| 49 | 48 |
| 50 KernelFrontEndStrategy( | 49 KernelFrontEndStrategy( |
| 51 this._options, DiagnosticReporter reporter, env.Environment environment) | 50 this._options, DiagnosticReporter reporter, env.Environment environment) |
| 52 : _elementMap = useJsStrategyForTesting | 51 : _elementMap = |
| 53 ? new KernelToElementMapForImpactImpl2(reporter, environment) | 52 new KernelToElementMapForImpactImpl(reporter, environment); |
| 54 : new KernelToElementMapImpl(reporter, environment); | |
| 55 | 53 |
| 56 @override | 54 @override |
| 57 LibraryLoaderTask createLibraryLoader( | 55 LibraryLoaderTask createLibraryLoader( |
| 58 ResolvedUriTranslator uriTranslator, | 56 ResolvedUriTranslator uriTranslator, |
| 59 ScriptLoader scriptLoader, | 57 ScriptLoader scriptLoader, |
| 60 ElementScanner scriptScanner, | 58 ElementScanner scriptScanner, |
| 61 LibraryDeserializer deserializer, | 59 LibraryDeserializer deserializer, |
| 62 PatchResolverFunction patchResolverFunc, | 60 PatchResolverFunction patchResolverFunc, |
| 63 PatchParserTask patchParser, | 61 PatchParserTask patchParser, |
| 64 env.Environment environment, | 62 env.Environment environment, |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 int get preMirrorsMethodCount { | 229 int get preMirrorsMethodCount { |
| 232 // TODO(redemption): Implement this. | 230 // TODO(redemption): Implement this. |
| 233 return null; | 231 return null; |
| 234 } | 232 } |
| 235 | 233 |
| 236 @override | 234 @override |
| 237 void onQueueEmpty(Enqueuer enqueuer, Iterable<ClassEntity> recentClasses) { | 235 void onQueueEmpty(Enqueuer enqueuer, Iterable<ClassEntity> recentClasses) { |
| 238 // TODO(redemption): Implement this. | 236 // TODO(redemption): Implement this. |
| 239 } | 237 } |
| 240 } | 238 } |
| OLD | NEW |