mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-14 12:13:51 +02:00
Fixed for Hunty
This commit is contained in:
parent
5f0468d724
commit
faebf0af06
2 changed files with 18 additions and 2 deletions
|
@ -14749,6 +14749,22 @@ BfModuleMethodInstance BfModule::GetMethodInstance(BfTypeInstance* typeInst, BfM
|
||||||
|
|
||||||
BfLogSysM("REIFIED(GetMethodInstance QueueSpecializationRequest): %s %s MethodDef:%p RefModule:%s RefMethod:%p\n", TypeToString(typeInst).c_str(), methodDef->mName.c_str(), methodDef, mModuleName.c_str(), mCurMethodInstance);
|
BfLogSysM("REIFIED(GetMethodInstance QueueSpecializationRequest): %s %s MethodDef:%p RefModule:%s RefMethod:%p\n", TypeToString(typeInst).c_str(), methodDef->mName.c_str(), methodDef, mModuleName.c_str(), mCurMethodInstance);
|
||||||
|
|
||||||
|
// Sanity check
|
||||||
|
{
|
||||||
|
int methodIdx = methodDef->mIdx;
|
||||||
|
BfMethodDef* checkMethod = NULL;
|
||||||
|
if (foreignType != NULL)
|
||||||
|
checkMethod = foreignType->mTypeDef->mMethods[methodIdx];
|
||||||
|
else
|
||||||
|
checkMethod = typeInst->mTypeDef->mMethods[methodIdx];
|
||||||
|
if (checkMethod != methodDef)
|
||||||
|
{
|
||||||
|
BfLogSysM(" MISMATCH. Got:%p Expected:%p\n", checkMethod, methodDef);
|
||||||
|
BF_ASSERT(checkMethod->mName == methodDef->mName);
|
||||||
|
methodDef = checkMethod;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// This ensures that the method will actually be created when it gets reified
|
// This ensures that the method will actually be created when it gets reified
|
||||||
BfMethodSpecializationRequest* specializationRequest = mContext->mMethodSpecializationWorkList.Alloc();
|
BfMethodSpecializationRequest* specializationRequest = mContext->mMethodSpecializationWorkList.Alloc();
|
||||||
specializationRequest->mFromModule = typeInst->mModule;
|
specializationRequest->mFromModule = typeInst->mModule;
|
||||||
|
|
|
@ -5182,9 +5182,9 @@ void BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
|
||||||
|
|
||||||
bool hadSoftFail = false;
|
bool hadSoftFail = false;
|
||||||
|
|
||||||
for (auto& fieldInstanceRef : typeInstance->mFieldInstances)
|
for (int fieldIdx = 0; fieldIdx < typeInstance->mFieldInstances.mSize; fieldIdx++)
|
||||||
{
|
{
|
||||||
auto fieldInstance = &fieldInstanceRef;
|
auto fieldInstance = &typeInstance->mFieldInstances[fieldIdx];
|
||||||
auto fieldDef = fieldInstance->GetFieldDef();
|
auto fieldDef = fieldInstance->GetFieldDef();
|
||||||
auto resolvedFieldType = fieldInstance->GetResolvedType();
|
auto resolvedFieldType = fieldInstance->GetResolvedType();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue