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

Unified Diff: sdk/lib/_internal/compiler/implementation/deferred_load.dart

Issue 256453004: Avoid inlining constants that are used via a deferred import. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase Created 6 years, 7 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
Index: sdk/lib/_internal/compiler/implementation/deferred_load.dart
diff --git a/sdk/lib/_internal/compiler/implementation/deferred_load.dart b/sdk/lib/_internal/compiler/implementation/deferred_load.dart
index b12ec4bb99e2f5bc45da00597f14565695d9cc3a..ba055a7c598652184bce7340fd536c10d11af778 100644
--- a/sdk/lib/_internal/compiler/implementation/deferred_load.dart
+++ b/sdk/lib/_internal/compiler/implementation/deferred_load.dart
@@ -11,6 +11,7 @@ import 'dart2jslib.dart' show
Constant,
ConstructedConstant,
MessageKind,
+ DeferredConstant,
StringConstant,
invariant;
@@ -189,6 +190,13 @@ class DeferredLoadTask extends CompilerTask {
return outputUnitForElement(e1) == outputUnitForElement(e2);
}
+ void registerConstantDeferredUse(DeferredConstant constant,
+ PrefixElement prefix) {
+ OutputUnit outputUnit = new OutputUnit();
+ outputUnit.imports.add(prefix.deferredImport);
+ _constantToOutputUnit[constant] = outputUnit;
+ }
+
/// Mark that [import] is part of the [OutputputUnit] for [element].
///
/// [element] can be either a [Constant] or an [Element].

Powered by Google App Engine
This is Rietveld 408576698