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

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

Issue 10984042: Don't detect runtime type information use except in the codegen queue. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 if (elements === null) { 122 if (elements === null) {
123 elements = getCachedElements(element); 123 elements = getCachedElements(element);
124 } 124 }
125 if (isResolutionQueue) { 125 if (isResolutionQueue) {
126 compiler.world.registerUsedElement(element); 126 compiler.world.registerUsedElement(element);
127 } 127 }
128 128
129 queue.add(new WorkItem(element, elements, itemCompilationContextCreator())); 129 queue.add(new WorkItem(element, elements, itemCompilationContextCreator()));
130 130
131 // Enable runtime type support if we discover a getter called runtimeType. 131 // Enable runtime type support if we discover a getter called runtimeType.
132 if (element.isGetter() && element.name == Compiler.RUNTIME_TYPE) { 132 if (!isResolutionQueue &&
133 element.isGetter() &&
134 element.name == Compiler.RUNTIME_TYPE) {
133 compiler.enabledRuntimeType = true; 135 compiler.enabledRuntimeType = true;
134 } 136 }
135 137
136 // Enable isolate support if we start using something from the 138 // Enable isolate support if we start using something from the
137 // isolate library. 139 // isolate library.
138 LibraryElement library = element.getLibrary(); 140 LibraryElement library = element.getLibrary();
139 if (!compiler.hasIsolateSupport() 141 if (!compiler.hasIsolateSupport()
140 && library.uri.toString() == 'dart:isolate') { 142 && library.uri.toString() == 'dart:isolate') {
141 compiler.enableIsolateSupport(library); 143 compiler.enableIsolateSupport(library);
142 } 144 }
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 } 393 }
392 394
393 void forEach(f(WorkItem work)) { 395 void forEach(f(WorkItem work)) {
394 while (!queue.isEmpty()) { 396 while (!queue.isEmpty()) {
395 f(queue.removeLast()); // TODO(kasperl): Why isn't this removeFirst? 397 f(queue.removeLast()); // TODO(kasperl): Why isn't this removeFirst?
396 } 398 }
397 } 399 }
398 400
399 String toString() => 'Enqueuer($name)'; 401 String toString() => 'Enqueuer($name)';
400 } 402 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698