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 6d6000fb985e0ec6cff93984ea53cd956c5ffaa5..c7a74bbd80bc54bcfd37bdbd5a7ca290d02ac855 100644 |
--- a/dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart |
+++ b/dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart |
@@ -1079,6 +1079,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; |