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

Side by Side Diff: dart/pkg/dart2js_incremental/lib/caching_compiler.dart

Issue 720813002: Incremental compilation of new classes with fields. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r41823. Created 6 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 part of dart2js_incremental; 5 part of dart2js_incremental;
6 6
7 /// Do not call this method directly. It will be made private. 7 /// Do not call this method directly. It will be made private.
8 // TODO(ahe): Make this method private. 8 // TODO(ahe): Make this method private.
9 Future<Compiler> reuseCompiler( 9 Future<Compiler> reuseCompiler(
10 {DiagnosticHandler diagnosticHandler, 10 {DiagnosticHandler diagnosticHandler,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 print('Unable to reuse compiler due to cancel.'); 49 print('Unable to reuse compiler due to cancel.');
50 } else if (compiler.enqueuer.resolution.hasEnqueuedReflectiveElements) { 50 } else if (compiler.enqueuer.resolution.hasEnqueuedReflectiveElements) {
51 print('Unable to reuse compiler due to dart:mirrors.'); 51 print('Unable to reuse compiler due to dart:mirrors.');
52 } else if (compiler.deferredLoadTask.isProgramSplit) { 52 } else if (compiler.deferredLoadTask.isProgramSplit) {
53 print('Unable to reuse compiler due to deferred loading.'); 53 print('Unable to reuse compiler due to deferred loading.');
54 } else { 54 } else {
55 print('Unable to reuse compiler.'); 55 print('Unable to reuse compiler.');
56 } 56 }
57 } 57 }
58 oldTag.makeCurrent(); 58 oldTag.makeCurrent();
59 return new Future.value( 59 compiler = new Compiler(
60 new Compiler( 60 inputProvider,
61 inputProvider, 61 outputProvider,
62 outputProvider, 62 diagnosticHandler,
63 diagnosticHandler, 63 libraryRoot,
64 libraryRoot, 64 packageRoot,
65 packageRoot, 65 options,
66 options, 66 environment);
67 environment)); 67 JavaScriptBackend backend = compiler.backend;
68 // Much like a scout, an incremental compiler is always prepared. For
69 // mixins, at least.
70 backend.emitter.oldEmitter.needsMixinSupport = true;
71 return new Future.value(compiler);
68 } else { 72 } else {
69 for (final task in compiler.tasks) { 73 for (final task in compiler.tasks) {
70 if (task.watch != null) { 74 if (task.watch != null) {
71 task.watch.reset(); 75 task.watch.reset();
72 } 76 }
73 } 77 }
74 compiler 78 compiler
75 ..outputProvider = outputProvider 79 ..outputProvider = outputProvider
76 ..provider = inputProvider 80 ..provider = inputProvider
77 ..handler = diagnosticHandler 81 ..handler = diagnosticHandler
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 library.isPlatformLibrary || 153 library.isPlatformLibrary ||
150 (packagesAreImmutable && library.isPackageLibrary)); 154 (packagesAreImmutable && library.isPackageLibrary));
151 }; 155 };
152 } 156 }
153 return compiler.libraryLoader.resetAsync(reuseLibrary).then((_) { 157 return compiler.libraryLoader.resetAsync(reuseLibrary).then((_) {
154 oldTag.makeCurrent(); 158 oldTag.makeCurrent();
155 return compiler; 159 return compiler;
156 }); 160 });
157 } 161 }
158 } 162 }
OLDNEW
« no previous file with comments | « dart/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart ('k') | dart/pkg/dart2js_incremental/lib/library_updater.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698