| Index: pkg/compiler/lib/src/cps_ir/inline.dart
|
| diff --git a/pkg/compiler/lib/src/cps_ir/inline.dart b/pkg/compiler/lib/src/cps_ir/inline.dart
|
| index f348ce295701b5250026b50ae3a178c8f10fc0f4..01547fe57d071ba812c15318707ea164164c97c0 100644
|
| --- a/pkg/compiler/lib/src/cps_ir/inline.dart
|
| +++ b/pkg/compiler/lib/src/cps_ir/inline.dart
|
| @@ -380,9 +380,7 @@ class InliningVisitor extends TrampolineRecursiveVisitor {
|
| // Negative inlining result in the cache.
|
| if (cachedResult == InliningCache.NO_INLINE) return null;
|
|
|
| - // Positive inlining result in the cache.
|
| - if (cachedResult is FunctionDefinition) {
|
| - FunctionDefinition function = cachedResult;
|
| + Primitive finish(FunctionDefinition function) {
|
| _fragment = new CpsFragment(invoke.sourceInformation);
|
| Primitive receiver = invoke.receiver?.definition;
|
| List<Primitive> arguments =
|
| @@ -402,6 +400,11 @@ class InliningVisitor extends TrampolineRecursiveVisitor {
|
| hint: invoke.hint);
|
| }
|
|
|
| + // Positive inlining result in the cache.
|
| + if (cachedResult is FunctionDefinition) {
|
| + return finish(cachedResult);
|
| + }
|
| +
|
| // We have not seen this combination of target and abstract arguments
|
| // before. Make an inlining decision.
|
| assert(cachedResult == InliningCache.ABSENT);
|
| @@ -445,23 +448,7 @@ class InliningVisitor extends TrampolineRecursiveVisitor {
|
|
|
| _inliner.cache.putPositive(target, callStructure, abstractReceiver,
|
| abstractArguments, function);
|
| - _fragment = new CpsFragment(invoke.sourceInformation);
|
| - Primitive receiver = invoke.receiver?.definition;
|
| - List<Primitive> arguments =
|
| - invoke.arguments.map((Reference ref) => ref.definition).toList();
|
| - if (dartReceiver != null && abstractReceiver.isNullable) {
|
| - Primitive check =
|
| - _fragment.letPrim(new NullCheck(dartReceiver.definition,
|
| - invoke.sourceInformation));
|
| - check.type = abstractReceiver.nonNullable();
|
| - if (invoke.callingConvention == CallingConvention.Intercepted) {
|
| - arguments[0] = check;
|
| - } else {
|
| - receiver = check;
|
| - }
|
| - }
|
| - return _fragment.inlineFunction(function, receiver, arguments,
|
| - hint: invoke.hint);
|
| + return finish(function);
|
| }
|
|
|
| Primitive nullReceiverGuard(InvocationPrimitive invoke,
|
|
|