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

Unified Diff: pkg/compiler/lib/src/library_loader.dart

Issue 2829033002: Rename KernelWorldBuilder to KernelElementBuilder (Closed)
Patch Set: Rename to KernelToElementMap Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/kernel/world_builder.dart ('k') | pkg/compiler/lib/src/native/resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/library_loader.dart
diff --git a/pkg/compiler/lib/src/library_loader.dart b/pkg/compiler/lib/src/library_loader.dart
index 12a2cc91a7dbd5a81095c08397c957e06bd193a3..a3b8b752f4a5c37db6c826bfc7c8393a62a0b230 100644
--- a/pkg/compiler/lib/src/library_loader.dart
+++ b/pkg/compiler/lib/src/library_loader.dart
@@ -30,7 +30,7 @@ import 'elements/modelx.dart'
SyntheticImportElement;
import 'enqueue.dart' show DeferredAction;
import 'environment.dart';
-import 'kernel/world_builder.dart' show KernelWorldBuilder;
+import 'kernel/element_map.dart' show KernelToElementMap;
import 'patch_parser.dart' show PatchParserTask;
import 'resolved_uri_translator.dart';
import 'script.dart';
@@ -844,7 +844,7 @@ class _DillLibraryLoaderTask extends CompilerTask implements LibraryLoaderTask {
/// Holds the mapping of Kernel IR to KElements that is constructed as a
/// result of loading a program.
- KernelWorldBuilder _worldBuilder;
+ KernelToElementMap _elementMap;
List<LibraryEntity> _allLoadedLibraries;
@@ -870,21 +870,21 @@ class _DillLibraryLoaderTask extends CompilerTask implements LibraryLoaderTask {
bytes.removeLast();
new BinaryBuilder(bytes).readProgram(program);
return measure(() {
- _worldBuilder = new KernelWorldBuilder(reporter, program);
+ _elementMap = new KernelToElementMap(reporter, program);
program.libraries.forEach((ir.Library library) => _allLoadedLibraries
- .add(_worldBuilder.lookupLibrary(library.importUri)));
+ .add(_elementMap.lookupLibrary(library.importUri)));
LibraryEntity rootLibrary = null;
if (program.mainMethod != null) {
- rootLibrary = _worldBuilder
+ rootLibrary = _elementMap
.lookupLibrary(program.mainMethod.enclosingLibrary.importUri);
}
return new _LoadedLibrariesAdapter(
- rootLibrary, _allLoadedLibraries, _worldBuilder);
+ rootLibrary, _allLoadedLibraries, _elementMap);
});
});
}
- KernelWorldBuilder get worldBuilder => _worldBuilder;
+ KernelToElementMap get elementMap => _elementMap;
void reset({bool reuseLibrary(LibraryElement library)}) {
throw new UnimplementedError('_DillLibraryLoaderTask.reset');
@@ -897,7 +897,7 @@ class _DillLibraryLoaderTask extends CompilerTask implements LibraryLoaderTask {
Iterable<LibraryEntity> get libraries => _allLoadedLibraries;
LibraryEntity lookupLibrary(Uri canonicalUri) {
- return _worldBuilder?.lookupLibrary(canonicalUri);
+ return _elementMap?.lookupLibrary(canonicalUri);
}
Future<Null> resetLibraries(ReuseLibrariesFunction reuseLibraries) {
@@ -1611,7 +1611,7 @@ class _LoadedLibraries implements LoadedLibraries {
class _LoadedLibrariesAdapter implements LoadedLibraries {
final LibraryEntity rootLibrary;
final List<LibraryEntity> _newLibraries;
- final KernelWorldBuilder worldBuilder;
+ final KernelToElementMap worldBuilder;
_LoadedLibrariesAdapter(
this.rootLibrary, this._newLibraries, this.worldBuilder) {
« no previous file with comments | « pkg/compiler/lib/src/kernel/world_builder.dart ('k') | pkg/compiler/lib/src/native/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698