Skip to content

Commit 09ab25c

Browse files
committed
[MERGE chakra-core#2039 @maksqwe] Do not mix enum types in IsWriteBarrierTriggerableValue
Merge pull request chakra-core#2039 from maksqwe:enum_comparison IsAddrOpnd() is checking GetKind() == OpndKindAddr; And next check AsAddrOpnd()->GetKind() == AddrOpndKindDynamicVar would be always false.
2 parents afef0b1 + 80a7752 commit 09ab25c

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
@@ -104,7 +104,7 @@ Opnd::IsWriteBarrierTriggerableValue()
104104
}
105105

106106
// 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
107-
if (this->IsAddrOpnd() && static_cast<AddrOpndKind>(this->AsAddrOpnd()->GetKind()) == AddrOpndKindDynamicVar)
107+
if (this->IsAddrOpnd() && this->AsAddrOpnd()->GetAddrOpndKind() == AddrOpndKindDynamicVar)
108108
{
109109
return false;
110110
}

0 commit comments

Comments
 (0)