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

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

Issue 14168003: Implement implicit constructors in mixin applications. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix an assert. Created 7 years, 7 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
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 /** 53 /**
54 * Documentation wanted -- johnniwinther 54 * Documentation wanted -- johnniwinther
55 * 55 *
56 * Invariant: [element] must be a declaration element. 56 * Invariant: [element] must be a declaration element.
57 */ 57 */
58 void addToWorkList(Element element, [TreeElements elements]) { 58 void addToWorkList(Element element, [TreeElements elements]) {
59 assert(invariant(element, element.isDeclaration)); 59 assert(invariant(element, element.isDeclaration));
60 if (element.isForeign(compiler)) return; 60 if (element.isForeign(compiler)) return;
61 61
62 if (element.isForwardingConstructor) {
63 addToWorkList(element.targetConstructor, elements);
64 return;
65 }
66
62 if (!addElementToWorkList(element, elements)) return; 67 if (!addElementToWorkList(element, elements)) return;
63 68
64 // Enable runtime type support if we discover a getter called runtimeType. 69 // Enable runtime type support if we discover a getter called runtimeType.
65 // We have to enable runtime type before hitting the codegen, so 70 // We have to enable runtime type before hitting the codegen, so
66 // that constructors know whether they need to generate code for 71 // that constructors know whether they need to generate code for
67 // runtime type. 72 // runtime type.
68 if (element.isGetter() && element.name == Compiler.RUNTIME_TYPE) { 73 if (element.isGetter() && element.name == Compiler.RUNTIME_TYPE) {
69 compiler.enabledRuntimeType = true; 74 compiler.enabledRuntimeType = true;
70 // TODO(ahe): Record precise dependency here. 75 // TODO(ahe): Record precise dependency here.
71 compiler.backend.registerRuntimeType(compiler.globalDependencies); 76 compiler.backend.registerRuntimeType(compiler.globalDependencies);
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 while(!queue.isEmpty) { 607 while(!queue.isEmpty) {
603 // TODO(johnniwinther): Find an optimal process order for codegen. 608 // TODO(johnniwinther): Find an optimal process order for codegen.
604 f(queue.removeLast()); 609 f(queue.removeLast());
605 } 610 }
606 } 611 }
607 612
608 void _logSpecificSummary(log(message)) { 613 void _logSpecificSummary(log(message)) {
609 log('Compiled ${generatedCode.length} methods.'); 614 log('Compiled ${generatedCode.length} methods.');
610 } 615 }
611 } 616 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698