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

Unified Diff: pkg/compiler/lib/src/kernel/fasta_support.dart

Issue 2924833002: Pass a Target instance to DillTarget instead of its name (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | pkg/front_end/lib/kernel_generator.dart » ('j') | pkg/front_end/lib/src/fasta/fasta.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/kernel/fasta_support.dart
diff --git a/pkg/compiler/lib/src/kernel/fasta_support.dart b/pkg/compiler/lib/src/kernel/fasta_support.dart
index 04b4919eafd6923955e86432260ec1f72599c656..9fbe3f450314f8244f938f0a759529d7ba9df500 100644
--- a/pkg/compiler/lib/src/kernel/fasta_support.dart
+++ b/pkg/compiler/lib/src/kernel/fasta_support.dart
@@ -22,7 +22,7 @@ import 'package:front_end/file_system.dart';
import 'package:front_end/physical_file_system.dart';
import 'package:front_end/src/fasta/kernel/utils.dart';
import 'package:kernel/ast.dart' show Source, Library;
-import 'package:kernel/target/targets.dart' show TargetFlags;
+import 'package:kernel/target/targets.dart' show TargetFlags, NoneTarget;
import 'package:front_end/src/fasta/builder/builder.dart' show LibraryBuilder;
import 'package:front_end/src/fasta/compiler_context.dart' show CompilerContext;
@@ -139,9 +139,8 @@ class SourceLoaderForDart2js<L> extends SourceLoader<L> {
/// Specializes [DillTarget] to build kernel for dart2js: JS-specific libraries
/// are included in the SDK, and native clauses have no string parameter.
class DillTargetForDart2js extends DillTarget {
- DillTargetForDart2js(Ticker ticker, TranslateUri uriTranslator,
- {TargetFlags flags})
- : super(ticker, uriTranslator, "none", flags: flags);
+ DillTargetForDart2js(Ticker ticker, TranslateUri uriTranslator)
+ : super(ticker, uriTranslator, new NoneTarget(new TargetFlags()));
@override
Token skipNativeClause(Token token) => _skipNative(token);
« no previous file with comments | « no previous file | pkg/front_end/lib/kernel_generator.dart » ('j') | pkg/front_end/lib/src/fasta/fasta.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698