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 7854b08c4313a13d575c88a5f8775290414808a9..680d313defcb9991bf76d6cfa7a2710ef76f7b9a 100644 |
--- a/runtime/vm/flow_graph_compiler_mips.cc |
+++ b/runtime/vm/flow_graph_compiler_mips.cc |
@@ -500,11 +500,6 @@ RawSubtypeTestCache* FlowGraphCompiler::GenerateInlineInstanceof( |
Label* is_instance_lbl, |
Label* is_not_instance_lbl) { |
__ Comment("InlineInstanceof"); |
- if (type.IsVoidType()) { |
- // A non-null value is returned from a void function, which will result in a |
- // type error. A null value is handled prior to executing this inline code. |
- return SubtypeTestCache::null(); |
- } |
if (type.IsInstantiated()) { |
const Class& type_class = Class::ZoneHandle(zone(), type.type_class()); |
// A class equality check is only applicable with a dst type (not a |
@@ -547,7 +542,7 @@ void FlowGraphCompiler::GenerateInstanceOf(TokenPosition token_pos, |
bool negate_result, |
LocationSummary* locs) { |
ASSERT(type.IsFinalized() && !type.IsMalformed() && !type.IsMalbounded()); |
- ASSERT(!type.IsObjectType() && !type.IsDynamicType()); |
+ ASSERT(!type.IsObjectType() && !type.IsDynamicType() && !type.IsVoidType()); |
// Preserve instantiator type arguments (A1). |
__ addiu(SP, SP, Immediate(-1 * kWordSize)); |
@@ -638,7 +633,8 @@ void FlowGraphCompiler::GenerateAssertAssignable(TokenPosition token_pos, |
ASSERT(dst_type.IsFinalized()); |
// Assignable check is skipped in FlowGraphBuilder, not here. |
ASSERT(dst_type.IsMalformedOrMalbounded() || |
- (!dst_type.IsDynamicType() && !dst_type.IsObjectType())); |
+ (!dst_type.IsDynamicType() && !dst_type.IsObjectType() && |
+ !dst_type.IsVoidType())); |
// Preserve instantiator type arguments. |
__ addiu(SP, SP, Immediate(-1 * kWordSize)); |
__ sw(A1, Address(SP, 0 * kWordSize)); |