Index: runtime/vm/kernel_to_il.cc |
diff --git a/runtime/vm/kernel_to_il.cc b/runtime/vm/kernel_to_il.cc |
index 901f07226295286ba579db3c88bd85ac4c323f92..0234480b69ca373f6fc1dbd3de73b037cdeffa61 100644 |
--- a/runtime/vm/kernel_to_il.cc |
+++ b/runtime/vm/kernel_to_il.cc |
@@ -5053,6 +5053,18 @@ void FlowGraphBuilder::VisitIsExpression(IsExpression* node) { |
} else { |
instructions += PushArgument(); |
+ // See if simple instanceOf is applicable. |
+ if (simpleInstanceOfType(type)) { |
+ instructions += Constant(type); |
+ instructions += PushArgument(); // Type. |
+ instructions += InstanceCall( |
+ node->position(), |
+ dart::Library::PrivateCoreLibName(Symbols::_simpleInstanceOf()), |
+ Token::kIS, 2, 2); // 2 checked arguments. |
+ fragment_ = instructions; |
+ return; |
+ } |
+ |
if (!type.IsInstantiated()) { |
instructions += LoadInstantiatorTypeArguments(); |
} else { |