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

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

Issue 10949003: Revert r12491 (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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 100 }
101 if (elements === null) { 101 if (elements === null) {
102 elements = getCachedElements(element); 102 elements = getCachedElements(element);
103 } 103 }
104 if (isResolutionQueue) { 104 if (isResolutionQueue) {
105 compiler.world.registerUsedElement(element); 105 compiler.world.registerUsedElement(element);
106 } 106 }
107 107
108 queue.add(new WorkItem(element, elements, itemCompilationContextCreator())); 108 queue.add(new WorkItem(element, elements, itemCompilationContextCreator()));
109 109
110 // Enable runtime type support if we discover a method called runtimeType.
111 if (element.isFunction() && element.name == Compiler.RUNTIME_TYPE) {
112 compiler.enabledRuntimeType = true;
113 }
114
115 // Enable isolate support if we start using something from the 110 // Enable isolate support if we start using something from the
116 // isolate library. 111 // isolate library.
117 LibraryElement library = element.getLibrary(); 112 LibraryElement library = element.getLibrary();
118 if (!compiler.hasIsolateSupport() 113 if (!compiler.hasIsolateSupport()
119 && library.uri.toString() == 'dart:isolate') { 114 && library.uri.toString() == 'dart:isolate') {
120 compiler.enableIsolateSupport(library); 115 compiler.enableIsolateSupport(library);
121 } 116 }
122 } 117 }
123 118
124 void eagerRecompile(Element element) { 119 void eagerRecompile(Element element) {
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 void registerIsCheck(DartType type) { 346 void registerIsCheck(DartType type) {
352 universe.isChecks.add(type); 347 universe.isChecks.add(type);
353 } 348 }
354 349
355 void forEach(f(WorkItem work)) { 350 void forEach(f(WorkItem work)) {
356 while (!queue.isEmpty()) { 351 while (!queue.isEmpty()) {
357 f(queue.removeLast()); // TODO(kasperl): Why isn't this removeFirst? 352 f(queue.removeLast()); // TODO(kasperl): Why isn't this removeFirst?
358 } 353 }
359 } 354 }
360 } 355 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/compiler.dart ('k') | lib/compiler/implementation/js_backend/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698