| Index: lib/compiler/implementation/ssa/codegen.dart
|
| diff --git a/lib/compiler/implementation/ssa/codegen.dart b/lib/compiler/implementation/ssa/codegen.dart
|
| index d8db36171f7cf84273e07f8d41bfb8ab0720bf60..c6fff5391cd2250b04bd3bbc4c4454333b4da193 100644
|
| --- a/lib/compiler/implementation/ssa/codegen.dart
|
| +++ b/lib/compiler/implementation/ssa/codegen.dart
|
| @@ -2235,6 +2235,34 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
|
| }
|
|
|
| void visitTypeConversion(HTypeConversion node) {
|
| + Map<String, SourceString> castNames = const <SourceString> {
|
| + "stringTypeCheck":
|
| + const SourceString("stringTypeCast"),
|
| + "doubleTypeCheck":
|
| + const SourceString("doubleTypeCast"),
|
| + "numTypeCheck":
|
| + const SourceString("numTypeCast"),
|
| + "boolTypeCheck":
|
| + const SourceString("boolTypeCast"),
|
| + "functionTypeCheck":
|
| + const SourceString("functionTypeCast"),
|
| + "intTypeCheck":
|
| + const SourceString("intTypeCast"),
|
| + "stringSuperNativeTypeCheck":
|
| + const SourceString("stringSuperNativeTypeCast"),
|
| + "stringSuperTypeCheck":
|
| + const SourceString("stringSuperTypeCast"),
|
| + "listTypeCheck":
|
| + const SourceString("listTypeCast"),
|
| + "listSuperNativeTypeCheck":
|
| + const SourceString("listSuperNativeTypeCast"),
|
| + "listSuperTypeCheck":
|
| + const SourceString("listSuperTypeCast"),
|
| + "callTypeCheck":
|
| + const SourceString("callTypeCast"),
|
| + "propertyTypeCheck":
|
| + const SourceString("propertyTypeCast")
|
| + };
|
| if (node.checked) {
|
| Element element = node.type.computeType(compiler).element;
|
| world.registerIsCheck(element);
|
| @@ -2278,6 +2306,9 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
|
| helper = const SourceString('propertyTypeCheck');
|
| }
|
| }
|
| + if (node.isCast) {
|
| + helper = castNames[helper.stringValue];
|
| + }
|
| Element helperElement = compiler.findHelper(helper);
|
| world.registerStaticUse(helperElement);
|
| buffer.add(compiler.namer.isolateAccess(helperElement));
|
|
|