Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Unified Diff: pkg/front_end/lib/src/fasta/target_implementation.dart

Issue 2897683002: Move code for instantiating Invocation to Target. (Closed)
Patch Set: Rename vmTarget to targetInfo. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/kernel_target.dart ('k') | pkg/front_end/test/fasta/shaker_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/target_implementation.dart
diff --git a/pkg/front_end/lib/src/fasta/target_implementation.dart b/pkg/front_end/lib/src/fasta/target_implementation.dart
index 6c284568658a624a3b0bbefeccc63c031d72cd7f..fc39fce98b74b7ca271e39e9e62a1f15c7b89376 100644
--- a/pkg/front_end/lib/src/fasta/target_implementation.dart
+++ b/pkg/front_end/lib/src/fasta/target_implementation.dart
@@ -4,7 +4,7 @@
library fasta.target_implementation;
-import 'package:kernel/target/vm.dart' show VmTarget;
+import 'package:kernel/target/targets.dart' as backend show Target;
import 'builder/builder.dart' show Builder, ClassBuilder, LibraryBuilder;
@@ -25,11 +25,15 @@ import 'translate_uri.dart' show TranslateUri;
/// Provides the implementation details used by a loader for a target.
abstract class TargetImplementation extends Target {
final TranslateUri uriTranslator;
+
+ final backend.Target backendTarget;
+
Builder cachedCompileTimeError;
Builder cachedAbstractClassInstantiationError;
Builder cachedNativeAnnotation;
- TargetImplementation(Ticker ticker, this.uriTranslator) : super(ticker);
+ TargetImplementation(Ticker ticker, this.uriTranslator, this.backendTarget)
+ : super(ticker);
/// Creates a [LibraryBuilder] corresponding to [uri], if one doesn't exist
/// already.
@@ -79,7 +83,7 @@ abstract class TargetImplementation extends Target {
}
void loadExtraRequiredLibraries(Loader loader) {
- for (String uri in new VmTarget(null).extraRequiredLibraries) {
+ for (String uri in backendTarget.extraRequiredLibraries) {
loader.read(Uri.parse(uri));
}
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/kernel_target.dart ('k') | pkg/front_end/test/fasta/shaker_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698