1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Fixed delegate object access check

This commit is contained in:
Brian Fiete 2024-10-23 11:45:31 -04:00
parent 58ef18735c
commit c58dcb90df

View file

@ -16786,11 +16786,11 @@ void BfModule::CreateDelegateInvokeMethod()
{ {
numVal = mBfIRBuilder->CreatePtrToInt(fieldVal, BfTypeCode_UInt64); numVal = mBfIRBuilder->CreatePtrToInt(fieldVal, BfTypeCode_UInt64);
auto andVal = mBfIRBuilder->CreateAnd(numVal, mBfIRBuilder->CreateConst(BfTypeCode_UInt64, ~0x8000000000000000ULL)); auto andVal = mBfIRBuilder->CreateAnd(numVal, mBfIRBuilder->CreateConst(BfTypeCode_UInt64, ~0x8000000000000000ULL));
fieldVal = andVal; fieldVal = mBfIRBuilder->CreateIntToPtr(andVal, mBfIRBuilder->MapType(mContext->mBfObjectType));
} }
if ((WantsObjectAccessCheck(mContext->mBfObjectType) && (mCompiler->mSystem->mPtrSize == 8))) if ((WantsObjectAccessCheck(mContext->mBfObjectType) && (mCompiler->mSystem->mPtrSize == 8)))
{ {
auto oacDoBB = mBfIRBuilder->CreateBlock("oac.do", true); auto oacDoBB = mBfIRBuilder->CreateBlock("oac.do", true);
auto oacDoneBB = mBfIRBuilder->CreateBlock("oac.done"); auto oacDoneBB = mBfIRBuilder->CreateBlock("oac.done");