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

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

Issue 10097020: The element of an InterfaceType can also be a TypedefElement. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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 | « no previous file | no next file » | 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 /** Combine the information about two control-flow edges that are joined. */ 55 /** Combine the information about two control-flow edges that are joined. */
56 StatementType join(StatementType other) { 56 StatementType join(StatementType other) {
57 return (this === other) ? this : MAYBE_RETURNING; 57 return (this === other) ? this : MAYBE_RETURNING;
58 } 58 }
59 59
60 String toString() => stringName; 60 String toString() => stringName;
61 } 61 }
62 62
63 class InterfaceType implements Type { 63 class InterfaceType implements Type {
64 final SourceString name; 64 final SourceString name;
65 final ClassElement element; 65 final Element element;
66 final Link<Type> arguments; 66 final Link<Type> arguments;
67 67
68 const InterfaceType(this.name, this.element, this.arguments); 68 const InterfaceType(this.name, this.element, this.arguments);
69 69
70 toString() { 70 toString() {
71 StringBuffer sb = new StringBuffer(); 71 StringBuffer sb = new StringBuffer();
72 sb.add(name.slowToString()); 72 sb.add(name.slowToString());
73 if (!arguments.isEmpty()) { 73 if (!arguments.isEmpty()) {
74 sb.add('<'); 74 sb.add('<');
75 arguments.printOn(sb); 75 arguments.printOn(sb);
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 } 749 }
750 750
751 visitCatchBlock(CatchBlock node) { 751 visitCatchBlock(CatchBlock node) {
752 fail(node); 752 fail(node);
753 } 753 }
754 754
755 visitTypedef(Typedef node) { 755 visitTypedef(Typedef node) {
756 fail(node); 756 fail(node);
757 } 757 }
758 } 758 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698