mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
fix explicit thiscall crash
This commit is contained in:
parent
d7f0c6523d
commit
4fb7a0f53f
1 changed files with 12 additions and 1 deletions
|
@ -1209,6 +1209,7 @@ void BfMethodInstance::GetIRFunctionInfo(BfModule* module, BfIRType& returnType,
|
||||||
returnType = module->mBfIRBuilder->MapType(mReturnType);
|
returnType = module->mBfIRBuilder->MapType(mReturnType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool hasExplicitThis = false;
|
||||||
for (int paramIdx = -1; paramIdx < GetParamCount(); paramIdx++)
|
for (int paramIdx = -1; paramIdx < GetParamCount(); paramIdx++)
|
||||||
{
|
{
|
||||||
BfType* checkType = NULL;
|
BfType* checkType = NULL;
|
||||||
|
@ -1223,13 +1224,23 @@ void BfMethodInstance::GetIRFunctionInfo(BfModule* module, BfIRType& returnType,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (HasExplicitThis())
|
if (HasExplicitThis())
|
||||||
|
{
|
||||||
checkType = GetParamType(0);
|
checkType = GetParamType(0);
|
||||||
|
hasExplicitThis = true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
checkType = GetOwner();
|
checkType = GetOwner();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (hasExplicitThis)
|
||||||
|
{
|
||||||
|
// We already looked at this
|
||||||
|
hasExplicitThis = false;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
checkType = GetParamType(paramIdx);
|
checkType = GetParamType(paramIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue