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.frontend_strategy; | 5 library dart2js.frontend_strategy; |
6 | 6 |
| 7 import '../compiler_new.dart' as api; |
7 import 'common.dart'; | 8 import 'common.dart'; |
8 import 'common_elements.dart'; | 9 import 'common_elements.dart'; |
9 import 'common/backend_api.dart'; | 10 import 'common/backend_api.dart'; |
10 import 'common/tasks.dart'; | 11 import 'common/tasks.dart'; |
11 import 'elements/entities.dart'; | 12 import 'elements/entities.dart'; |
12 import 'elements/types.dart'; | 13 import 'elements/types.dart'; |
13 import 'environment.dart'; | 14 import 'environment.dart'; |
14 import 'enqueue.dart'; | 15 import 'enqueue.dart'; |
15 import 'js_backend/backend.dart'; | 16 import 'js_backend/backend.dart'; |
16 import 'js_backend/backend_usage.dart'; | 17 import 'js_backend/backend_usage.dart'; |
(...skipping 12 matching lines...) Expand all Loading... |
29 import 'universe/world_builder.dart'; | 30 import 'universe/world_builder.dart'; |
30 import 'universe/world_impact.dart'; | 31 import 'universe/world_impact.dart'; |
31 | 32 |
32 /// Strategy pattern that defines the connection between the input format and | 33 /// Strategy pattern that defines the connection between the input format and |
33 /// the resolved element model. | 34 /// the resolved element model. |
34 abstract class FrontendStrategy { | 35 abstract class FrontendStrategy { |
35 /// Creates library loader task for this strategy. | 36 /// Creates library loader task for this strategy. |
36 LibraryLoaderTask createLibraryLoader( | 37 LibraryLoaderTask createLibraryLoader( |
37 ResolvedUriTranslator uriTranslator, | 38 ResolvedUriTranslator uriTranslator, |
38 ScriptLoader scriptLoader, | 39 ScriptLoader scriptLoader, |
| 40 api.CompilerInput compilerInput, |
39 ElementScanner scriptScanner, | 41 ElementScanner scriptScanner, |
40 LibraryDeserializer deserializer, | 42 LibraryDeserializer deserializer, |
41 PatchResolverFunction patchResolverFunc, | 43 PatchResolverFunction patchResolverFunc, |
42 PatchParserTask patchParser, | 44 PatchParserTask patchParser, |
43 Environment environment, | 45 Environment environment, |
44 DiagnosticReporter reporter, | 46 DiagnosticReporter reporter, |
45 Measurer measurer); | 47 Measurer measurer); |
46 | 48 |
47 /// Returns the [ElementEnvironment] for the element model used in this | 49 /// Returns the [ElementEnvironment] for the element model used in this |
48 /// strategy. | 50 /// strategy. |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 if (_nativeBasicData == null) { | 128 if (_nativeBasicData == null) { |
127 _nativeBasicData = nativeBasicDataBuilder.close(elementEnvironment); | 129 _nativeBasicData = nativeBasicDataBuilder.close(elementEnvironment); |
128 assert( | 130 assert( |
129 _nativeBasicData != null, | 131 _nativeBasicData != null, |
130 failedAt(NO_LOCATION_SPANNABLE, | 132 failedAt(NO_LOCATION_SPANNABLE, |
131 "NativeBasicData has not been computed yet.")); | 133 "NativeBasicData has not been computed yet.")); |
132 } | 134 } |
133 return _nativeBasicData; | 135 return _nativeBasicData; |
134 } | 136 } |
135 } | 137 } |
OLD | NEW |