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

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

Issue 2843283004: Use more entities in program_builder, collector and registry (Closed)
Patch Set: Updated cf. comments. 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 | « no previous file | pkg/compiler/lib/src/elements/elements.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 66e73c309adc9454905ccbf67559661f267a9644..088024907b23c7d832408b396ecad0559b1fea66 100644
--- a/pkg/compiler/lib/src/deferred_load.dart
+++ b/pkg/compiler/lib/src/deferred_load.dart
@@ -183,6 +183,16 @@ class DeferredLoadTask extends CompilerTask {
return _elementToOutputUnit[element];
}
+ /// Returns the [OutputUnit] where [element] belongs.
+ OutputUnit outputUnitForClass(ClassElement element) {
+ return outputUnitForElement(element);
+ }
+
+ /// Returns the [OutputUnit] where [element] belongs.
+ OutputUnit outputUnitForMember(MemberElement element) {
+ return outputUnitForElement(element);
+ }
+
/// Direct access to the output-unit to element relation used for testing.
OutputUnit getOutputUnitForElementForTesting(Element element) {
return _elementToOutputUnit[element];
@@ -203,6 +213,10 @@ class DeferredLoadTask extends CompilerTask {
return outputUnitForElement(element) != mainOutputUnit;
}
+ bool isDeferredClass(ClassElement element) {
+ return outputUnitForElement(element) != mainOutputUnit;
+ }
+
/// Returns the unique name for the deferred import of [prefix].
String getImportDeferName(Spannable node, PrefixElement prefix) {
String name =
« no previous file with comments | « no previous file | pkg/compiler/lib/src/elements/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698