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

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

Issue 256743009: Cache output of dart2js compilations that went wrong on disk. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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 | tools/testing/dart/multitest.dart » ('j') | tools/testing/dart/multitest.dart » ('J')
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:io' 9 import 'dart:io'
10 show exit, File, FileMode, Platform, RandomAccessFile, FileSystemException; 10 show exit, File, FileMode, Platform, RandomAccessFile, FileSystemException;
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 358
359 int totalCharactersWritten = 0; 359 int totalCharactersWritten = 0;
360 360
361 options.add('--out=$out'); 361 options.add('--out=$out');
362 options.add('--source-map=$sourceMapOut'); 362 options.add('--source-map=$sourceMapOut');
363 363
364 List<String> allOutputFiles = new List<String>(); 364 List<String> allOutputFiles = new List<String>();
365 365
366 compilationDone(String code) { 366 compilationDone(String code) {
367 if (analyzeOnly) return; 367 if (analyzeOnly) return;
368 writeString(Uri.parse('$out.deps'),
369 getDepsOutput(inputProvider.sourceFiles));
kustermann 2014/04/29 21:20:44 This does not work in a very rare edge case: Assu
ricow1 2014/04/30 06:51:01 I don't know enough about how dart2js works to dec
368 if (code == null) { 370 if (code == null) {
369 fail('Compilation failed.'); 371 fail('Compilation failed.');
370 } 372 }
371 writeString(Uri.parse('$out.deps'),
372 getDepsOutput(inputProvider.sourceFiles));
373 diagnosticHandler.info( 373 diagnosticHandler.info(
374 'Compiled ${inputProvider.dartCharactersRead} characters Dart ' 374 'Compiled ${inputProvider.dartCharactersRead} characters Dart '
375 '-> $totalCharactersWritten characters $outputLanguage ' 375 '-> $totalCharactersWritten characters $outputLanguage '
376 'in ${relativize(currentDirectory, out, isWindows)}'); 376 'in ${relativize(currentDirectory, out, isWindows)}');
377 if (diagnosticHandler.verbose) { 377 if (diagnosticHandler.verbose) {
378 String input = uriPathToNative(arguments[0]); 378 String input = uriPathToNative(arguments[0]);
379 print('Dart file ($input) compiled to $outputLanguage.'); 379 print('Dart file ($input) compiled to $outputLanguage.');
380 print('Wrote the following files:'); 380 print('Wrote the following files:');
381 for (String filename in allOutputFiles) { 381 for (String filename in allOutputFiles) {
382 print(" $filename"); 382 print(" $filename");
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 } 663 }
664 } 664 }
665 665
666 try { 666 try {
667 return compilerMain(arguments).catchError(onError); 667 return compilerMain(arguments).catchError(onError);
668 } catch (exception, trace) { 668 } catch (exception, trace) {
669 onError(exception, trace); 669 onError(exception, trace);
670 return new Future.value(); 670 return new Future.value();
671 } 671 }
672 } 672 }
OLDNEW
« no previous file with comments | « no previous file | tools/testing/dart/multitest.dart » ('j') | tools/testing/dart/multitest.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698