mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-13 05:44:11 +02:00
HasFlag behavior change
This commit is contained in:
parent
6974906d2a
commit
8e8a28b23e
1 changed files with 4 additions and 1 deletions
|
@ -13809,6 +13809,9 @@ void BfModule::AggregateSplatIntoAddr(BfTypedValue typedValue, BfIRValue addrVal
|
||||||
|
|
||||||
BfTypedValue BfModule::MakeAddressable(BfTypedValue typedVal, bool forceMutable, bool forceAddressable)
|
BfTypedValue BfModule::MakeAddressable(BfTypedValue typedVal, bool forceMutable, bool forceAddressable)
|
||||||
{
|
{
|
||||||
|
if (!typedVal)
|
||||||
|
return typedVal;
|
||||||
|
|
||||||
bool wasReadOnly = typedVal.IsReadOnly();
|
bool wasReadOnly = typedVal.IsReadOnly();
|
||||||
|
|
||||||
if ((forceAddressable) ||
|
if ((forceAddressable) ||
|
||||||
|
@ -22567,7 +22570,7 @@ void BfModule::ProcessMethod(BfMethodInstance* methodInstance, bool isInlineDup,
|
||||||
{
|
{
|
||||||
BfIRValue thisValue = LoadValue(GetThis()).mValue;
|
BfIRValue thisValue = LoadValue(GetThis()).mValue;
|
||||||
auto andResult = mBfIRBuilder->CreateAnd(thisValue, mCurMethodState->mLocals[1]->mValue);
|
auto andResult = mBfIRBuilder->CreateAnd(thisValue, mCurMethodState->mLocals[1]->mValue);
|
||||||
auto toBool = mBfIRBuilder->CreateCmpNE(andResult, GetDefaultValue(mCurMethodState->mLocals[0]->mResolvedType));
|
auto toBool = mBfIRBuilder->CreateCmpEQ(andResult, mCurMethodState->mLocals[1]->mValue);
|
||||||
fromBool = mBfIRBuilder->CreateNumericCast(toBool, false, BfTypeCode_Boolean);
|
fromBool = mBfIRBuilder->CreateNumericCast(toBool, false, BfTypeCode_Boolean);
|
||||||
}
|
}
|
||||||
mBfIRBuilder->RestoreDebugLocation();
|
mBfIRBuilder->RestoreDebugLocation();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue