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

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

Issue 10917110: Revert "Collect the types used in is-checks in the resolver phase." (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
« 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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 367
368 addForeignFunctions(jsHelperLibrary); 368 addForeignFunctions(jsHelperLibrary);
369 addForeignFunctions(interceptorsLibrary); 369 addForeignFunctions(interceptorsLibrary);
370 370
371 libraries['dart:core'] = coreLibrary; 371 libraries['dart:core'] = coreLibrary;
372 libraries['dart:coreimpl'] = coreImplLibrary; 372 libraries['dart:coreimpl'] = coreImplLibrary;
373 373
374 assertMethod = coreLibrary.find(const SourceString('assert')); 374 assertMethod = coreLibrary.find(const SourceString('assert'));
375 375
376 initializeSpecialClasses(); 376 initializeSpecialClasses();
377
378 //patchDartLibrary(coreLibrary, 'core');
379 //patchDartLibrary(coreImplLibrary, 'coreimpl');
377 } 380 }
378 381
379 void importCoreLibrary(LibraryElement library) { 382 void importCoreLibrary(LibraryElement library) {
380 Uri coreUri = new Uri.fromComponents(scheme: 'dart', path: 'core'); 383 Uri coreUri = new Uri.fromComponents(scheme: 'dart', path: 'core');
381 if (coreLibrary === null) { 384 if (coreLibrary === null) {
382 coreLibrary = scanner.loadLibrary(coreUri, null, coreUri); 385 coreLibrary = scanner.loadLibrary(coreUri, null, coreUri);
383 } 386 }
384 scanner.importLibrary(library, 387 scanner.importLibrary(library,
385 coreLibrary, 388 coreLibrary,
386 null, 389 null,
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 phase = PHASE_COMPILING; 572 phase = PHASE_COMPILING;
570 processQueue(enqueuer.codegen, main); 573 processQueue(enqueuer.codegen, main);
571 log("Recompiling ${enqueuer.codegen.recompilationCandidates.length} " 574 log("Recompiling ${enqueuer.codegen.recompilationCandidates.length} "
572 "methods..."); 575 "methods...");
573 phase = PHASE_RECOMPILING; 576 phase = PHASE_RECOMPILING;
574 processRecompilationQueue(enqueuer.codegen); 577 processRecompilationQueue(enqueuer.codegen);
575 log('Compiled ${codegenWorld.generatedCode.length} methods.'); 578 log('Compiled ${codegenWorld.generatedCode.length} methods.');
576 579
577 if (compilationFailed) return; 580 if (compilationFailed) return;
578 581
579 // TODO(karlklose): also take the instantiated types into account and move
580 // this computation to before codegen.
581 enqueuer.codegen.universe.computeRequiredTypes(
582 enqueuer.resolution.universe.isChecks);
583
584 backend.assembleProgram(); 582 backend.assembleProgram();
585 583
586 checkQueues(); 584 checkQueues();
587 } 585 }
588 586
589 void processQueue(Enqueuer world, Element main) { 587 void processQueue(Enqueuer world, Element main) {
590 backend.processNativeClasses(world, libraries.getValues()); 588 backend.processNativeClasses(world, libraries.getValues());
591 world.addToWorkList(main); 589 world.addToWorkList(main);
592 progress.reset(); 590 progress.reset();
593 world.forEach((WorkItem work) { 591 world.forEach((WorkItem work) {
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 final endOffset = end.charOffset + end.slowCharCount; 926 final endOffset = end.charOffset + end.slowCharCount;
929 927
930 // [begin] and [end] might be the same for the same empty token. This 928 // [begin] and [end] might be the same for the same empty token. This
931 // happens for instance when scanning '$$'. 929 // happens for instance when scanning '$$'.
932 assert(endOffset >= beginOffset); 930 assert(endOffset >= beginOffset);
933 return f(beginOffset, endOffset); 931 return f(beginOffset, endOffset);
934 } 932 }
935 933
936 String toString() => 'SourceSpan($uri, $begin, $end)'; 934 String toString() => 'SourceSpan($uri, $begin, $end)';
937 } 935 }
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