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

Unified Diff: pkg/compiler/lib/src/options.dart

Issue 2270473002: Add flag to dart2js to configure whether to use the kernel lowering. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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/compiler/lib/src/js_backend/backend.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/options.dart
diff --git a/pkg/compiler/lib/src/options.dart b/pkg/compiler/lib/src/options.dart
index 1c597ef8bfa86874e26066781c4cdd3054679752..0b5437069e0b5d552d916e39a1ad27d53157412a 100644
--- a/pkg/compiler/lib/src/options.dart
+++ b/pkg/compiler/lib/src/options.dart
@@ -221,6 +221,9 @@ class CompilerOptions implements DiagnosticOptions, ParserOptions {
/// Whether to generate code compliant with content security policy (CSP).
final bool useContentSecurityPolicy;
+ /// Whether to use kernel internally as part of compilation.
+ final bool useKernel;
+
/// When obfuscating for minification, whether to use the frequency of a name
/// as an heuristic to pick shorter names.
final bool useFrequencyNamer;
@@ -318,6 +321,7 @@ class CompilerOptions implements DiagnosticOptions, ParserOptions {
trustTypeAnnotations: _hasOption(options, Flags.trustTypeAnnotations),
useContentSecurityPolicy:
_hasOption(options, Flags.useContentSecurityPolicy),
+ useKernel: _hasOption(options, Flags.useKernel),
useFrequencyNamer:
!_hasOption(options, Flags.noFrequencyBasedMinification),
useNewSourceInfo: _hasOption(options, Flags.useNewSourceInfo),
@@ -378,6 +382,7 @@ class CompilerOptions implements DiagnosticOptions, ParserOptions {
bool trustPrimitives: false,
bool trustTypeAnnotations: false,
bool useContentSecurityPolicy: false,
+ bool useKernel: false,
bool useFrequencyNamer: true,
bool useNewSourceInfo: false,
bool useStartupEmitter: false,
@@ -450,6 +455,7 @@ class CompilerOptions implements DiagnosticOptions, ParserOptions {
trustPrimitives: trustPrimitives,
trustTypeAnnotations: trustTypeAnnotations,
useContentSecurityPolicy: useContentSecurityPolicy,
+ useKernel: useKernel,
useFrequencyNamer: useFrequencyNamer,
useNewSourceInfo: useNewSourceInfo,
useStartupEmitter: useStartupEmitter,
@@ -500,6 +506,7 @@ class CompilerOptions implements DiagnosticOptions, ParserOptions {
this.trustPrimitives: false,
this.trustTypeAnnotations: false,
this.useContentSecurityPolicy: false,
+ this.useKernel: false,
this.useFrequencyNamer: false,
this.useNewSourceInfo: false,
this.useStartupEmitter: false,
@@ -557,6 +564,7 @@ class CompilerOptions implements DiagnosticOptions, ParserOptions {
trustPrimitives,
trustTypeAnnotations,
useContentSecurityPolicy,
+ useKernel,
useFrequencyNamer,
useNewSourceInfo,
useStartupEmitter,
@@ -626,6 +634,7 @@ class CompilerOptions implements DiagnosticOptions, ParserOptions {
trustTypeAnnotations ?? options.trustTypeAnnotations,
useContentSecurityPolicy:
useContentSecurityPolicy ?? options.useContentSecurityPolicy,
+ useKernel: useKernel ?? options.useKernel,
useFrequencyNamer: useFrequencyNamer ?? options.useFrequencyNamer,
useNewSourceInfo: useNewSourceInfo ?? options.useNewSourceInfo,
useStartupEmitter: useStartupEmitter ?? options.useStartupEmitter,
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698