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

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

Issue 448943004: Refactor and simplify the dart2dart renamer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix minifying name generation Created 6 years, 4 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 AnalyzableElement get analyzedElement; 8 AnalyzableElement get analyzedElement;
9 Iterable<Node> get superUses; 9 Iterable<Node> get superUses;
10 10
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 } 739 }
740 740
741 TreeElements resolveField(FieldElementX element) { 741 TreeElements resolveField(FieldElementX element) {
742 VariableDefinitions tree = element.parseNode(compiler); 742 VariableDefinitions tree = element.parseNode(compiler);
743 if(element.modifiers.isStatic && element.isTopLevel) { 743 if(element.modifiers.isStatic && element.isTopLevel) {
744 error(element.modifiers.getStatic(), 744 error(element.modifiers.getStatic(),
745 MessageKind.TOP_LEVEL_VARIABLE_DECLARED_STATIC); 745 MessageKind.TOP_LEVEL_VARIABLE_DECLARED_STATIC);
746 } 746 }
747 ResolverVisitor visitor = visitorFor(element); 747 ResolverVisitor visitor = visitorFor(element);
748 ResolutionRegistry registry = visitor.registry; 748 ResolutionRegistry registry = visitor.registry;
749 // TODO(johnniwinther): Maybe remove this when placeholderCollector migrates
750 // to the backend ast.
751 registry.defineElement(tree.definitions.nodes.head, element);
749 // TODO(johnniwinther): Share the resolved type between all variables 752 // TODO(johnniwinther): Share the resolved type between all variables
750 // declared in the same declaration. 753 // declared in the same declaration.
751 if (tree.type != null) { 754 if (tree.type != null) {
752 element.variables.type = visitor.resolveTypeAnnotation(tree.type); 755 element.variables.type = visitor.resolveTypeAnnotation(tree.type);
753 } else { 756 } else {
754 element.variables.type = const DynamicType(); 757 element.variables.type = const DynamicType();
755 } 758 }
756 759
757 Expression initializer = element.initializer; 760 Expression initializer = element.initializer;
758 Modifiers modifiers = element.modifiers; 761 Modifiers modifiers = element.modifiers;
(...skipping 4181 matching lines...) Expand 10 before | Expand all | Expand 10 after
4940 } 4943 }
4941 4944
4942 /// The result for the resolution of the `assert` method. 4945 /// The result for the resolution of the `assert` method.
4943 class AssertResult implements ResolutionResult { 4946 class AssertResult implements ResolutionResult {
4944 const AssertResult(); 4947 const AssertResult();
4945 4948
4946 Element get element => null; 4949 Element get element => null;
4947 4950
4948 String toString() => 'AssertResult()'; 4951 String toString() => 'AssertResult()';
4949 } 4952 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698