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

Side by Side Diff: dart/site/try/src/caching_compiler.dart

Issue 344243002: Make incremental compilation opt-in. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r37603. Created 6 years, 6 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 | dart/site/try/src/compilation.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 trydart.caching_compiler; 5 library trydart.caching_compiler;
6 6
7 import 'dart:profiler' show 7 import 'dart:profiler' show
8 UserTag; 8 UserTag;
9 9
10 import 'package:compiler/compiler.dart' show 10 import 'package:compiler/compiler.dart' show
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 } 62 }
63 if (diagnosticHandler == null) { 63 if (diagnosticHandler == null) {
64 throw 'Missing diagnosticHandler'; 64 throw 'Missing diagnosticHandler';
65 } 65 }
66 if (outputProvider == null) { 66 if (outputProvider == null) {
67 outputProvider = NullSink.outputProvider; 67 outputProvider = NullSink.outputProvider;
68 } 68 }
69 Compiler compiler = cachedCompiler; 69 Compiler compiler = cachedCompiler;
70 if (compiler == null || 70 if (compiler == null ||
71 compiler.libraryRoot != libraryRoot || 71 compiler.libraryRoot != libraryRoot ||
72 !compiler.hasIncrementalSupport ||
72 compiler.hasCrashed || 73 compiler.hasCrashed ||
73 compiler.compilerWasCancelled || 74 compiler.compilerWasCancelled ||
74 compiler.enqueuer.resolution.hasEnqueuedEverything || 75 compiler.enqueuer.resolution.hasEnqueuedEverything ||
75 compiler.deferredLoadTask.splitProgram) { 76 compiler.deferredLoadTask.splitProgram) {
76 if (compiler != null) { 77 if (compiler != null && compiler.hasIncrementalSupport) {
77 print('***FLUSH***'); 78 print('***FLUSH***');
78 if (compiler.hasCrashed) { 79 if (compiler.hasCrashed) {
79 print('Unable to reuse compiler due to crash.'); 80 print('Unable to reuse compiler due to crash.');
80 } else if (compiler.compilerWasCancelled) { 81 } else if (compiler.compilerWasCancelled) {
81 print('Unable to reuse compiler due to cancel.'); 82 print('Unable to reuse compiler due to cancel.');
82 } else if (compiler.enqueuer.resolution.hasEnqueuedEverything) { 83 } else if (compiler.enqueuer.resolution.hasEnqueuedEverything) {
83 print('Unable to reuse compiler due to dart:mirrors.'); 84 print('Unable to reuse compiler due to dart:mirrors.');
84 } else if (compiler.deferredLoadTask.splitProgram) { 85 } else if (compiler.deferredLoadTask.splitProgram) {
85 print('Unable to reuse compiler due to deferred loading.'); 86 print('Unable to reuse compiler due to deferred loading.');
86 } else { 87 } else {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 if (library.isPlatformLibrary || 171 if (library.isPlatformLibrary ||
171 (packagesAreImmutable && library.isPackageLibrary)) { 172 (packagesAreImmutable && library.isPackageLibrary)) {
172 compiler.libraries[uri] = library; 173 compiler.libraries[uri] = library;
173 reuseLibrary(compiler.libraryLoader, library); 174 reuseLibrary(compiler.libraryLoader, library);
174 } 175 }
175 }); 176 });
176 } 177 }
177 oldTag.makeCurrent(); 178 oldTag.makeCurrent();
178 return compiler; 179 return compiler;
179 } 180 }
OLDNEW
« no previous file with comments | « no previous file | dart/site/try/src/compilation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698