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

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

Issue 10826243: Restore lazy parsing of classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 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 | dart/lib/compiler/implementation/world.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 final bool REPORT_EXCESS_RESOLUTION = false; 10 final bool REPORT_EXCESS_RESOLUTION = false;
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 reportFatalError('Could not find $MAIN', mainApp); 573 reportFatalError('Could not find $MAIN', mainApp);
574 } else { 574 } else {
575 if (!main.isFunction()) reportFatalError('main is not a function', main); 575 if (!main.isFunction()) reportFatalError('main is not a function', main);
576 FunctionElement mainMethod = main; 576 FunctionElement mainMethod = main;
577 FunctionSignature parameters = mainMethod.computeSignature(this); 577 FunctionSignature parameters = mainMethod.computeSignature(this);
578 parameters.forEachParameter((Element parameter) { 578 parameters.forEachParameter((Element parameter) {
579 reportFatalError('main cannot have parameters', parameter); 579 reportFatalError('main cannot have parameters', parameter);
580 }); 580 });
581 } 581 }
582 582
583 // TODO(ahe): Remove this line. Eventually, enqueuer.resolution
584 // should know this.
585 world.populate(this, libraries.getValues());
586
587 log('Resolving...'); 583 log('Resolving...');
588 phase = PHASE_RESOLVING; 584 phase = PHASE_RESOLVING;
589 backend.enqueueHelpers(enqueuer.resolution); 585 backend.enqueueHelpers(enqueuer.resolution);
590 processQueue(enqueuer.resolution, main); 586 processQueue(enqueuer.resolution, main);
591 log('Resolved ${enqueuer.resolution.resolvedElements.length} elements.'); 587 log('Resolved ${enqueuer.resolution.resolvedElements.length} elements.');
592 588
593 if (compilationFailed) return; 589 if (compilationFailed) return;
594 590
595 log('Inferring types...'); 591 log('Inferring types...');
596 typesTask.onResolutionComplete(); 592 typesTask.onResolutionComplete();
597 593
594 // TODO(ahe): Remove this line. Eventually, enqueuer.resolution
595 // should know this.
596 world.populate(this);
597
598 log('Compiling...'); 598 log('Compiling...');
599 phase = PHASE_COMPILING; 599 phase = PHASE_COMPILING;
600 processQueue(enqueuer.codegen, main); 600 processQueue(enqueuer.codegen, main);
601 log("Recompiling ${enqueuer.codegen.recompilationCandidates.length} " 601 log("Recompiling ${enqueuer.codegen.recompilationCandidates.length} "
602 "methods..."); 602 "methods...");
603 phase = PHASE_RECOMPILING; 603 phase = PHASE_RECOMPILING;
604 processRecompilationQueue(enqueuer.codegen); 604 processRecompilationQueue(enqueuer.codegen);
605 log('Compiled ${codegenWorld.generatedCode.length} methods.'); 605 log('Compiled ${codegenWorld.generatedCode.length} methods.');
606 606
607 if (compilationFailed) return; 607 if (compilationFailed) return;
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 final endOffset = end.charOffset + end.slowCharCount; 946 final endOffset = end.charOffset + end.slowCharCount;
947 947
948 // [begin] and [end] might be the same for the same empty token. This 948 // [begin] and [end] might be the same for the same empty token. This
949 // happens for instance when scanning '$$'. 949 // happens for instance when scanning '$$'.
950 assert(endOffset >= beginOffset); 950 assert(endOffset >= beginOffset);
951 return f(beginOffset, endOffset); 951 return f(beginOffset, endOffset);
952 } 952 }
953 953
954 String toString() => 'SourceSpan($uri, $begin, $end)'; 954 String toString() => 'SourceSpan($uri, $begin, $end)';
955 } 955 }
OLDNEW
« no previous file with comments | « no previous file | dart/lib/compiler/implementation/world.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698