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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart

Issue 12033003: Deferred (aka lazy) loading of static functions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments and use IsolateNatives.thisScript Created 7 years, 10 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: dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart b/dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
index e22dfe14f3b9c243dfb0197714baaf9769211d13..65dc0abb19088ba49110410f696f8f3f9f97cf9a 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
@@ -1071,6 +1071,12 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
Selector selector,
Link<Node> arguments,
Node currentNode) {
+ // We cannot inline a method from a deferred library into a method
+ // which isn't deferred.
+ // TODO(ahe): But we should still inline into the same
+ // connected-component of the deferred library.
+ if (compiler.deferredLoadTask.isDeferred(element)) return false;
+
if (compiler.disableInlining) return false;
// Ensure that [element] is an implementation element.
element = element.implementation;

Powered by Google App Engine
This is Rietveld 408576698