diff options
Diffstat (limited to 'compiler/optimizing/nodes.cc')
| -rw-r--r-- | compiler/optimizing/nodes.cc | 13 | 
1 files changed, 11 insertions, 2 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index 0e0b83e4b4..98766a31a6 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -127,6 +127,9 @@ void HGraph::RemoveDeadBlocks(const ArenaBitVector& visited) {        // Remove the block from the list of blocks, so that further analyses        // never see it.        blocks_[i] = nullptr; +      if (block->IsExitBlock()) { +        SetExitBlock(nullptr); +      }      }    }  } @@ -1870,7 +1873,7 @@ void HGraph::DeleteDeadEmptyBlock(HBasicBlock* block) {    DCHECK(block->GetPhis().IsEmpty());    if (block->IsExitBlock()) { -    exit_block_ = nullptr; +    SetExitBlock(nullptr);    }    RemoveElement(reverse_post_order_, block); @@ -2178,7 +2181,9 @@ static void CheckAgainstUpperBound(ReferenceTypeInfo rti, ReferenceTypeInfo uppe      DCHECK(upper_bound_rti.IsSupertypeOf(rti))          << " upper_bound_rti: " << upper_bound_rti          << " rti: " << rti; -    DCHECK(!upper_bound_rti.GetTypeHandle()->CannotBeAssignedFromOtherTypes() || rti.IsExact()); +    DCHECK(!upper_bound_rti.GetTypeHandle()->CannotBeAssignedFromOtherTypes() || rti.IsExact()) +        << " upper_bound_rti: " << upper_bound_rti +        << " rti: " << rti;    }  } @@ -2212,6 +2217,10 @@ ReferenceTypeInfo ReferenceTypeInfo::Create(TypeHandle type_handle, bool is_exac    if (kIsDebugBuild) {      ScopedObjectAccess soa(Thread::Current());      DCHECK(IsValidHandle(type_handle)); +    if (!is_exact) { +      DCHECK(!type_handle->CannotBeAssignedFromOtherTypes()) +          << "Callers of ReferenceTypeInfo::Create should ensure is_exact is properly computed"; +    }    }    return ReferenceTypeInfo(type_handle, is_exact);  }  |