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 6a5ee2c5238237761ab0cfd6ee5b5d8cedddf340..6bc8a4189ed8dd71c8e7e9fae8a1a7cf9e6d4825 100644 |
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart |
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart |
@@ -308,18 +308,9 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder { |
HTypeConversion buildFunctionTypeConversion( |
HInstruction original, DartType type, int kind) { |
- String name = |
- kind == HTypeConversion.CAST_TYPE_CHECK ? '_asCheck' : '_assertCheck'; |
- |
- List<HInstruction> arguments = <HInstruction>[ |
- buildFunctionType(type), |
- original |
- ]; |
- _pushDynamicInvocation(null, null, arguments, |
- selector: new Selector.call( |
- new Name(name, astAdapter.jsHelperLibrary), CallStructure.ONE_ARG)); |
- |
- return new HTypeConversion(type, kind, original.instructionType, pop()); |
+ HInstruction reifiedType = buildFunctionType(type); |
+ return new HTypeConversion.viaMethodOnType( |
+ type, kind, original.instructionType, reifiedType, original); |
} |
/// Builds a SSA graph for [procedure]. |