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

Fixed GCMarkMembers 'this' argument casting

This commit is contained in:
Brian Fiete 2020-04-08 09:13:18 -07:00
parent 2e6a53298d
commit 371f649fba

View file

@ -14984,8 +14984,11 @@ void BfModule::EmitGCMarkValue(BfTypedValue markVal, BfModuleMethodInstance mark
if (markMemberMethodInstance)
{
SizedArray<BfIRValue, 1> args;
//(1, markVal.mValue);
//exprEvaluator.PushArg(markVal, args);
auto methodOwner = markMemberMethodInstance.mMethodInstance->GetOwner();
if (markVal.mType != methodOwner)
markVal = Cast(NULL, markVal, methodOwner);
exprEvaluator.PushThis(NULL, markVal, markMemberMethodInstance.mMethodInstance, args);
exprEvaluator.CreateCall(markMemberMethodInstance.mMethodInstance, markMemberMethodInstance.mFunc, false, args);
}