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

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, 3 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 // Enable isolate support if we start using something from the
103 // isolate library.
104 LibraryElement library = element.getLibrary();
105 if (!compiler.hasIsolateSupport()
106 && library.uri.toString() == 'dart:isolate') {
107 compiler.enableIsolateSupport(library);
108 }
100 } 109 }
101 110
102 void eagerRecompile(Element element) { 111 void eagerRecompile(Element element) {
103 universe.generatedCode.remove(element); 112 universe.generatedCode.remove(element);
104 universe.generatedBailoutCode.remove(element); 113 universe.generatedBailoutCode.remove(element);
105 addToWorkList(element); 114 addToWorkList(element);
106 } 115 }
107 116
108 bool canBeRecompiled(Element element) { 117 bool canBeRecompiled(Element element) {
109 // Only member functions can be recompiled. An exception to this is members 118 // 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) { 338 void registerIsCheck(Element element) {
330 universe.isChecks.add(element); 339 universe.isChecks.add(element);
331 } 340 }
332 341
333 void forEach(f(WorkItem work)) { 342 void forEach(f(WorkItem work)) {
334 while (!queue.isEmpty()) { 343 while (!queue.isEmpty()) {
335 f(queue.removeLast()); // TODO(kasperl): Why isn't this removeFirst? 344 f(queue.removeLast()); // TODO(kasperl): Why isn't this removeFirst?
336 } 345 }
337 } 346 }
338 } 347 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/compiler.dart ('k') | lib/compiler/implementation/lib/js_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698