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

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

Issue 11416280: Decouple the constant handler from the compiler so we can have more than one. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge from master.' Created 8 years 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 operator[](Node node); 8 Element operator[](Node node);
9 Selector getSelector(Send send); 9 Selector getSelector(Send send);
10 DartType getType(Node node); 10 DartType getType(Node node);
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 637
638 void resolveMetadataAnnotation(PartialMetadataAnnotation annotation) { 638 void resolveMetadataAnnotation(PartialMetadataAnnotation annotation) {
639 compiler.withCurrentElement(annotation.annotatedElement, () => measure(() { 639 compiler.withCurrentElement(annotation.annotatedElement, () => measure(() {
640 assert(annotation.resolutionState == STATE_NOT_STARTED); 640 assert(annotation.resolutionState == STATE_NOT_STARTED);
641 annotation.resolutionState = STATE_STARTED; 641 annotation.resolutionState = STATE_STARTED;
642 642
643 Node node = annotation.parseNode(compiler); 643 Node node = annotation.parseNode(compiler);
644 ResolverVisitor visitor = 644 ResolverVisitor visitor =
645 visitorFor(annotation.annotatedElement.enclosingElement); 645 visitorFor(annotation.annotatedElement.enclosingElement);
646 node.accept(visitor); 646 node.accept(visitor);
647 annotation.value = compiler.constantHandler.compileNodeWithDefinitions( 647 annotation.value = compiler.metadataHandler.compileNodeWithDefinitions(
648 node, visitor.mapping, isConst: true); 648 node, visitor.mapping, isConst: true);
649 649
650 annotation.resolutionState = STATE_DONE; 650 annotation.resolutionState = STATE_DONE;
651 })); 651 }));
652 } 652 }
653 653
654 error(Node node, MessageKind kind, [arguments = const []]) { 654 error(Node node, MessageKind kind, [arguments = const []]) {
655 ResolutionError message = new ResolutionError(kind, arguments); 655 ResolutionError message = new ResolutionError(kind, arguments);
656 compiler.reportError(node, message); 656 compiler.reportError(node, message);
657 } 657 }
(...skipping 2513 matching lines...) Expand 10 before | Expand all | Expand 10 after
3171 return e; 3171 return e;
3172 } 3172 }
3173 3173
3174 /// Assumed to be called by [resolveRedirectingFactory]. 3174 /// Assumed to be called by [resolveRedirectingFactory].
3175 Element visitReturn(Return node) { 3175 Element visitReturn(Return node) {
3176 Node expression = node.expression; 3176 Node expression = node.expression;
3177 return finishConstructorReference(visit(expression), 3177 return finishConstructorReference(visit(expression),
3178 expression, expression); 3178 expression, expression);
3179 } 3179 }
3180 } 3180 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/compiler.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