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

Side by Side Diff: pkg/compiler/lib/src/compiler.dart

Issue 2611633002: Make closedWorld a property of ClosedWorldRefiner. (Closed)
Patch Set: Created 3 years, 11 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
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 library dart2js.compiler_base; 5 library dart2js.compiler_base;
6 6
7 import 'dart:async' show EventSink, Future; 7 import 'dart:async' show EventSink, Future;
8 8
9 import '../compiler_new.dart' as api; 9 import '../compiler_new.dart' as api;
10 import 'cache_strategy.dart' show CacheStrategy; 10 import 'cache_strategy.dart' show CacheStrategy;
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 // compiler from analyzing all the code. 684 // compiler from analyzing all the code.
685 // TODO(johnniwinther): Reenable this when the reporting is more 685 // TODO(johnniwinther): Reenable this when the reporting is more
686 // precise. 686 // precise.
687 //reportUnusedCode(); 687 //reportUnusedCode();
688 } 688 }
689 return; 689 return;
690 } 690 }
691 assert(mainFunction != null); 691 assert(mainFunction != null);
692 692
693 ClosedWorldRefiner closedWorldRefiner = closeResolution(); 693 ClosedWorldRefiner closedWorldRefiner = closeResolution();
694 // TODO(johnniwinther): Make [ClosedWorld] a property of 694 ClosedWorld closedWorld = closedWorldRefiner.closedWorld;
695 // [ClosedWorldRefiner].
696 ClosedWorld closedWorld = resolverWorld.closedWorldForTesting;
697 695
698 reporter.log('Inferring types...'); 696 reporter.log('Inferring types...');
699 globalInference.runGlobalTypeInference( 697 globalInference.runGlobalTypeInference(
700 mainFunction, closedWorld, closedWorldRefiner); 698 mainFunction, closedWorld, closedWorldRefiner);
701 699
702 if (stopAfterTypeInference) return; 700 if (stopAfterTypeInference) return;
703 701
704 backend.onTypeInferenceComplete(); 702 backend.onTypeInferenceComplete();
705 703
706 reporter.log('Compiling...'); 704 reporter.log('Compiling...');
707 phase = PHASE_COMPILING; 705 phase = PHASE_COMPILING;
708 706
707 codegenWorld.open(closedWorld);
709 enqueuer.codegen.applyImpact(backend.onCodegenStart(closedWorld)); 708 enqueuer.codegen.applyImpact(backend.onCodegenStart(closedWorld));
710 if (compileAll) { 709 if (compileAll) {
711 libraryLoader.libraries.forEach((LibraryElement library) { 710 libraryLoader.libraries.forEach((LibraryElement library) {
712 enqueuer.codegen.applyImpact(computeImpactForLibrary(library)); 711 enqueuer.codegen.applyImpact(computeImpactForLibrary(library));
713 }); 712 });
714 } 713 }
715 processQueue(enqueuer.codegen, mainFunction, 714 processQueue(enqueuer.codegen, mainFunction,
716 onProgress: showCodegenProgress); 715 onProgress: showCodegenProgress);
717 enqueuer.codegen.logSummary(reporter.log); 716 enqueuer.codegen.logSummary(reporter.log);
718 717
(...skipping 1493 matching lines...) Expand 10 before | Expand all | Expand 10 after
2212 _ElementScanner(this.scanner); 2211 _ElementScanner(this.scanner);
2213 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); 2212 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library);
2214 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); 2213 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit);
2215 } 2214 }
2216 2215
2217 class _EmptyEnvironment implements Environment { 2216 class _EmptyEnvironment implements Environment {
2218 const _EmptyEnvironment(); 2217 const _EmptyEnvironment();
2219 2218
2220 String valueOf(String key) => null; 2219 String valueOf(String key) => null;
2221 } 2220 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/universe/world_builder.dart » ('j') | pkg/compiler/lib/src/universe/world_builder.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698