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

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

Issue 2556073002: Remove Compiler.openWorld (Closed)
Patch Set: Cleanup. Created 4 years 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
« no previous file with comments | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/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 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 /// Creates the resolution object. 317 /// Creates the resolution object.
318 /// 318 ///
319 /// Override this to mock resolution for testing. 319 /// Override this to mock resolution for testing.
320 Resolution createResolution() => new CompilerResolution(this); 320 Resolution createResolution() => new CompilerResolution(this);
321 321
322 /// Creates the resolver task. 322 /// Creates the resolver task.
323 /// 323 ///
324 /// Override this to mock the resolver for testing. 324 /// Override this to mock the resolver for testing.
325 ResolverTask createResolverTask() { 325 ResolverTask createResolverTask() {
326 return new ResolverTask( 326 return new ResolverTask(
327 resolution, backend.constantCompilerTask, openWorld, measurer); 327 resolution, backend.constantCompilerTask, measurer);
328 } 328 }
329 329
330 // TODO(johnniwinther): Rename these appropriately when unification of worlds/ 330 // TODO(johnniwinther): Rename these appropriately when unification of worlds/
331 // universes is complete. 331 // universes is complete.
332 ResolutionWorldBuilder get resolverWorld => enqueuer.resolution.universe; 332 ResolutionWorldBuilder get resolverWorld => enqueuer.resolution.universe;
333 CodegenWorldBuilder get codegenWorld => enqueuer.codegen.universe; 333 CodegenWorldBuilder get codegenWorld => enqueuer.codegen.universe;
334 334
335 bool get analyzeAll => options.analyzeAll || compileAll; 335 bool get analyzeAll => options.analyzeAll || compileAll;
336 336
337 bool get compileAll => false; 337 bool get compileAll => false;
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 767
768 backend.sourceInformationStrategy.onComplete(); 768 backend.sourceInformationStrategy.onComplete();
769 769
770 checkQueues(); 770 checkQueues();
771 }); 771 });
772 772
773 /// Perform the steps needed to fully end the resolution phase. 773 /// Perform the steps needed to fully end the resolution phase.
774 void closeResolution() { 774 void closeResolution() {
775 phase = PHASE_DONE_RESOLVING; 775 phase = PHASE_DONE_RESOLVING;
776 776
777 openWorld.closeWorld(reporter); 777 resolverWorld.openWorld.closeWorld(reporter);
778 // Compute whole-program-knowledge that the backend needs. (This might 778 // Compute whole-program-knowledge that the backend needs. (This might
779 // require the information computed in [world.closeWorld].) 779 // require the information computed in [world.closeWorld].)
780 backend.onResolutionComplete(); 780 backend.onResolutionComplete();
781 781
782 deferredLoadTask.onResolutionComplete(mainFunction); 782 deferredLoadTask.onResolutionComplete(mainFunction);
783 783
784 // TODO(johnniwinther): Move this after rti computation but before 784 // TODO(johnniwinther): Move this after rti computation but before
785 // reflection members computation, and (re-)close the world afterwards. 785 // reflection members computation, and (re-)close the world afterwards.
786 closureToClassMapper.createClosureClasses(); 786 closureToClassMapper.createClosureClasses();
787 } 787 }
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1976 _compiler.mirrorUsageAnalyzerTask; 1976 _compiler.mirrorUsageAnalyzerTask;
1977 1977
1978 @override 1978 @override
1979 LibraryElement get coreLibrary => _compiler._coreTypes.coreLibrary; 1979 LibraryElement get coreLibrary => _compiler._coreTypes.coreLibrary;
1980 1980
1981 @override 1981 @override
1982 bool get wasProxyConstantComputedTestingOnly => _proxyConstant != null; 1982 bool get wasProxyConstantComputedTestingOnly => _proxyConstant != null;
1983 1983
1984 @override 1984 @override
1985 void registerClass(ClassElement cls) { 1985 void registerClass(ClassElement cls) {
1986 _compiler.openWorld.registerClass(cls); 1986 enqueuer.universe.openWorld.registerClass(cls);
1987 } 1987 }
1988 1988
1989 @override 1989 @override
1990 void resolveClass(ClassElement cls) { 1990 void resolveClass(ClassElement cls) {
1991 _compiler.resolver.resolveClass(cls); 1991 _compiler.resolver.resolveClass(cls);
1992 } 1992 }
1993 1993
1994 @override 1994 @override
1995 void resolveTypedef(TypedefElement typdef) { 1995 void resolveTypedef(TypedefElement typdef) {
1996 _compiler.resolver.resolve(typdef); 1996 _compiler.resolver.resolve(typdef);
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
2248 _ElementScanner(this.scanner); 2248 _ElementScanner(this.scanner);
2249 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); 2249 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library);
2250 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); 2250 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit);
2251 } 2251 }
2252 2252
2253 class _EmptyEnvironment implements Environment { 2253 class _EmptyEnvironment implements Environment {
2254 const _EmptyEnvironment(); 2254 const _EmptyEnvironment();
2255 2255
2256 String valueOf(String key) => null; 2256 String valueOf(String key) => null;
2257 } 2257 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698