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

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

Issue 2381793003: Rename Universe to WorldBuilder. (Closed)
Patch Set: Created 4 years, 2 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 import 'serialization/task.dart' show SerializationTask; 66 import 'serialization/task.dart' show SerializationTask;
67 import 'ssa/nodes.dart' show HInstruction; 67 import 'ssa/nodes.dart' show HInstruction;
68 import 'tokens/token.dart' show StringToken, Token, TokenPair; 68 import 'tokens/token.dart' show StringToken, Token, TokenPair;
69 import 'tokens/token_map.dart' show TokenMap; 69 import 'tokens/token_map.dart' show TokenMap;
70 import 'tracer.dart' show Tracer; 70 import 'tracer.dart' show Tracer;
71 import 'tree/tree.dart' show Node, TypeAnnotation; 71 import 'tree/tree.dart' show Node, TypeAnnotation;
72 import 'typechecker.dart' show TypeCheckerTask; 72 import 'typechecker.dart' show TypeCheckerTask;
73 import 'types/types.dart' show GlobalTypeInferenceTask; 73 import 'types/types.dart' show GlobalTypeInferenceTask;
74 import 'types/masks.dart' show CommonMasks; 74 import 'types/masks.dart' show CommonMasks;
75 import 'universe/selector.dart' show Selector; 75 import 'universe/selector.dart' show Selector;
76 import 'universe/universe.dart' show ResolutionUniverse, CodegenUniverse; 76 import 'universe/world_builder.dart'
77 show ResolutionWorldBuilder, CodegenWorldBuilder;
77 import 'universe/use.dart' show StaticUse; 78 import 'universe/use.dart' show StaticUse;
78 import 'universe/world_impact.dart' show ImpactStrategy, WorldImpact; 79 import 'universe/world_impact.dart' show ImpactStrategy, WorldImpact;
79 import 'util/util.dart' show Link, Setlet; 80 import 'util/util.dart' show Link, Setlet;
80 import 'world.dart' show ClosedWorld, ClosedWorldRefiner, OpenWorld, WorldImpl; 81 import 'world.dart' show ClosedWorld, ClosedWorldRefiner, OpenWorld, WorldImpl;
81 82
82 typedef Backend MakeBackendFuncion(Compiler compiler); 83 typedef Backend MakeBackendFuncion(Compiler compiler);
83 84
84 typedef CompilerDiagnosticReporter MakeReporterFunction( 85 typedef CompilerDiagnosticReporter MakeReporterFunction(
85 Compiler compiler, CompilerOptions options); 86 Compiler compiler, CompilerOptions options);
86 87
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 /// Creates the resolver task. 327 /// Creates the resolver task.
327 /// 328 ///
328 /// Override this to mock the resolver for testing. 329 /// Override this to mock the resolver for testing.
329 ResolverTask createResolverTask() { 330 ResolverTask createResolverTask() {
330 return new ResolverTask( 331 return new ResolverTask(
331 resolution, backend.constantCompilerTask, openWorld, measurer); 332 resolution, backend.constantCompilerTask, openWorld, measurer);
332 } 333 }
333 334
334 // TODO(johnniwinther): Rename these appropriately when unification of worlds/ 335 // TODO(johnniwinther): Rename these appropriately when unification of worlds/
335 // universes is complete. 336 // universes is complete.
336 ResolutionUniverse get resolverWorld => enqueuer.resolution.universe; 337 ResolutionWorldBuilder get resolverWorld => enqueuer.resolution.universe;
337 CodegenUniverse get codegenWorld => enqueuer.codegen.universe; 338 CodegenWorldBuilder get codegenWorld => enqueuer.codegen.universe;
338 339
339 bool get analyzeAll => options.analyzeAll || compileAll; 340 bool get analyzeAll => options.analyzeAll || compileAll;
340 341
341 bool get compileAll => false; 342 bool get compileAll => false;
342 343
343 bool get disableTypeInference => 344 bool get disableTypeInference =>
344 options.disableTypeInference || compilationFailed; 345 options.disableTypeInference || compilationFailed;
345 346
346 // TODO(het): remove this from here. Either inline at all use sites or add it 347 // TODO(het): remove this from here. Either inline at all use sites or add it
347 // to Reporter. 348 // to Reporter.
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 work.element, 836 work.element,
836 () => selfTask.measureSubtask("world.applyImpact", () { 837 () => selfTask.measureSubtask("world.applyImpact", () {
837 world.applyImpact( 838 world.applyImpact(
838 selfTask.measureSubtask( 839 selfTask.measureSubtask(
839 "work.run", () => work.run(this, world)), 840 "work.run", () => work.run(this, world)),
840 forElement: work.element); 841 forElement: work.element);
841 })); 842 }));
842 }); 843 });
843 }); 844 });
844 845
845 void processQueue(Enqueuer world, Element main) => 846 void processQueue(Enqueuer world, Element main) =>
Siggi Cherem (dart-lang) 2016/09/29 18:14:48 FYI: related only in the sense that we are cleanin
Johnni Winther 2016/09/30 08:43:14 Acknowledged.
846 selfTask.measureSubtask("Compiler.processQueue", () { 847 selfTask.measureSubtask("Compiler.processQueue", () {
847 world.nativeEnqueuer.processNativeClasses(libraryLoader.libraries); 848 world.nativeEnqueuer.processNativeClasses(libraryLoader.libraries);
848 if (main != null && !main.isMalformed) { 849 if (main != null && !main.isMalformed) {
849 FunctionElement mainMethod = main; 850 FunctionElement mainMethod = main;
850 mainMethod.computeType(resolution); 851 mainMethod.computeType(resolution);
851 if (mainMethod.functionSignature.parameterCount != 0) { 852 if (mainMethod.functionSignature.parameterCount != 0) {
852 // The first argument could be a list of strings. 853 // The first argument could be a list of strings.
853 backend.backendClasses.listImplementation 854 backend.backendClasses.listImplementation
854 .ensureResolved(resolution); 855 .ensureResolved(resolution);
855 backend.registerInstantiatedType( 856 backend.registerInstantiatedType(
(...skipping 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after
2245 _ElementScanner(this.scanner); 2246 _ElementScanner(this.scanner);
2246 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); 2247 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library);
2247 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); 2248 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit);
2248 } 2249 }
2249 2250
2250 class _EmptyEnvironment implements Environment { 2251 class _EmptyEnvironment implements Environment {
2251 const _EmptyEnvironment(); 2252 const _EmptyEnvironment();
2252 2253
2253 String valueOf(String key) => null; 2254 String valueOf(String key) => null;
2254 } 2255 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698