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

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

Issue 1322973007: Use memory compiler in compiler_helper.dart. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Update cf. comments. Created 5 years, 3 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/compiler/lib/src/commandline_options.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/apiimpl.dart
diff --git a/pkg/compiler/lib/src/apiimpl.dart b/pkg/compiler/lib/src/apiimpl.dart
index d2849d2c7fe6301fed1a93e32e311ab39bdc6323..da6a5c1756ac8d9e5287d6cc6d2eb8be148e86d5 100644
--- a/pkg/compiler/lib/src/apiimpl.dart
+++ b/pkg/compiler/lib/src/apiimpl.dart
@@ -19,6 +19,7 @@ import 'package:sdk_library_metadata/libraries.dart' as library_info show
LIBRARIES;
import '../compiler_new.dart' as api;
+import 'commandline_options.dart';
import 'common/tasks.dart' show
GenericTask;
import 'compiler.dart' as leg;
@@ -66,59 +67,60 @@ class Compiler extends leg.Compiler {
this.allowedLibraryCategories = getAllowedLibraryCategories(options),
super(
outputProvider: outputProvider,
- enableTypeAssertions: hasOption(options, '--enable-checked-mode'),
- enableUserAssertions: hasOption(options, '--enable-checked-mode'),
+ enableTypeAssertions: hasOption(options, Flags.enableCheckedMode),
+ enableUserAssertions: hasOption(options, Flags.enableCheckedMode),
trustTypeAnnotations:
- hasOption(options, '--trust-type-annotations'),
+ hasOption(options, Flags.trustTypeAnnotations),
trustPrimitives:
- hasOption(options, '--trust-primitives'),
- enableMinification: hasOption(options, '--minify'),
+ hasOption(options, Flags.trustPrimitives),
+ enableMinification: hasOption(options, Flags.minify),
useFrequencyNamer:
- !hasOption(options, "--no-frequency-based-minification"),
- preserveUris: hasOption(options, '--preserve-uris'),
+ !hasOption(options, Flags.noFrequencyBasedMinification),
+ preserveUris: hasOption(options, Flags.preserveUris),
enableNativeLiveTypeAnalysis:
- !hasOption(options, '--disable-native-live-type-analysis'),
+ !hasOption(options, Flags.disableNativeLiveTypeAnalysis),
emitJavaScript: !(hasOption(options, '--output-type=dart') ||
hasOption(options, '--output-type=dart-multi')),
dart2dartMultiFile: hasOption(options, '--output-type=dart-multi'),
- generateSourceMap: !hasOption(options, '--no-source-maps'),
- analyzeAllFlag: hasOption(options, '--analyze-all'),
- analyzeOnly: hasOption(options, '--analyze-only'),
- analyzeMain: hasOption(options, '--analyze-main'),
+ generateSourceMap: !hasOption(options, Flags.noSourceMaps),
+ analyzeAllFlag: hasOption(options, Flags.analyzeAll),
+ analyzeOnly: hasOption(options, Flags.analyzeOnly),
+ analyzeMain: hasOption(options, Flags.analyzeMain),
analyzeSignaturesOnly:
- hasOption(options, '--analyze-signatures-only'),
+ hasOption(options, Flags.analyzeSignaturesOnly),
strips: extractCsvOption(options, '--force-strip='),
enableConcreteTypeInference:
- hasOption(options, '--enable-concrete-type-inference'),
+ hasOption(options, Flags.enableConcreteTypeInference),
disableTypeInferenceFlag:
- hasOption(options, '--disable-type-inference'),
- preserveComments: hasOption(options, '--preserve-comments'),
- useCpsIr: hasOption(options, '--use-cps-ir'),
- verbose: hasOption(options, '--verbose'),
+ hasOption(options, Flags.disableTypeInference),
+ preserveComments: hasOption(options, Flags.preserveComments),
+ useCpsIr: hasOption(options, Flags.useCpsIr),
+ verbose: hasOption(options, Flags.verbose),
sourceMapUri: extractUriOption(options, '--source-map='),
outputUri: extractUriOption(options, '--out='),
- terseDiagnostics: hasOption(options, '--terse'),
+ terseDiagnostics: hasOption(options, Flags.terse),
deferredMapUri: extractUriOption(options, '--deferred-map='),
- dumpInfo: hasOption(options, '--dump-info'),
+ dumpInfo: hasOption(options, Flags.dumpInfo),
buildId: extractStringOption(
options, '--build-id=',
"build number could not be determined"),
showPackageWarnings:
- hasOption(options, '--show-package-warnings'),
- useContentSecurityPolicy: hasOption(options, '--csp'),
- useStartupEmitter: hasOption(options, '--fast-startup'),
+ hasOption(options, Flags.showPackageWarnings),
+ useContentSecurityPolicy:
+ hasOption(options, Flags.useContentSecurityPolicy),
+ useStartupEmitter: hasOption(options, Flags.fastStartup),
hasIncrementalSupport:
forceIncrementalSupport ||
- hasOption(options, '--incremental-support'),
- suppressWarnings: hasOption(options, '--suppress-warnings'),
- fatalWarnings: hasOption(options, '--fatal-warnings'),
+ hasOption(options, Flags.incrementalSupport),
+ suppressWarnings: hasOption(options, Flags.suppressWarnings),
+ fatalWarnings: hasOption(options, Flags.fatalWarnings),
enableExperimentalMirrors:
- hasOption(options, '--enable-experimental-mirrors'),
+ hasOption(options, Flags.enableExperimentalMirrors),
generateCodeWithCompileTimeErrors:
- hasOption(options, '--generate-code-with-compile-time-errors'),
- testMode: hasOption(options, '--test-mode'),
+ hasOption(options, Flags.generateCodeWithCompileTimeErrors),
+ testMode: hasOption(options, Flags.testMode),
allowNativeExtensions:
- hasOption(options, '--allow-native-extensions')) {
+ hasOption(options, Flags.allowNativeExtensions)) {
tasks.addAll([
userHandlerTask = new GenericTask('Diagnostic handler', this),
userProviderTask = new GenericTask('Input provider', this),
@@ -141,8 +143,8 @@ class Compiler extends leg.Compiler {
if (!analyzeOnly) {
if (allowNativeExtensions) {
throw new ArgumentError(
- "--allow-native-extensions is only supported in combination with "
- "--analyze-only");
+ "${Flags.allowNativeExtensions} is only supported in combination "
+ "with ${Flags.analyzeOnly}");
}
}
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/commandline_options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698