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

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

Issue 10911181: Collect getters in a FunctionSet while resolving. (Closed) Base URL: http://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
« no previous file with comments | « no previous file | lib/compiler/implementation/enqueue.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 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 const bool REPORT_EXCESS_RESOLUTION = false; 10 const bool REPORT_EXCESS_RESOLUTION = false;
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 bool hasCrashed = false; 174 bool hasCrashed = false;
175 175
176 Compiler([this.tracer = const Tracer(), 176 Compiler([this.tracer = const Tracer(),
177 this.enableTypeAssertions = false, 177 this.enableTypeAssertions = false,
178 this.enableUserAssertions = false, 178 this.enableUserAssertions = false,
179 this.enableMinification = false, 179 this.enableMinification = false,
180 bool emitJavaScript = true, 180 bool emitJavaScript = true,
181 bool generateSourceMap = true, 181 bool generateSourceMap = true,
182 bool cutDeclarationTypes = false]) 182 bool cutDeclarationTypes = false])
183 : libraries = new Map<String, LibraryElement>(), 183 : libraries = new Map<String, LibraryElement>(),
184 world = new World(),
185 progress = new Stopwatch() { 184 progress = new Stopwatch() {
186 progress.start(); 185 progress.start();
186 world = new World(this);
187 scanner = new ScannerTask(this); 187 scanner = new ScannerTask(this);
188 dietParser = new DietParserTask(this); 188 dietParser = new DietParserTask(this);
189 parser = new ParserTask(this); 189 parser = new ParserTask(this);
190 patchParser = new PatchParserTask(this); 190 patchParser = new PatchParserTask(this);
191 validator = new TreeValidatorTask(this); 191 validator = new TreeValidatorTask(this);
192 resolver = new ResolverTask(this); 192 resolver = new ResolverTask(this);
193 closureToClassMapper = new closureMapping.ClosureTask(this); 193 closureToClassMapper = new closureMapping.ClosureTask(this);
194 checker = new TypeCheckerTask(this); 194 checker = new TypeCheckerTask(this);
195 typesTask = new ti.TypesTask(this); 195 typesTask = new ti.TypesTask(this);
196 backend = emitJavaScript ? 196 backend = emitJavaScript ?
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 processQueue(enqueuer.resolution, main); 547 processQueue(enqueuer.resolution, main);
548 log('Resolved ${enqueuer.resolution.resolvedElements.length} elements.'); 548 log('Resolved ${enqueuer.resolution.resolvedElements.length} elements.');
549 549
550 if (compilationFailed) return; 550 if (compilationFailed) return;
551 551
552 log('Inferring types...'); 552 log('Inferring types...');
553 typesTask.onResolutionComplete(); 553 typesTask.onResolutionComplete();
554 554
555 // TODO(ahe): Remove this line. Eventually, enqueuer.resolution 555 // TODO(ahe): Remove this line. Eventually, enqueuer.resolution
556 // should know this. 556 // should know this.
557 world.populate(this); 557 world.populate();
558 558
559 log('Compiling...'); 559 log('Compiling...');
560 phase = PHASE_COMPILING; 560 phase = PHASE_COMPILING;
561 processQueue(enqueuer.codegen, main); 561 processQueue(enqueuer.codegen, main);
562 log("Recompiling ${enqueuer.codegen.recompilationCandidates.length} " 562 log("Recompiling ${enqueuer.codegen.recompilationCandidates.length} "
563 "methods..."); 563 "methods...");
564 phase = PHASE_RECOMPILING; 564 phase = PHASE_RECOMPILING;
565 processRecompilationQueue(enqueuer.codegen); 565 processRecompilationQueue(enqueuer.codegen);
566 log('Compiled ${codegenWorld.generatedCode.length} methods.'); 566 log('Compiled ${codegenWorld.generatedCode.length} methods.');
567 567
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 final endOffset = end.charOffset + end.slowCharCount; 922 final endOffset = end.charOffset + end.slowCharCount;
923 923
924 // [begin] and [end] might be the same for the same empty token. This 924 // [begin] and [end] might be the same for the same empty token. This
925 // happens for instance when scanning '$$'. 925 // happens for instance when scanning '$$'.
926 assert(endOffset >= beginOffset); 926 assert(endOffset >= beginOffset);
927 return f(beginOffset, endOffset); 927 return f(beginOffset, endOffset);
928 } 928 }
929 929
930 String toString() => 'SourceSpan($uri, $begin, $end)'; 930 String toString() => 'SourceSpan($uri, $begin, $end)';
931 } 931 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698