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

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

Issue 10891004: [dart2dart] Optionally cut types in variable declarations: (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 5
6 /** 6 /**
7 * If true, print a warning for each method that was resolved, but not 7 * If true, print a warning for each method that was resolved, but not
8 * compiled. 8 * compiled.
9 */ 9 */
10 final bool REPORT_EXCESS_RESOLUTION = false; 10 final bool REPORT_EXCESS_RESOLUTION = false;
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 bool compilationFailed = false; 162 bool compilationFailed = false;
163 163
164 bool hasCrashed = false; 164 bool hasCrashed = false;
165 165
166 Compiler([this.tracer = const Tracer(), 166 Compiler([this.tracer = const Tracer(),
167 this.enableTypeAssertions = false, 167 this.enableTypeAssertions = false,
168 this.enableUserAssertions = false, 168 this.enableUserAssertions = false,
169 bool emitJavascript = true, 169 bool emitJavascript = true,
170 bool generateSourceMap = true, 170 bool generateSourceMap = true,
171 bool minify = false]) 171 bool minify = false,
172 bool cutDeclarationTypes = false])
172 : libraries = new Map<String, LibraryElement>(), 173 : libraries = new Map<String, LibraryElement>(),
173 world = new World(), 174 world = new World(),
174 progress = new Stopwatch.start() { 175 progress = new Stopwatch.start() {
175 namer = new Namer(this); 176 namer = new Namer(this);
176 constantHandler = new ConstantHandler(this); 177 constantHandler = new ConstantHandler(this);
177 scanner = new ScannerTask(this); 178 scanner = new ScannerTask(this);
178 dietParser = new DietParserTask(this); 179 dietParser = new DietParserTask(this);
179 parser = new ParserTask(this); 180 parser = new ParserTask(this);
180 patchParser = new PatchParserTask(this); 181 patchParser = new PatchParserTask(this);
181 validator = new TreeValidatorTask(this); 182 validator = new TreeValidatorTask(this);
182 resolver = new ResolverTask(this); 183 resolver = new ResolverTask(this);
183 closureToClassMapper = new closureMapping.ClosureTask(this); 184 closureToClassMapper = new closureMapping.ClosureTask(this);
184 checker = new TypeCheckerTask(this); 185 checker = new TypeCheckerTask(this);
185 typesTask = new ti.TypesTask(this); 186 typesTask = new ti.TypesTask(this);
186 backend = emitJavascript ? 187 backend = emitJavascript ?
187 new js_backend.JavaScriptBackend(this, generateSourceMap) : 188 new js_backend.JavaScriptBackend(this, generateSourceMap) :
188 new dart_backend.DartBackend(this, minify); 189 new dart_backend.DartBackend(this, minify, cutDeclarationTypes);
189 enqueuer = new EnqueueTask(this); 190 enqueuer = new EnqueueTask(this);
190 tasks = [scanner, dietParser, parser, resolver, closureToClassMapper, 191 tasks = [scanner, dietParser, parser, resolver, closureToClassMapper,
191 checker, typesTask, constantHandler, enqueuer]; 192 checker, typesTask, constantHandler, enqueuer];
192 tasks.addAll(backend.tasks); 193 tasks.addAll(backend.tasks);
193 } 194 }
194 195
195 Universe get resolverWorld => enqueuer.resolution.universe; 196 Universe get resolverWorld => enqueuer.resolution.universe;
196 Universe get codegenWorld => enqueuer.codegen.universe; 197 Universe get codegenWorld => enqueuer.codegen.universe;
197 198
198 int getNextFreeClassId() => nextFreeClassId++; 199 int getNextFreeClassId() => nextFreeClassId++;
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 final endOffset = end.charOffset + end.slowCharCount; 894 final endOffset = end.charOffset + end.slowCharCount;
894 895
895 // [begin] and [end] might be the same for the same empty token. This 896 // [begin] and [end] might be the same for the same empty token. This
896 // happens for instance when scanning '$$'. 897 // happens for instance when scanning '$$'.
897 assert(endOffset >= beginOffset); 898 assert(endOffset >= beginOffset);
898 return f(beginOffset, endOffset); 899 return f(beginOffset, endOffset);
899 } 900 }
900 901
901 String toString() => 'SourceSpan($uri, $begin, $end)'; 902 String toString() => 'SourceSpan($uri, $begin, $end)';
902 } 903 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/apiimpl.dart ('k') | lib/compiler/implementation/dart_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698