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

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

Issue 10917208: Change interfaces to abstract classes in dart2js compiler. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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 interface 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 }
11 11
12 class TreeElementMapping implements TreeElements { 12 class TreeElementMapping implements TreeElements {
13 final Map<Node, Element> map; 13 final Map<Node, Element> map;
14 final Map<Node, Selector> selectors; 14 final Map<Node, Selector> selectors;
15 final Map<TypeAnnotation, DartType> types; 15 final Map<TypeAnnotation, DartType> types;
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 710
711 void internalError(Node node, String message) { 711 void internalError(Node node, String message) {
712 compiler.internalError(message, node: node); 712 compiler.internalError(message, node: node);
713 } 713 }
714 714
715 void unimplemented(Node node, String message) { 715 void unimplemented(Node node, String message) {
716 compiler.unimplemented(message, node: node); 716 compiler.unimplemented(message, node: node);
717 } 717 }
718 } 718 }
719 719
720 interface LabelScope { 720 abstract class LabelScope {
721 LabelScope get outer; 721 LabelScope get outer;
722 LabelElement lookup(String label); 722 LabelElement lookup(String label);
723 } 723 }
724 724
725 class LabeledStatementLabelScope implements LabelScope { 725 class LabeledStatementLabelScope implements LabelScope {
726 final LabelScope outer; 726 final LabelScope outer;
727 final Map<String, LabelElement> labels; 727 final Map<String, LabelElement> labels;
728 LabeledStatementLabelScope(this.outer, this.labels); 728 LabeledStatementLabelScope(this.outer, this.labels);
729 LabelElement lookup(String labelName) { 729 LabelElement lookup(String labelName) {
730 LabelElement label = labels[labelName]; 730 LabelElement label = labels[labelName];
(...skipping 2029 matching lines...) Expand 10 before | Expand all | Expand 10 after
2760 2760
2761 Element localLookup(SourceString name) => library.find(name); 2761 Element localLookup(SourceString name) => library.find(name);
2762 Element lookup(SourceString name) => localLookup(name); 2762 Element lookup(SourceString name) => localLookup(name);
2763 Element lexicalLookup(SourceString name) => localLookup(name); 2763 Element lexicalLookup(SourceString name) => localLookup(name);
2764 2764
2765 Element add(Element newElement) { 2765 Element add(Element newElement) {
2766 throw "Cannot add an element in the top scope"; 2766 throw "Cannot add an element in the top scope";
2767 } 2767 }
2768 String toString() => '$element'; 2768 String toString() => '$element';
2769 } 2769 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698