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

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

Issue 19387003: Retain abstract classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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 | dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 void pretendElementWasUsed(Element element, TreeElements elements) { 319 void pretendElementWasUsed(Element element, TreeElements elements) {
320 if (Elements.isUnresolved(element)) { 320 if (Elements.isUnresolved(element)) {
321 // Ignore. 321 // Ignore.
322 } else if (element.isSynthesized 322 } else if (element.isSynthesized
323 && element.getLibrary().isPlatformLibrary) { 323 && element.getLibrary().isPlatformLibrary) {
324 // TODO(ahe): Work-around for http://dartbug.com/11205. 324 // TODO(ahe): Work-around for http://dartbug.com/11205.
325 } else if (element.isConstructor()) { 325 } else if (element.isConstructor()) {
326 ClassElement cls = element.declaration.getEnclosingClass(); 326 ClassElement cls = element.declaration.getEnclosingClass();
327 registerInstantiatedType(cls.rawType, elements); 327 registerInstantiatedType(cls.rawType, elements);
328 registerStaticUse(element.declaration); 328 registerStaticUse(element.declaration);
329 } else if (element.isMixinApplication) {
330 // Don't enqueue mixin applications.
331 } else if (element.isClass()) {
332 ClassElement cls = element.declaration;
333 registerInstantiatedType(cls.rawType, elements);
334 // Make sure that even abstract classes are considered instantiated.
335 universe.instantiatedClasses.add(cls);
329 } else if (element.impliesType()) { 336 } else if (element.impliesType()) {
330 // Don't enqueue classes, typedefs, and type variables. 337 // Don't enqueue typedefs, and type variables.
331 } else if (Elements.isStaticOrTopLevel(element)) { 338 } else if (Elements.isStaticOrTopLevel(element)) {
332 registerStaticUse(element.declaration); 339 registerStaticUse(element.declaration);
333 } else if (element.isInstanceMember()) { 340 } else if (element.isInstanceMember()) {
334 Selector selector = new Selector.fromElement(element, compiler); 341 Selector selector = new Selector.fromElement(element, compiler);
335 registerSelectorUse(selector); 342 registerSelectorUse(selector);
336 if (element.isField()) { 343 if (element.isField()) {
337 Selector selector = 344 Selector selector =
338 new Selector.setter(element.name, element.getLibrary()); 345 new Selector.setter(element.name, element.getLibrary());
339 registerInvokedSetter(selector); 346 registerInvokedSetter(selector);
340 } 347 }
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 while(!queue.isEmpty) { 729 while(!queue.isEmpty) {
723 // TODO(johnniwinther): Find an optimal process order for codegen. 730 // TODO(johnniwinther): Find an optimal process order for codegen.
724 f(queue.removeLast()); 731 f(queue.removeLast());
725 } 732 }
726 } 733 }
727 734
728 void _logSpecificSummary(log(message)) { 735 void _logSpecificSummary(log(message)) {
729 log('Compiled ${generatedCode.length} methods.'); 736 log('Compiled ${generatedCode.length} methods.');
730 } 737 }
731 } 738 }
OLDNEW
« no previous file with comments | « no previous file | dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698