Skip to content

Commit b2c44ae

Browse files
authored
Do not mix enum types in IsWriteBarrierTriggerableValue
IsAddrOpnd() is checking GetKind() == OpndKindAddr; And next check AsAddrOpnd()->GetKind() == AddrOpndKindDynamicVar would be always false.
1 parent bfd8d23 commit b2c44ae

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/Backend/Opnd.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Opnd::IsWriteBarrierTriggerableValue()
9191
// If this operand is known address, then it doesn't need a write barrier, the address is either not a GC address or is pinned
9292
// If its null/boolean/undefined, we don't need a write barrier since the javascript library will keep those guys alive
9393
return this->IsNotTaggedValue() &&
94-
!((this->IsAddrOpnd() && static_cast<AddrOpndKind>(this->AsAddrOpnd()->GetKind()) == AddrOpndKindDynamicVar) ||
94+
!((this->IsAddrOpnd() && this->AsAddrOpnd()->GetAddrOpndKind() == AddrOpndKindDynamicVar) ||
9595
(this->GetValueType().IsBoolean() || this->GetValueType().IsNull() || this->GetValueType().IsUndefined()));
9696
}
9797

0 commit comments

Comments
 (0)