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

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

Issue 2213673002: Delete dart_backend from compiler. (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/compiler.dart ('k') | pkg/compiler/lib/src/dart_backend/backend.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/dart2js.dart
diff --git a/pkg/compiler/lib/src/dart2js.dart b/pkg/compiler/lib/src/dart2js.dart
index 1b41be1a4e07b0999fd1ed3a6861c239a28ed71c..183d59d832a59ce97e8c262e9b66060f00e4e809 100644
--- a/pkg/compiler/lib/src/dart2js.dart
+++ b/pkg/compiler/lib/src/dart2js.dart
@@ -115,8 +115,6 @@ Future<api.CompilationResult> compile(List<String> argv) {
List<String> explicitOutputArguments = <String>[];
bool wantHelp = false;
bool wantVersion = false;
- String outputLanguage = 'JavaScript';
- bool stripArgumentSet = false;
bool analyzeOnly = false;
bool analyzeAll = false;
bool resolveOnly = false;
@@ -173,20 +171,10 @@ Future<api.CompilationResult> compile(List<String> argv) {
optionsImplyCompilation.add(argument);
if (argument == '--output-type=dart' ||
argument == '--output-type=dart-multi') {
- outputLanguage = OUTPUT_LANGUAGE_DART;
- if (explicitOutputArguments.isNotEmpty) {
- out = currentDirectory.resolve('out.dart');
- sourceMapOut = currentDirectory.resolve('out.dart.map');
- }
- diagnosticHandler(
- null,
- null,
- null,
- "--output-type=dart is deprecated. It will remain available "
- "in Dart 1.11, but will be removed in Dart 1.12.",
- api.Diagnostic.WARNING);
+ helpAndFail(
+ "--output-type=dart is no longer supported. It was deprecated "
+ "since Dart 1.11 and removed in Dart 1.19.");
}
- passThrough(argument);
}
void setResolutionInput(String argument) {
@@ -208,14 +196,14 @@ Future<api.CompilationResult> compile(List<String> argv) {
return filenames.join("\n");
}
- void implyCompilation(String argument) {
+ implyCompilation(String argument) {
optionsImplyCompilation.add(argument);
passThrough(argument);
}
- void setStrip(String argument) {
- stripArgumentSet = true;
- implyCompilation(argument);
+ setStrip(String argument) {
+ helpAndFail("Option '--force-strip' is not in use now that"
+ "--output-type=dart is no longer supported.");
}
void setAnalyzeOnly(String argument) {
@@ -326,6 +314,7 @@ Future<api.CompilationResult> compile(List<String> argv) {
new OptionHandler(Flags.fatalWarnings, passThrough),
new OptionHandler(
Flags.suppressHints, (_) => diagnosticHandler.showHints = false),
+ // TODO(sigmund): remove entirely after Dart 1.20
new OptionHandler(
'--output-type=dart|--output-type=dart-multi|--output-type=js',
setOutputType),
@@ -370,7 +359,7 @@ Future<api.CompilationResult> compile(List<String> argv) {
new OptionHandler(Flags.disableTypeInference, implyCompilation),
new OptionHandler(Flags.terse, passThrough),
new OptionHandler('--deferred-map=.+', implyCompilation),
- new OptionHandler(Flags.dumpInfo, setDumpInfo),
+ new OptionHandler(Flags.dumpInfo, implyCompilation),
new OptionHandler(
'--disallow-unsafe-eval', (_) => hasDisallowUnsafeEval = true),
new OptionHandler(Option.showPackageWarnings, passThrough),
@@ -429,10 +418,6 @@ Future<api.CompilationResult> compile(List<String> argv) {
" '$precompiledName'.");
}
- if (outputLanguage != OUTPUT_LANGUAGE_DART && stripArgumentSet) {
- helpAndFail("Option '--force-strip' may only be used with "
- "'--output-type=dart'.");
- }
if (arguments.isEmpty) {
helpAndFail('No Dart file specified.');
}
@@ -487,10 +472,6 @@ Future<api.CompilationResult> compile(List<String> argv) {
"in combination with the '${Flags.analyzeOnly}' option.");
}
}
- if (dumpInfo && outputLanguage == OUTPUT_LANGUAGE_DART) {
- helpAndFail("Option '${Flags.dumpInfo}' is not supported in "
- "combination with the '--output-type=dart' option.");
- }
options.add('--out=$out');
options.add('--source-map=$sourceMapOut');
@@ -511,11 +492,11 @@ Future<api.CompilationResult> compile(List<String> argv) {
diagnosticHandler
.info('Compiled ${inputProvider.dartCharactersRead} characters Dart '
'-> ${outputProvider.totalCharactersWritten} characters '
- '$outputLanguage in '
+ 'JavaScript in '
'${relativize(currentDirectory, out, Platform.isWindows)}');
if (diagnosticHandler.verbose) {
String input = uriPathToNative(arguments[0]);
- print('Dart file ($input) compiled to $outputLanguage.');
+ print('Dart file ($input) compiled to JavaScript.');
print('Wrote the following files:');
for (String filename in outputProvider.allOutputFiles) {
print(" $filename");
@@ -523,7 +504,7 @@ Future<api.CompilationResult> compile(List<String> argv) {
} else if (explicitOutputArguments.isNotEmpty) {
String input = uriPathToNative(arguments[0]);
String output = relativize(currentDirectory, out, Platform.isWindows);
- print('Dart file ($input) compiled to $outputLanguage: $output');
+ print('Dart file ($input) compiled to JavaScript: $output');
}
return result;
}
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/dart_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698