1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Support for marking append-allocated objects (mHasAppendWantMark)

This commit is contained in:
Brian Fiete 2025-01-28 14:49:15 -08:00
parent 9ae172c43f
commit 9baf0ead21
18 changed files with 475 additions and 103 deletions

View file

@ -1381,11 +1381,6 @@ int BfMethodInstance::DbgGetVirtualMethodNum()
void BfMethodInstance::GetIRFunctionInfo(BfModule* module, BfIRType& returnType, SizedArrayImpl<BfIRType>& paramTypes, bool forceStatic)
{
if (mMethodDef->mName == "Test4")
{
NOP;
}
BfModule* resolveModule = module->mContext->mUnreifiedModule;
resolveModule->PopulateType(mReturnType);
@ -1458,7 +1453,11 @@ void BfMethodInstance::GetIRFunctionInfo(BfModule* module, BfIRType& returnType,
bool doSplat = false;
if (paramIdx == -1)
{
if ((!mMethodDef->mIsMutating) && (checkType->IsTypedPrimitive()))
if (mCallingConvention == BfCallingConvention_Cdecl)
{
// Pass by pointer even for typed primitives
}
else if ((!mMethodDef->mIsMutating) && (checkType->IsTypedPrimitive()))
{
checkType = checkType->GetUnderlyingType();
}
@ -2468,6 +2467,22 @@ bool BfTypeInstance::IsAnonymousInitializerType()
return (mTypeDef->mTypeDeclaration != NULL) && (mTypeDef->mTypeDeclaration->IsAnonymousInitializerType());
}
bool BfTypeInstance::HasAppendCtor()
{
return mTypeDef->mHasAppendCtor;
}
bool BfTypeInstance::BaseHasAppendCtor()
{
if (mBaseType != NULL)
{
if (mBaseType->HasAppendCtor())
return true;
return mBaseType->BaseHasAppendCtor();
}
return false;
}
void BfTypeInstance::ReportMemory(MemReporter* memReporter)
{
if (mGenericTypeInfo != NULL)