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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/resolution/members.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
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 resolution; 5 part of resolution;
6 6
7 abstract class TreeElements { 7 abstract class TreeElements {
8 Element get currentElement; 8 Element get currentElement;
9 Set<Node> get superUses; 9 Set<Node> get superUses;
10 10
(...skipping 2571 matching lines...) Expand 10 before | Expand all | Expand 10 after
2582 world.registerStaticUse(constructor.declaration); 2582 world.registerStaticUse(constructor.declaration);
2583 ClassElement cls = constructor.getEnclosingClass(); 2583 ClassElement cls = constructor.getEnclosingClass();
2584 InterfaceType type = mapping.getType(node); 2584 InterfaceType type = mapping.getType(node);
2585 world.registerInstantiatedType(type, mapping); 2585 world.registerInstantiatedType(type, mapping);
2586 if (constructor.isFactoryConstructor() && !type.typeArguments.isEmpty) { 2586 if (constructor.isFactoryConstructor() && !type.typeArguments.isEmpty) {
2587 world.registerFactoryWithTypeArguments(mapping); 2587 world.registerFactoryWithTypeArguments(mapping);
2588 } 2588 }
2589 if (cls.isAbstract(compiler)) { 2589 if (cls.isAbstract(compiler)) {
2590 compiler.backend.registerAbstractClassInstantiation(mapping); 2590 compiler.backend.registerAbstractClassInstantiation(mapping);
2591 } 2591 }
2592 // [cls] might be the declaration element and we want to include injected
2593 // members.
2594 cls.implementation.forEachInstanceField(
2595 (ClassElement enclosingClass, Element member) {
2596 world.addToWorkList(member);
2597 },
2598 includeSuperAndInjectedMembers: true);
2599 2592
2600 if (isSymbolConstructor) { 2593 if (isSymbolConstructor) {
2601 if (node.isConst()) { 2594 if (node.isConst()) {
2602 Node argumentNode = node.send.arguments.head; 2595 Node argumentNode = node.send.arguments.head;
2603 Constant name = compiler.metadataHandler.compileNodeWithDefinitions( 2596 Constant name = compiler.metadataHandler.compileNodeWithDefinitions(
2604 argumentNode, mapping, isConst: true); 2597 argumentNode, mapping, isConst: true);
2605 if (!name.isString()) { 2598 if (!name.isString()) {
2606 DartType type = name.computeType(compiler); 2599 DartType type = name.computeType(compiler);
2607 compiler.reportErrorCode(argumentNode, MessageKind.STRING_EXPECTED, 2600 compiler.reportErrorCode(argumentNode, MessageKind.STRING_EXPECTED,
2608 {'type': type}); 2601 {'type': type});
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after
3997 return e; 3990 return e;
3998 } 3991 }
3999 3992
4000 /// Assumed to be called by [resolveRedirectingFactory]. 3993 /// Assumed to be called by [resolveRedirectingFactory].
4001 Element visitReturn(Return node) { 3994 Element visitReturn(Return node) {
4002 Node expression = node.expression; 3995 Node expression = node.expression;
4003 return finishConstructorReference(visit(expression), 3996 return finishConstructorReference(visit(expression),
4004 expression, expression); 3997 expression, expression);
4005 } 3998 }
4006 } 3999 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/enqueue.dart ('k') | sdk/lib/_internal/compiler/implementation/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698