| Index: runtime/vm/flow_graph_compiler_mips.cc
|
| diff --git a/runtime/vm/flow_graph_compiler_mips.cc b/runtime/vm/flow_graph_compiler_mips.cc
|
| index 8e568c90feddde7553665af195527cfbe3e1ca01..8aea6080046af6893f18aa40979dd1c8cca9a99b 100644
|
| --- a/runtime/vm/flow_graph_compiler_mips.cc
|
| +++ b/runtime/vm/flow_graph_compiler_mips.cc
|
| @@ -381,11 +381,8 @@ bool FlowGraphCompiler::GenerateInstantiatedTypeNoArgumentsTest(
|
| } else {
|
| __ beq(T0, ZR, is_not_instance_lbl);
|
| }
|
| - // Compare if the classes are equal.
|
| const Register kClassIdReg = T0;
|
| __ LoadClassId(kClassIdReg, kInstanceReg);
|
| - __ BranchEqual(kClassIdReg, Immediate(type_class.id()), is_instance_lbl);
|
| -
|
| // See ClassFinalizer::ResolveSuperTypeAndInterfaces for list of restricted
|
| // interfaces.
|
| // Bool interface can be implemented only by core class Bool.
|
| @@ -394,10 +391,6 @@ bool FlowGraphCompiler::GenerateInstantiatedTypeNoArgumentsTest(
|
| __ b(is_not_instance_lbl);
|
| return false;
|
| }
|
| - if (type.IsDartFunctionType()) {
|
| - // Check if instance is a closure.
|
| - __ BranchEqual(kClassIdReg, Immediate(kClosureCid), is_instance_lbl);
|
| - }
|
| // Custom checking for numbers (Smi, Mint, Bigint and Double).
|
| // Note that instance is not Smi (checked above).
|
| if (type.IsSubtypeOf(
|
| @@ -410,6 +403,15 @@ bool FlowGraphCompiler::GenerateInstantiatedTypeNoArgumentsTest(
|
| GenerateStringTypeCheck(kClassIdReg, is_instance_lbl, is_not_instance_lbl);
|
| return false;
|
| }
|
| + if (type.IsDartFunctionType()) {
|
| + // Check if instance is a closure.
|
| + __ BranchEqual(kClassIdReg, Immediate(kClosureCid), is_instance_lbl);
|
| + return true; // Fall through
|
| + }
|
| + // Compare if the classes are equal.
|
| + if (!type_class.is_abstract()) {
|
| + __ BranchEqual(kClassIdReg, Immediate(type_class.id()), is_instance_lbl);
|
| + }
|
| // Otherwise fallthrough.
|
| return true;
|
| }
|
|
|