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

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

Issue 12609004: Change all File APIs to make the mode and encoding arguments named (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments and changed other use places Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/source_file_provider.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; 5 library dart2js;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection' show Queue, LinkedHashMap; 8 import 'dart:collection' show Queue, LinkedHashMap;
9 import 'dart:io'; 9 import 'dart:io';
10 import 'dart:uri'; 10 import 'dart:uri';
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 class AbortLeg { 338 class AbortLeg {
339 final message; 339 final message;
340 AbortLeg(this.message); 340 AbortLeg(this.message);
341 toString() => 'Aborted due to --throw-on-error: $message'; 341 toString() => 'Aborted due to --throw-on-error: $message';
342 } 342 }
343 343
344 void writeString(Uri uri, String text) { 344 void writeString(Uri uri, String text) {
345 if (uri.scheme != 'file') { 345 if (uri.scheme != 'file') {
346 fail('Error: Unhandled scheme ${uri.scheme}.'); 346 fail('Error: Unhandled scheme ${uri.scheme}.');
347 } 347 }
348 var file = new File(uriPathToNative(uri.path)).openSync(FileMode.WRITE); 348 var file = new File(uriPathToNative(uri.path)).openSync(mode: FileMode.WRITE);
349 file.writeStringSync(text); 349 file.writeStringSync(text);
350 file.closeSync(); 350 file.closeSync();
351 } 351 }
352 352
353 void fail(String message) { 353 void fail(String message) {
354 print(message); 354 print(message);
355 exit(1); 355 exit(1);
356 } 356 }
357 357
358 void compilerMain(Options options) { 358 void compilerMain(Options options) {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 } catch (ignored) { 496 } catch (ignored) {
497 print('Internal error: error while printing exception'); 497 print('Internal error: error while printing exception');
498 } 498 }
499 try { 499 try {
500 print(trace); 500 print(trace);
501 } finally { 501 } finally {
502 exit(253); // 253 is recognized as a crash by our test scripts. 502 exit(253); // 253 is recognized as a crash by our test scripts.
503 } 503 }
504 } 504 }
505 } 505 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/source_file_provider.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698