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

Unified Diff: sdk/lib/_internal/compiler/implementation/dart2js.dart

Issue 50633004: Remove uses of dart:io Options in dart2js and dartdoc. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use arguments instead of args. Created 7 years, 2 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 | « runtime/bin/builtin.dart ('k') | sdk/lib/_internal/compiler/samples/darttags/darttags.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/dart2js.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dart2js.dart b/sdk/lib/_internal/compiler/implementation/dart2js.dart
index e30543a8ea85a4bd8db1d64dd710c1a3115c2991..a827bf6ea03e02ee597e117055cf8118d5adc0b5 100644
--- a/sdk/lib/_internal/compiler/implementation/dart2js.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart2js.dart
@@ -6,7 +6,7 @@ library dart2js.cmdline;
import 'dart:async';
import 'dart:io'
- show exit, File, FileMode, Options, Platform, RandomAccessFile;
+ show exit, File, FileMode, Platform, RandomAccessFile;
import 'dart:math' as math;
import '../compiler.dart' as api;
@@ -452,11 +452,11 @@ void fail(String message) {
exit(1);
}
-Future compilerMain(Options options) {
+Future compilerMain(List<String> arguments) {
var root = uriPathToNative("/$LIBRARY_ROOT");
- List<String> argv = ['--library-root=${options.script}$root'];
- argv.addAll(options.arguments);
- return compile(argv);
+ arguments =
+ <String>['--library-root=${Platform.script}$root']..addAll(arguments);
+ return compile(arguments);
}
void help() {
@@ -589,8 +589,8 @@ void helpAndFail(String message) {
fail(message);
}
-void mainWithErrorHandler(Options options) {
- runZoned(() => compilerMain(options), onError: (exception) {
+void main(List<String> arguments) {
+ runZoned(() => compilerMain(arguments), onError: (exception) {
try {
print('Internal error: $exception');
} catch (ignored) {
@@ -607,7 +607,3 @@ void mainWithErrorHandler(Options options) {
}
});
}
-
-void main() {
- mainWithErrorHandler(new Options());
-}
« no previous file with comments | « runtime/bin/builtin.dart ('k') | sdk/lib/_internal/compiler/samples/darttags/darttags.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698