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

Predetermine enum discriminator during comptime

This commit is contained in:
Brian Fiete 2021-12-21 12:52:51 -05:00
parent 8807c1ea83
commit 326c33eaa1
4 changed files with 228 additions and 159 deletions

View file

@ -6081,6 +6081,13 @@ bool CeContext::Execute(CeFunction* startFunction, uint8* startStackPtr, uint8*
{
if (iface.mInterfaceType == ifaceType)
{
if (valueType->mInterfaceMethodTable.IsEmpty())
ceModule->PopulateType(valueType, BfPopulateType_Full_Force);
if (valueType->mInterfaceMethodTable.IsEmpty())
{
_Fail("Empty interface table");
return false;
}
methodInstance = valueType->mInterfaceMethodTable[iface.mStartInterfaceTableIdx + methodIdx].mMethodRef;
break;
}