| Index: runtime/vm/flow_graph_compiler_mips.cc
|
| ===================================================================
|
| --- runtime/vm/flow_graph_compiler_mips.cc (revision 26663)
|
| +++ runtime/vm/flow_graph_compiler_mips.cc (working copy)
|
| @@ -563,7 +563,7 @@
|
| const AbstractType& type,
|
| bool negate_result,
|
| LocationSummary* locs) {
|
| - ASSERT(type.IsFinalized() && !type.IsMalformed());
|
| + ASSERT(type.IsFinalized() && !type.IsMalformed() && !type.IsMalbounded());
|
|
|
| // Preserve instantiator (A2) and its type arguments (A1).
|
| __ addiu(SP, SP, Immediate(-2 * kWordSize));
|
| @@ -657,7 +657,7 @@
|
| ASSERT(!dst_type.IsNull());
|
| ASSERT(dst_type.IsFinalized());
|
| // Assignable check is skipped in FlowGraphBuilder, not here.
|
| - ASSERT(dst_type.IsMalformed() ||
|
| + ASSERT(dst_type.IsMalformed() || dst_type.IsMalbounded() ||
|
| (!dst_type.IsDynamicType() && !dst_type.IsObjectType()));
|
| // Preserve instantiator and its type arguments.
|
| __ addiu(SP, SP, Immediate(-2 * kWordSize));
|
| @@ -675,9 +675,15 @@
|
| __ BranchEqual(A0, Object::transition_sentinel(), &is_assignable);
|
| }
|
|
|
| - // Generate throw new TypeError() if the type is malformed.
|
| - if (dst_type.IsMalformed()) {
|
| - const Error& error = Error::Handle(dst_type.malformed_error());
|
| + // Generate throw new TypeError() if the type is malformed or malbounded.
|
| + if (dst_type.IsMalformed() || dst_type.IsMalbounded()) {
|
| + Error& error = Error::Handle();
|
| + if (dst_type.IsMalformed()) {
|
| + error = dst_type.malformed_error();
|
| + } else {
|
| + const bool is_malbounded = dst_type.IsMalboundedWithError(&error);
|
| + ASSERT(is_malbounded);
|
| + }
|
| const String& error_message = String::ZoneHandle(
|
| Symbols::New(error.ToErrorCString()));
|
|
|
|
|