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

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

Issue 11365170: Start new design for interceptors and implement String.charCodeAt with it. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 part of dart2js; 5 part of dart2js;
6 6
7 class EnqueueTask extends CompilerTask { 7 class EnqueueTask extends CompilerTask {
8 final Enqueuer codegen; 8 final Enqueuer codegen;
9 final Enqueuer resolution; 9 final Enqueuer resolution;
10 10
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 void registerInstantiatedClass(ClassElement cls) { 133 void registerInstantiatedClass(ClassElement cls) {
134 if (cls.isInterface()) { 134 if (cls.isInterface()) {
135 compiler.internalErrorOnElement( 135 compiler.internalErrorOnElement(
136 // Use the current element, as this is where cls is referenced from. 136 // Use the current element, as this is where cls is referenced from.
137 compiler.currentElement, 137 compiler.currentElement,
138 'Expected a class, but $cls is an interface.'); 138 'Expected a class, but $cls is an interface.');
139 } 139 }
140 universe.instantiatedClasses.add(cls); 140 universe.instantiatedClasses.add(cls);
141 onRegisterInstantiatedClass(cls); 141 onRegisterInstantiatedClass(cls);
142 if (cls.isAbstract(compiler)) {
ahe 2012/11/13 12:42:41 How about turning all this into a method call on t
ngeoffray 2012/11/13 12:51:50 Done.
143 ClassElement element = compiler.backend.getBackendImplementation(cls);
144 if (element != null) registerInstantiatedClass(element);
145 }
142 } 146 }
143 147
144 bool checkNoEnqueuedInvokedInstanceMethods() { 148 bool checkNoEnqueuedInvokedInstanceMethods() {
145 task.measure(() { 149 task.measure(() {
146 // Run through the classes and see if we need to compile methods. 150 // Run through the classes and see if we need to compile methods.
147 for (ClassElement classElement in universe.instantiatedClasses) { 151 for (ClassElement classElement in universe.instantiatedClasses) {
148 for (ClassElement currentClass = classElement; 152 for (ClassElement currentClass = classElement;
149 currentClass != null; 153 currentClass != null;
150 currentClass = currentClass.superclass) { 154 currentClass = currentClass.superclass) {
151 processInstantiatedClass(currentClass); 155 processInstantiatedClass(currentClass);
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 370
367 String toString() => 'Enqueuer($name)'; 371 String toString() => 'Enqueuer($name)';
368 372
369 registerUsedSelector(Selector selector) { 373 registerUsedSelector(Selector selector) {
370 Element interceptor = compiler.backend.getInterceptor(selector); 374 Element interceptor = compiler.backend.getInterceptor(selector);
371 if (interceptor != null) { 375 if (interceptor != null) {
372 registerStaticUse(interceptor); 376 registerStaticUse(interceptor);
373 } 377 }
374 } 378 }
375 } 379 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698