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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/nodes.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/ssa/nodes.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart b/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
index c0487207e7d9b256132f501f3a1ceec434aab5dd..a8107f4cf0838ec769b25e6dcfd72be74710295f 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
@@ -184,6 +184,13 @@ class HGraph {
return result;
}
+ HConstant addDeferredConstant(Constant constant, PrefixElement prefix,
+ Compiler compiler) {
+ Constant wrapper = new DeferredConstant(constant, prefix);
+ compiler.deferredLoadTask.registerConstantDeferredUse(wrapper, prefix);
+ return addConstant(wrapper, compiler);
+ }
+
HConstant addConstantInt(int i, Compiler compiler) {
return addConstant(compiler.backend.constantSystem.createInt(i), compiler);
}

Powered by Google App Engine
This is Rietveld 408576698