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

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

Issue 10115026: Address the remaining review comments on http://chromiumcodereview.appspot.com/9431029. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Break a long line. 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
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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
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;
65 final Element element; 64 final Element element;
66 final Link<Type> arguments; 65 final Link<Type> arguments;
67 66
68 const InterfaceType(this.name, this.element, 67 const InterfaceType(name, this.element,
69 [this.arguments = const EmptyLink<Type>()]); 68 [this.arguments = const EmptyLink<Type>()]);
70 69
70 SourceString get name() => element.name;
71
71 toString() { 72 toString() {
72 StringBuffer sb = new StringBuffer(); 73 StringBuffer sb = new StringBuffer();
73 sb.add(name.slowToString()); 74 sb.add(name.slowToString());
74 if (!arguments.isEmpty()) { 75 if (!arguments.isEmpty()) {
75 sb.add('<'); 76 sb.add('<');
76 arguments.printOn(sb); 77 arguments.printOn(sb, ', ');
77 sb.add('>'); 78 sb.add('>');
78 } 79 }
79 return sb.toString(); 80 return sb.toString();
80 } 81 }
81 } 82 }
82 83
83 class FunctionType implements Type { 84 class FunctionType implements Type {
84 final Element element; 85 final Element element;
85 final Type returnType; 86 final Type returnType;
86 final Link<Type> parameterTypes; 87 final Link<Type> parameterTypes;
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 } 728 }
728 729
729 visitCatchBlock(CatchBlock node) { 730 visitCatchBlock(CatchBlock node) {
730 fail(node); 731 fail(node);
731 } 732 }
732 733
733 visitTypedef(Typedef node) { 734 visitTypedef(Typedef node) {
734 fail(node); 735 fail(node);
735 } 736 }
736 } 737 }
OLDNEW
« lib/compiler/implementation/resolver.dart ('K') | « lib/compiler/implementation/ssa/tracer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698