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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/dart2js.dart

Issue 46063010: Change dart:io Platform.script to return a Uri. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.cmdline; 5 library dart2js.cmdline;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io' 8 import 'dart:io'
9 show exit, File, FileMode, Platform, RandomAccessFile; 9 show exit, File, FileMode, Platform, RandomAccessFile;
10 import 'dart:math' as math; 10 import 'dart:math' as math;
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 diagnosticHandler.diagnosticHandler( 447 diagnosticHandler.diagnosticHandler(
448 null, -1, -1, message, api.Diagnostic.ERROR); 448 null, -1, -1, message, api.Diagnostic.ERROR);
449 } else { 449 } else {
450 print(message); 450 print(message);
451 } 451 }
452 exit(1); 452 exit(1);
453 } 453 }
454 454
455 Future compilerMain(List<String> arguments) { 455 Future compilerMain(List<String> arguments) {
456 var root = uriPathToNative("/$LIBRARY_ROOT"); 456 var root = uriPathToNative("/$LIBRARY_ROOT");
457 arguments = 457 arguments = <String>['--library-root=${Platform.script.toFilePath()}$root']
458 <String>['--library-root=${Platform.script}$root']..addAll(arguments); 458 ..addAll(arguments);
459 return compile(arguments); 459 return compile(arguments);
460 } 460 }
461 461
462 void help() { 462 void help() {
463 // This message should be no longer than 20 lines. The default 463 // This message should be no longer than 20 lines. The default
464 // terminal size normally 80x24. Two lines are used for the prompts 464 // terminal size normally 80x24. Two lines are used for the prompts
465 // before and after running the compiler. Another two lines may be 465 // before and after running the compiler. Another two lines may be
466 // used to print an error message. 466 // used to print an error message.
467 print(''' 467 print('''
468 Usage: dart2js [options] dartfile 468 Usage: dart2js [options] dartfile
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 599
600 try { 600 try {
601 if (trace != null) { 601 if (trace != null) {
602 print(trace); 602 print(trace);
603 } 603 }
604 } finally { 604 } finally {
605 exit(253); // 253 is recognized as a crash by our test scripts. 605 exit(253); // 253 is recognized as a crash by our test scripts.
606 } 606 }
607 }); 607 });
608 } 608 }
OLDNEW
« no previous file with comments | « samples/sample_extension/test/sample_extension_test.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