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

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

Issue 2913013003: Move enableNative to target, turn it on by default (Closed)
Patch Set: cl comments + rebase 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 | « no previous file | pkg/front_end/lib/src/fasta/kernel/body_builder.dart » ('j') | no next file with comments »
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 16fc8da72ee23c46d95721e794a00c90eb48beaf..9d6a90fa50609303fdb762373115a3beadd8e083 100644
--- a/pkg/compiler/lib/src/kernel/fasta_support.dart
+++ b/pkg/compiler/lib/src/kernel/fasta_support.dart
@@ -22,6 +22,8 @@ import 'package:front_end/physical_file_system.dart';
import 'package:front_end/src/fasta/kernel/utils.dart';
import 'package:kernel/ast.dart' show Source;
+import 'package:front_end/src/fasta/builder/library_builder.dart'
+ show LibraryBuilder;
import 'package:front_end/src/fasta/compiler_context.dart' show CompilerContext;
import 'package:front_end/src/fasta/dill/dill_target.dart' show DillTarget;
import 'package:front_end/src/fasta/fasta.dart' show CompileTask;
@@ -33,6 +35,8 @@ import 'package:front_end/src/scanner/token.dart' show Token;
import 'package:front_end/src/fasta/ticker.dart' show Ticker;
import 'package:front_end/src/fasta/translate_uri.dart' show TranslateUri;
+import 'package:compiler/src/native/native.dart' show maybeEnableNative;
+
/// Generates a platform.dill file containing the compiled Kernel IR of the
/// dart2js SDK.
Future compilePlatform(Uri patchedSdk, Uri fullOutput,
@@ -86,6 +90,9 @@ class KernelTargetForDart2js extends KernelTarget {
: super(PhysicalFileSystem.instance, target, uriTranslator, strongMode,
uriToSource);
+ @override
+ bool enableNative(LibraryBuilder library) => maybeEnableNative(library.uri);
+
@override
Token skipNativeClause(Token token) => _skipNative(token);
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/kernel/body_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698