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 16001006: Enqueue fields for resolution in the enqueuer, instead of doing it in the resolver. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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 | sdk/lib/_internal/compiler/implementation/resolution/members.dart » ('j') | 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 part of dart2js; 5 part of dart2js;
6 6
7 class EnqueueTask extends CompilerTask { 7 class EnqueueTask extends CompilerTask {
8 final ResolutionEnqueuer resolution; 8 final ResolutionEnqueuer resolution;
9 final CodegenEnqueuer codegen; 9 final CodegenEnqueuer codegen;
10 10
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 // supertypes. 275 // supertypes.
276 cls.ensureResolved(compiler); 276 cls.ensureResolved(compiler);
277 277
278 void processClass(ClassElement cls) { 278 void processClass(ClassElement cls) {
279 if (seenClasses.contains(cls)) return; 279 if (seenClasses.contains(cls)) return;
280 280
281 seenClasses.add(cls); 281 seenClasses.add(cls);
282 cls.ensureResolved(compiler); 282 cls.ensureResolved(compiler);
283 cls.implementation.forEachMember(processInstantiatedClassMember); 283 cls.implementation.forEachMember(processInstantiatedClassMember);
284 if (isResolutionQueue) { 284 if (isResolutionQueue) {
285 // Only the resolution queue needs to operate on individual
286 // fields. The codegen enqueuer inlines the potential field
287 // intializations in the constructor.
288 cls.implementation.forEachInstanceField((_, Element field) {
289 addToWorkList(field);
290 }, includeSuperAndInjectedMembers: true);
285 compiler.resolver.checkClass(cls); 291 compiler.resolver.checkClass(cls);
286 } 292 }
287 } 293 }
288 processClass(cls); 294 processClass(cls);
289 for (Link<DartType> supertypes = cls.allSupertypes; 295 for (Link<DartType> supertypes = cls.allSupertypes;
290 !supertypes.isEmpty; supertypes = supertypes.tail) { 296 !supertypes.isEmpty; supertypes = supertypes.tail) {
291 processClass(supertypes.head.element); 297 processClass(supertypes.head.element);
292 } 298 }
293 }); 299 });
294 } 300 }
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 while(!queue.isEmpty) { 721 while(!queue.isEmpty) {
716 // TODO(johnniwinther): Find an optimal process order for codegen. 722 // TODO(johnniwinther): Find an optimal process order for codegen.
717 f(queue.removeLast()); 723 f(queue.removeLast());
718 } 724 }
719 } 725 }
720 726
721 void _logSpecificSummary(log(message)) { 727 void _logSpecificSummary(log(message)) {
722 log('Compiled ${generatedCode.length} methods.'); 728 log('Compiled ${generatedCode.length} methods.');
723 } 729 }
724 } 730 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/resolution/members.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698