Chromium Code Reviews| Index: pkg/compiler/lib/src/ssa/builder.dart |
| diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart |
| index a26310f2ca6fab5c92ba57ab39e4c81f6ad26f0c..67cc6aa8c74a36dc4d659994d5c24d7ea9a71a85 100644 |
| --- a/pkg/compiler/lib/src/ssa/builder.dart |
| +++ b/pkg/compiler/lib/src/ssa/builder.dart |
| @@ -431,8 +431,6 @@ class SsaBuilder extends ast.Visitor |
| bool tryInlineMethod(MethodElement element, Selector selector, TypeMask mask, |
| List<HInstruction> providedArguments, ast.Node currentNode, |
| {ResolutionInterfaceType instanceType}) { |
| - registry.registerStaticUse(new StaticUse.inlining(element)); |
| - |
| if (nativeData.isJsInteropMember(element) && |
| !element.isFactoryConstructor) { |
| // We only inline factory JavaScript interop constructors. |
| @@ -582,6 +580,8 @@ class SsaBuilder extends ast.Visitor |
| } |
| void doInlining() { |
| + registry.registerStaticUse(new StaticUse.inlining(element)); |
|
Johnni Winther
2017/06/15 14:31:00
Only register when we actually inline.
|
| + |
| // Add an explicit null check on the receiver before doing the |
| // inlining. We use [element] to get the same name in the |
| // NoSuchMethodError message as if we had called it. |