mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Extensive runtime refactor to reduce generated executable sizes
This commit is contained in:
parent
4e750a7e1a
commit
ddd9b1b218
74 changed files with 2514 additions and 717 deletions
|
@ -6714,12 +6714,18 @@ void BfModule::Visit(BfForEachStatement* forEachStmt)
|
|||
PopulateType(itrInterface, BfPopulateType_Full_Force);
|
||||
getNextMethodInst = GetMethodByName(itrInterface, "GetNext");
|
||||
}
|
||||
BF_ASSERT(getNextMethodInst);
|
||||
nextResult = BfTypedValue(CreateAlloca(getNextMethodInst.mMethodInstance->mReturnType), getNextMethodInst.mMethodInstance->mReturnType, true);
|
||||
|
||||
if (nextResult.mType->IsGenericTypeInstance())
|
||||
if (getNextMethodInst)
|
||||
{
|
||||
nextEmbeddedType = ((BfTypeInstance*)nextResult.mType)->mGenericTypeInfo->mTypeGenericArguments[0];
|
||||
nextResult = BfTypedValue(CreateAlloca(getNextMethodInst.mMethodInstance->mReturnType), getNextMethodInst.mMethodInstance->mReturnType, true);
|
||||
|
||||
if (nextResult.mType->IsGenericTypeInstance())
|
||||
{
|
||||
nextEmbeddedType = ((BfTypeInstance*)nextResult.mType)->mGenericTypeInfo->mTypeGenericArguments[0];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
InternalError("Failed to find GetNext");
|
||||
}
|
||||
}
|
||||
if (nextEmbeddedType == NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue