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

Side by Side Diff: lib/compiler/implementation/enqueue.dart

Issue 10828416: Small changes to get the compilation size of code importing dart:html shorter. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 class EnqueueTask extends CompilerTask { 5 class EnqueueTask extends CompilerTask {
6 final Enqueuer codegen; 6 final Enqueuer codegen;
7 final Enqueuer resolution; 7 final Enqueuer resolution;
8 8
9 String get name() => 'Enqueue'; 9 String get name() => 'Enqueue';
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 if (isResolutionQueue && getCachedElements(element) !== null) return; 89 if (isResolutionQueue && getCachedElements(element) !== null) return;
90 compiler.internalErrorOnElement(element, "Work list is closed."); 90 compiler.internalErrorOnElement(element, "Work list is closed.");
91 } 91 }
92 if (!isResolutionQueue && 92 if (!isResolutionQueue &&
93 element.kind === ElementKind.GENERATIVE_CONSTRUCTOR) { 93 element.kind === ElementKind.GENERATIVE_CONSTRUCTOR) {
94 registerInstantiatedClass(element.getEnclosingClass()); 94 registerInstantiatedClass(element.getEnclosingClass());
95 } 95 }
96 if (elements === null) { 96 if (elements === null) {
97 elements = getCachedElements(element); 97 elements = getCachedElements(element);
98 } 98 }
99
99 queue.add(new WorkItem(element, elements, itemCompilationContextCreator())); 100 queue.add(new WorkItem(element, elements, itemCompilationContextCreator()));
101
102 if (!compiler.hasIsolateSupport()
kasperl 2012/08/21 13:24:51 Add a comment that explains that this enables isol
ngeoffray 2012/08/23 14:06:02 Done.
103 && element.getLibrary().uri.toString() == 'dart:isolate') {
104 compiler.enableIsolateSupport(element.getLibrary());
105 }
100 } 106 }
101 107
102 void eagerRecompile(Element element) { 108 void eagerRecompile(Element element) {
103 universe.generatedCode.remove(element); 109 universe.generatedCode.remove(element);
104 universe.generatedBailoutCode.remove(element); 110 universe.generatedBailoutCode.remove(element);
105 addToWorkList(element); 111 addToWorkList(element);
106 } 112 }
107 113
108 bool canBeRecompiled(Element element) { 114 bool canBeRecompiled(Element element) {
109 // Only member functions can be recompiled. An exception to this is members 115 // Only member functions can be recompiled. An exception to this is members
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 void registerIsCheck(Element element) { 335 void registerIsCheck(Element element) {
330 universe.isChecks.add(element); 336 universe.isChecks.add(element);
331 } 337 }
332 338
333 void forEach(f(WorkItem work)) { 339 void forEach(f(WorkItem work)) {
334 while (!queue.isEmpty()) { 340 while (!queue.isEmpty()) {
335 f(queue.removeLast()); // TODO(kasperl): Why isn't this removeFirst? 341 f(queue.removeLast()); // TODO(kasperl): Why isn't this removeFirst?
336 } 342 }
337 } 343 }
338 } 344 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698