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

Side by Side Diff: dart/lib/compiler/implementation/resolver.dart

Issue 10982089: Remove AbstractVisitor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 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 abstract class TreeElements { 5 abstract class TreeElements {
6 Element operator[](Node node); 6 Element operator[](Node node);
7 Selector getSelector(Send send); 7 Selector getSelector(Send send);
8 DartType getType(TypeAnnotation annotation); 8 DartType getType(TypeAnnotation annotation);
9 bool isParameterChecked(Element element); 9 bool isParameterChecked(Element element);
10 } 10 }
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 error(link.head, MessageKind.INVALID_INITIALIZER); 697 error(link.head, MessageKind.INVALID_INITIALIZER);
698 } 698 }
699 } 699 }
700 if (!resolvedSuper) { 700 if (!resolvedSuper) {
701 resolveImplicitSuperConstructorSend(constructor, functionNode); 701 resolveImplicitSuperConstructorSend(constructor, functionNode);
702 } 702 }
703 return null; // If there was no redirection always return null. 703 return null; // If there was no redirection always return null.
704 } 704 }
705 } 705 }
706 706
707 class CommonResolverVisitor<R> extends AbstractVisitor<R> { 707 class CommonResolverVisitor<R> extends Visitor<R> {
708 final Compiler compiler; 708 final Compiler compiler;
709 709
710 CommonResolverVisitor(Compiler this.compiler); 710 CommonResolverVisitor(Compiler this.compiler);
711 711
712 R visitNode(Node node) { 712 R visitNode(Node node) {
713 cancel(node, 713 cancel(node,
714 'internal error: Unhandled node: ${node.getObjectDescription()}'); 714 'internal error: Unhandled node: ${node.getObjectDescription()}');
715 } 715 }
716 716
717 R visitEmptyStatement(Node node) => null; 717 R visitEmptyStatement(Node node) => null;
(...skipping 2162 matching lines...) Expand 10 before | Expand all | Expand 10 after
2880 2880
2881 Element localLookup(SourceString name) => library.find(name); 2881 Element localLookup(SourceString name) => library.find(name);
2882 Element lookup(SourceString name) => localLookup(name); 2882 Element lookup(SourceString name) => localLookup(name);
2883 Element lexicalLookup(SourceString name) => localLookup(name); 2883 Element lexicalLookup(SourceString name) => localLookup(name);
2884 2884
2885 Element add(Element newElement) { 2885 Element add(Element newElement) {
2886 throw "Cannot add an element in the top scope"; 2886 throw "Cannot add an element in the top scope";
2887 } 2887 }
2888 String toString() => '$element'; 2888 String toString() => '$element';
2889 } 2889 }
OLDNEW
« no previous file with comments | « dart/lib/compiler/implementation/resolved_visitor.dart ('k') | dart/lib/compiler/implementation/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698