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

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

Issue 10825177: Unify ClassElement and TypedefElement. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
« no previous file with comments | « lib/compiler/implementation/ssa/ssa.dart ('k') | lib/compiler/implementation/warnings.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 class TypeCheckerTask extends CompilerTask { 5 class TypeCheckerTask extends CompilerTask {
6 TypeCheckerTask(Compiler compiler) : super(compiler); 6 TypeCheckerTask(Compiler compiler) : super(compiler);
7 String get name() => "Type checker"; 7 String get name() => "Type checker";
8 8
9 static final bool LOG_FAILURES = false; 9 static final bool LOG_FAILURES = false;
10 10
(...skipping 12 matching lines...) Expand all
23 }); 23 });
24 } 24 }
25 } 25 }
26 26
27 interface Type { 27 interface Type {
28 SourceString get name(); 28 SourceString get name();
29 Element get element(); 29 Element get element();
30 } 30 }
31 31
32 class TypeVariableType implements Type { 32 class TypeVariableType implements Type {
33 final SourceString name; 33 final TypeVariableElement element;
34 TypeVariableElement element; 34
35 TypeVariableType(this.name, [this.element]); 35 TypeVariableType(this.element);
36
37 SourceString get name() => element.name;
36 38
37 toString() => name.slowToString(); 39 toString() => name.slowToString();
38 } 40 }
39 41
40 /** 42 /**
41 * A statement type tracks whether a statement returns or may return. 43 * A statement type tracks whether a statement returns or may return.
42 */ 44 */
43 class StatementType implements Type { 45 class StatementType implements Type {
44 final String stringName; 46 final String stringName;
45 Element get element() => null; 47 Element get element() => null;
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 } 774 }
773 775
774 visitCatchBlock(CatchBlock node) { 776 visitCatchBlock(CatchBlock node) {
775 return unhandledStatement(); 777 return unhandledStatement();
776 } 778 }
777 779
778 visitTypedef(Typedef node) { 780 visitTypedef(Typedef node) {
779 return unhandledStatement(); 781 return unhandledStatement();
780 } 782 }
781 } 783 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/ssa/ssa.dart ('k') | lib/compiler/implementation/warnings.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698