Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 fasta.target_implementation; | 5 library fasta.target_implementation; |
| 6 | 6 |
| 7 import 'package:kernel/target/vm.dart' show VmTarget; | 7 import 'package:kernel/target/vm.dart' show VmTarget; |
| 8 | 8 |
| 9 import 'builder/builder.dart' show Builder, ClassBuilder, LibraryBuilder; | 9 import 'builder/builder.dart' show Builder, ClassBuilder, LibraryBuilder; |
| 10 | 10 |
| 11 import 'loader.dart' show Loader; | 11 import 'loader.dart' show Loader; |
| 12 | 12 |
| 13 import 'target.dart' show Target; | 13 import 'target.dart' show Target; |
| 14 | 14 |
| 15 import 'ticker.dart' show Ticker; | 15 import 'ticker.dart' show Ticker; |
| 16 | 16 |
| 17 import 'translate_uri.dart' show TranslateUri; | 17 import 'translate_uri.dart' show TranslateUri; |
| 18 | 18 |
| 19 /// Provides the implementation details used by a loader for a target. | 19 /// Provides the implementation details used by a loader for a target. |
| 20 abstract class TargetImplementation extends Target { | 20 abstract class TargetImplementation extends Target { |
| 21 final TranslateUri uriTranslator; | 21 final TranslateUri uriTranslator; |
| 22 final bool strongMode; | |
|
ahe
2017/04/20 08:36:42
Why is this needed?
Paul Berry
2017/04/20 08:55:29
Moved to KernelTarget, as we discussed.
| |
| 22 Builder cachedCompileTimeError; | 23 Builder cachedCompileTimeError; |
| 23 Builder cachedAbstractClassInstantiationError; | 24 Builder cachedAbstractClassInstantiationError; |
| 24 Builder cachedNativeAnnotation; | 25 Builder cachedNativeAnnotation; |
| 25 | 26 |
| 26 TargetImplementation(Ticker ticker, this.uriTranslator) : super(ticker); | 27 TargetImplementation(Ticker ticker, this.uriTranslator, this.strongMode) |
| 28 : super(ticker); | |
| 27 | 29 |
| 28 /// Creates a [LibraryBuilder] corresponding to [uri], if one doesn't exist | 30 /// Creates a [LibraryBuilder] corresponding to [uri], if one doesn't exist |
| 29 /// already. | 31 /// already. |
| 30 LibraryBuilder createLibraryBuilder(Uri uri, Uri fileUri); | 32 LibraryBuilder createLibraryBuilder(Uri uri, Uri fileUri); |
| 31 | 33 |
| 32 /// Add the classes extended or implemented directly by [cls] to [set]. | 34 /// Add the classes extended or implemented directly by [cls] to [set]. |
| 33 void addDirectSupertype(ClassBuilder cls, Set<ClassBuilder> set); | 35 void addDirectSupertype(ClassBuilder cls, Set<ClassBuilder> set); |
| 34 | 36 |
| 35 /// Returns all classes that will be included in the resulting program. | 37 /// Returns all classes that will be included in the resulting program. |
| 36 List<ClassBuilder> collectAllClasses(); | 38 List<ClassBuilder> collectAllClasses(); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 74 | 76 |
| 75 void loadExtraRequiredLibraries(Loader loader) { | 77 void loadExtraRequiredLibraries(Loader loader) { |
| 76 for (String uri in new VmTarget(null).extraRequiredLibraries) { | 78 for (String uri in new VmTarget(null).extraRequiredLibraries) { |
| 77 loader.read(Uri.parse(uri)); | 79 loader.read(Uri.parse(uri)); |
| 78 } | 80 } |
| 79 } | 81 } |
| 80 | 82 |
| 81 void addSourceInformation( | 83 void addSourceInformation( |
| 82 Uri uri, List<int> lineStarts, List<int> sourceCode); | 84 Uri uri, List<int> lineStarts, List<int> sourceCode); |
| 83 } | 85 } |
| OLD | NEW |