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

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 compiler.backend.registerInstantiatedClass(cls, this);
142 } 143 }
143 144
144 bool checkNoEnqueuedInvokedInstanceMethods() { 145 bool checkNoEnqueuedInvokedInstanceMethods() {
145 task.measure(() { 146 task.measure(() {
146 // Run through the classes and see if we need to compile methods. 147 // Run through the classes and see if we need to compile methods.
147 for (ClassElement classElement in universe.instantiatedClasses) { 148 for (ClassElement classElement in universe.instantiatedClasses) {
148 for (ClassElement currentClass = classElement; 149 for (ClassElement currentClass = classElement;
149 currentClass != null; 150 currentClass != null;
150 currentClass = currentClass.superclass) { 151 currentClass = currentClass.superclass) {
151 processInstantiatedClass(currentClass); 152 processInstantiatedClass(currentClass);
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 367
367 String toString() => 'Enqueuer($name)'; 368 String toString() => 'Enqueuer($name)';
368 369
369 registerUsedSelector(Selector selector) { 370 registerUsedSelector(Selector selector) {
370 Element interceptor = compiler.backend.getInterceptor(selector); 371 Element interceptor = compiler.backend.getInterceptor(selector);
371 if (interceptor != null) { 372 if (interceptor != null) {
372 registerStaticUse(interceptor); 373 registerStaticUse(interceptor);
373 } 374 }
374 } 375 }
375 } 376 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698