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

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

Issue 10310040: Sort the output (for now just the classes and instance members). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add test. Created 8 years, 7 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/closure.dart ('k') | lib/compiler/implementation/universe.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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 static final LIST = const SourceString('List'); 112 static final LIST = const SourceString('List');
113 113
114 final InterfaceType voidType; 114 final InterfaceType voidType;
115 final InterfaceType dynamicType; 115 final InterfaceType dynamicType;
116 116
117 Types(Element dynamicElement) 117 Types(Element dynamicElement)
118 : this.with(dynamicElement, new LibraryElement(new Script(null, null))); 118 : this.with(dynamicElement, new LibraryElement(new Script(null, null)));
119 119
120 // TODO(karlklose): should we have a class Void? 120 // TODO(karlklose): should we have a class Void?
121 Types.with(Element dynamicElement, LibraryElement library) 121 Types.with(Element dynamicElement, LibraryElement library)
122 : voidType = new InterfaceType(new ClassElement(VOID, library)), 122 : voidType = new InterfaceType(new ClassElement(VOID, library, -1)),
123 dynamicType = new InterfaceType(dynamicElement); 123 dynamicType = new InterfaceType(dynamicElement);
124 124
125 Type lookup(SourceString s) { 125 Type lookup(SourceString s) {
126 if (VOID == s) { 126 if (VOID == s) {
127 return voidType; 127 return voidType;
128 } else if (DYNAMIC == s || s.stringValue === 'var') { 128 } else if (DYNAMIC == s || s.stringValue === 'var') {
129 return dynamicType; 129 return dynamicType;
130 } 130 }
131 return null; 131 return null;
132 } 132 }
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 } 729 }
730 730
731 visitCatchBlock(CatchBlock node) { 731 visitCatchBlock(CatchBlock node) {
732 fail(node); 732 fail(node);
733 } 733 }
734 734
735 visitTypedef(Typedef node) { 735 visitTypedef(Typedef node) {
736 fail(node); 736 fail(node);
737 } 737 }
738 } 738 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/ssa/closure.dart ('k') | lib/compiler/implementation/universe.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698