| Index: pkg/compiler/lib/src/ssa/builder_kernel.dart
|
| diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
|
| index 66888f4c1e81eb81a3e19a03f608dd48f0005b91..1d899017ec730a9359fad35331eb72b90f516a77 100644
|
| --- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
|
| +++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
|
| @@ -476,13 +476,6 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
|
| _buildInitializers(constructor, constructorChain, fieldValues);
|
| }
|
|
|
| - HTypeConversion buildFunctionTypeConversion(
|
| - HInstruction original, ResolutionDartType type, int kind) {
|
| - HInstruction reifiedType = buildFunctionType(type);
|
| - return new HTypeConversion.viaMethodOnType(
|
| - type, kind, original.instructionType, reifiedType, original);
|
| - }
|
| -
|
| /// Builds generative constructor body.
|
| void buildConstructorBody(ir.Constructor constructor) {
|
| openFunction();
|
| @@ -2856,14 +2849,18 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
|
|
|
| ResolutionDartType typeValue =
|
| localsHandler.substInContext(astAdapter.getDartType(type));
|
| +
|
| if (type is ir.FunctionType) {
|
| - List arguments = [buildFunctionType(typeValue), expression];
|
| - _pushDynamicInvocation(node, null, arguments,
|
| - selector: new Selector.call(
|
| - new PrivateName('_isTest', backend.helpers.jsHelperLibrary),
|
| - CallStructure.ONE_ARG));
|
| - push(
|
| - new HIs.compound(typeValue, expression, pop(), commonMasks.boolType));
|
| + HInstruction representation =
|
| + typeBuilder.analyzeTypeArgument(typeValue, sourceElement);
|
| + List<HInstruction> inputs = <HInstruction>[
|
| + expression,
|
| + representation,
|
| + ];
|
| + _pushStaticInvocation(
|
| + astAdapter.functionTypeTest, inputs, commonMasks.boolType);
|
| + HInstruction call = pop();
|
| + push(new HIs.compound(typeValue, expression, call, commonMasks.boolType));
|
| return;
|
| }
|
|
|
|
|