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

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

Issue 3008793002: Use the entity model for dump_info. (Closed)
Patch Set: use codegen enqueuer Created 3 years, 4 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/common_elements.dart ('k') | pkg/compiler/lib/src/dump_info.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/deferred_load.dart
diff --git a/pkg/compiler/lib/src/deferred_load.dart b/pkg/compiler/lib/src/deferred_load.dart
index 95633ad1b41f004de1470e826b2d7cc055967881..c1972f3dc539314ddbcd16fe87909fe07601d450 100644
--- a/pkg/compiler/lib/src/deferred_load.dart
+++ b/pkg/compiler/lib/src/deferred_load.dart
@@ -133,7 +133,7 @@ class DeferredLoadTask extends CompilerTask {
final Map<ImportElement, String> _importDeferName = <ImportElement, String>{};
/// A mapping from elements and constants to their output unit. Query this via
- /// [outputUnitForElement]
+ /// [outputUnitForEntity]
final Map<Entity, ImportSet> _elementToSet = new Map<Entity, ImportSet>();
/// A mapping from constants to their output unit. Query this via
@@ -165,7 +165,7 @@ class DeferredLoadTask extends CompilerTask {
DiagnosticReporter get reporter => compiler.reporter;
/// Returns the [OutputUnit] where [element] belongs.
- OutputUnit outputUnitForElement(Entity entity) {
+ OutputUnit outputUnitForEntity(Entity entity) {
// TODO(johnniwinther): Support use of entities by splitting maps by
// entity kind.
if (!isProgramSplit) return mainOutputUnit;
@@ -188,12 +188,12 @@ class DeferredLoadTask extends CompilerTask {
/// Returns the [OutputUnit] where [element] belongs.
OutputUnit outputUnitForClass(ClassEntity element) {
- return outputUnitForElement(element);
+ return outputUnitForEntity(element);
}
/// Returns the [OutputUnit] where [element] belongs.
OutputUnit outputUnitForMember(MemberEntity element) {
- return outputUnitForElement(element);
+ return outputUnitForEntity(element);
}
/// Direct access to the output-unit to element relation used for testing.
@@ -211,11 +211,11 @@ class DeferredLoadTask extends CompilerTask {
Iterable<ConstantValue> get constantsForTesting => _constantToSet.keys;
bool isDeferred(Entity element) {
- return outputUnitForElement(element) != mainOutputUnit;
+ return outputUnitForEntity(element) != mainOutputUnit;
}
bool isDeferredClass(ClassEntity element) {
- return outputUnitForElement(element) != mainOutputUnit;
+ return outputUnitForEntity(element) != mainOutputUnit;
}
/// Returns the unique name for the deferred import of [prefix].
@@ -239,8 +239,8 @@ class DeferredLoadTask extends CompilerTask {
/// import a library `C`, then even though elements from `A` and `C` end up in
/// different output units, there is a non-deferred path between `A` and `C`.
bool hasOnlyNonDeferredImportPaths(Entity from, Entity to) {
- OutputUnit outputUnitFrom = outputUnitForElement(from);
- OutputUnit outputUnitTo = outputUnitForElement(to);
+ OutputUnit outputUnitFrom = outputUnitForEntity(from);
+ OutputUnit outputUnitTo = outputUnitForEntity(to);
if (outputUnitTo == mainOutputUnit) return true;
if (outputUnitFrom == mainOutputUnit) return false;
return outputUnitTo._imports.containsAll(outputUnitFrom._imports);
« no previous file with comments | « pkg/compiler/lib/src/common_elements.dart ('k') | pkg/compiler/lib/src/dump_info.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698