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

Side by Side Diff: pkg/compiler/lib/src/dart2js.dart

Issue 1235563003: Add interfaces for a new compiler API. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Rebased Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/dart2jslib.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 show Future, EventSink; 8 show Future, EventSink;
9 import 'dart:convert' show UTF8, LineSplitter; 9 import 'dart:convert' show UTF8, LineSplitter;
10 import 'dart:io' 10 import 'dart:io'
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 if (uri.scheme != 'file') { 495 if (uri.scheme != 'file') {
496 fail('Unhandled scheme ${uri.scheme}.'); 496 fail('Unhandled scheme ${uri.scheme}.');
497 } 497 }
498 var file = new File(uri.toFilePath()).openSync(mode: FileMode.WRITE); 498 var file = new File(uri.toFilePath()).openSync(mode: FileMode.WRITE);
499 file.writeStringSync(text); 499 file.writeStringSync(text);
500 file.closeSync(); 500 file.closeSync();
501 } 501 }
502 502
503 void fail(String message) { 503 void fail(String message) {
504 if (diagnosticHandler != null) { 504 if (diagnosticHandler != null) {
505 diagnosticHandler.diagnosticHandler( 505 diagnosticHandler.report(
506 null, -1, -1, message, api.Diagnostic.ERROR); 506 null, -1, -1, message, api.Diagnostic.ERROR);
507 } else { 507 } else {
508 print('Error: $message'); 508 print('Error: $message');
509 } 509 }
510 exitFunc(1); 510 exitFunc(1);
511 } 511 }
512 512
513 Future<api.CompilationResult> compilerMain(List<String> arguments) { 513 Future<api.CompilationResult> compilerMain(List<String> arguments) {
514 var root = uriPathToNative("/$LIBRARY_ROOT"); 514 var root = uriPathToNative("/$LIBRARY_ROOT");
515 arguments = <String>['--library-root=${Platform.script.toFilePath()}$root'] 515 arguments = <String>['--library-root=${Platform.script.toFilePath()}$root']
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 } else if (exitCode == 253) { 765 } else if (exitCode == 253) {
766 print(">>> TEST CRASH"); 766 print(">>> TEST CRASH");
767 } else { 767 } else {
768 print(">>> TEST FAIL"); 768 print(">>> TEST FAIL");
769 } 769 }
770 stderr.writeln(">>> EOF STDERR"); 770 stderr.writeln(">>> EOF STDERR");
771 subscription.resume(); 771 subscription.resume();
772 }); 772 });
773 }); 773 });
774 } 774 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/dart2jslib.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698