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

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

Issue 2318593003: Split Universe into ResolutionUniverse and CodegenUniverse (Closed)
Patch Set: Updated cf. comments. Created 4 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
« no previous file with comments | « pkg/compiler/lib/src/common/backend_api.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 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 Universe; 76 import 'universe/universe.dart' show ResolutionUniverse, CodegenUniverse;
77 import 'universe/use.dart' show StaticUse; 77 import 'universe/use.dart' show StaticUse;
78 import 'universe/world_impact.dart' show ImpactStrategy, WorldImpact; 78 import 'universe/world_impact.dart' show ImpactStrategy, WorldImpact;
79 import 'util/util.dart' show Link, Setlet; 79 import 'util/util.dart' show Link, Setlet;
80 import 'world.dart' show ClosedWorld, ClosedWorldRefiner, World; 80 import 'world.dart' show ClosedWorld, ClosedWorldRefiner, World;
81 81
82 typedef Backend MakeBackendFuncion(Compiler compiler); 82 typedef Backend MakeBackendFuncion(Compiler compiler);
83 83
84 typedef CompilerDiagnosticReporter MakeReporterFunction( 84 typedef CompilerDiagnosticReporter MakeReporterFunction(
85 Compiler compiler, CompilerOptions options); 85 Compiler compiler, CompilerOptions options);
86 86
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 preserveComments: options.preserveComments, commentMap: commentMap); 320 preserveComments: options.preserveComments, commentMap: commentMap);
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, openWorld, measurer);
328 } 328 }
329 329
330 Universe get resolverWorld => enqueuer.resolution.universe; 330 // TODO(johnniwinther): Rename these appropriately when unification of worlds/
331 Universe get codegenWorld => enqueuer.codegen.universe; 331 // universes is complete.
332 ResolutionUniverse get resolverWorld => enqueuer.resolution.universe;
333 CodegenUniverse get codegenWorld => enqueuer.codegen.universe;
332 334
333 bool get analyzeAll => options.analyzeAll || compileAll; 335 bool get analyzeAll => options.analyzeAll || compileAll;
334 336
335 bool get compileAll => false; 337 bool get compileAll => false;
336 338
337 bool get disableTypeInference => 339 bool get disableTypeInference =>
338 options.disableTypeInference || compilationFailed; 340 options.disableTypeInference || compilationFailed;
339 341
340 // TODO(het): remove this from here. Either inline at all use sites or add it 342 // TODO(het): remove this from here. Either inline at all use sites or add it
341 // to Reporter. 343 // to Reporter.
(...skipping 1897 matching lines...) Expand 10 before | Expand all | Expand 10 after
2239 _ElementScanner(this.scanner); 2241 _ElementScanner(this.scanner);
2240 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library); 2242 void scanLibrary(LibraryElement library) => scanner.scanLibrary(library);
2241 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit); 2243 void scanUnit(CompilationUnitElement unit) => scanner.scan(unit);
2242 } 2244 }
2243 2245
2244 class _EmptyEnvironment implements Environment { 2246 class _EmptyEnvironment implements Environment {
2245 const _EmptyEnvironment(); 2247 const _EmptyEnvironment();
2246 2248
2247 String valueOf(String key) => null; 2249 String valueOf(String key) => null;
2248 } 2250 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/common/backend_api.dart ('k') | pkg/compiler/lib/src/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698