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

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: Use intermediate constants. Created 6 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
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 01552e10b998c135a0ac342ea3ad3b7a535950b1..3e69e99148f2f741c68619faab5ccdc6506932a4 100644
--- a/sdk/lib/_internal/compiler/implementation/deferred_load.dart
+++ b/sdk/lib/_internal/compiler/implementation/deferred_load.dart
@@ -11,9 +11,9 @@ import 'dart2jslib.dart' show
Constant,
ConstructedConstant,
MessageKind,
+ DeferredConstant,
StringConstant,
- invariant,
- Backend;
+ invariant;
import 'dart_backend/dart_backend.dart' show
DartBackend;
@@ -191,6 +191,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