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

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

Issue 2000323006: Make CompilerTask independent of compiler. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
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<CompilerImpl> reuseCompiler( 9 Future<CompilerImpl> reuseCompiler(
10 {CompilerDiagnostics diagnosticHandler, 10 {CompilerDiagnostics diagnosticHandler,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 return compiler.libraryLoader.loadLibrary(core).then((_) { 80 return compiler.libraryLoader.loadLibrary(core).then((_) {
81 // Likewise, always be prepared for runtimeType support. 81 // Likewise, always be prepared for runtimeType support.
82 // TODO(johnniwinther): Add global switch to force RTI. 82 // TODO(johnniwinther): Add global switch to force RTI.
83 compiler.enabledRuntimeType = true; 83 compiler.enabledRuntimeType = true;
84 backend.registerRuntimeType( 84 backend.registerRuntimeType(
85 compiler.enqueuer.resolution, compiler.globalDependencies); 85 compiler.enqueuer.resolution, compiler.globalDependencies);
86 return compiler; 86 return compiler;
87 }); 87 });
88 }); 88 });
89 } else { 89 } else {
90 for (final task in compiler.tasks) { 90 compiler.tasks.forEach((t) => t.clearMeasurements());
91 if (task.watch != null) {
92 task.watch.reset();
93 }
94 }
95 compiler 91 compiler
96 ..userOutputProvider = outputProvider 92 ..userOutputProvider = outputProvider
97 ..provider = inputProvider 93 ..provider = inputProvider
98 ..handler = diagnosticHandler 94 ..handler = diagnosticHandler
99 ..enqueuer.resolution.queueIsClosed = false 95 ..enqueuer.resolution.queueIsClosed = false
100 ..enqueuer.resolution.hasEnqueuedReflectiveElements = false 96 ..enqueuer.resolution.hasEnqueuedReflectiveElements = false
101 ..enqueuer.resolution.hasEnqueuedReflectiveStaticFields = false 97 ..enqueuer.resolution.hasEnqueuedReflectiveStaticFields = false
102 ..enqueuer.codegen.queueIsClosed = false 98 ..enqueuer.codegen.queueIsClosed = false
103 ..enqueuer.codegen.hasEnqueuedReflectiveElements = false 99 ..enqueuer.codegen.hasEnqueuedReflectiveElements = false
104 ..enqueuer.codegen.hasEnqueuedReflectiveStaticFields = false 100 ..enqueuer.codegen.hasEnqueuedReflectiveStaticFields = false
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 final Map<String, String> output = new Map<String, String>(); 187 final Map<String, String> output = new Map<String, String>();
192 188
193 EventSink<String> createEventSink(String name, String extension) { 189 EventSink<String> createEventSink(String name, String extension) {
194 return new StringEventSink((String data) { 190 return new StringEventSink((String data) {
195 output['$name.$extension'] = data; 191 output['$name.$extension'] = data;
196 }); 192 });
197 } 193 }
198 194
199 String operator[] (String key) => output[key]; 195 String operator[] (String key) => output[key];
200 } 196 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698