mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
Will not emit OP_SCOPE if self type can be checked at compile time.
This commit is contained in:
parent
91e83bf3c6
commit
0176c29ec2
1 changed files with 6 additions and 2 deletions
|
@ -8815,8 +8815,12 @@ ExpEmit FxVMFunctionCall::Emit(VMFunctionBuilder *build)
|
|||
if (outerside == FScopeBarrier::Side_Virtual)
|
||||
outerside = FScopeBarrier::SideFromObjectFlags(CallingFunction->OwningClass->ObjectFlags);
|
||||
|
||||
// Check the self object against the calling function's flags at run time
|
||||
build->Emit(OP_SCOPE, selfemit.RegNum, outerside + 1, build->GetConstantAddress(vmfunc, ATAG_OBJECT));
|
||||
// [ZZ] only emit if target side cannot be checked at compile time.
|
||||
if (selfside == FScopeBarrier::Side_PlainData)
|
||||
{
|
||||
// Check the self object against the calling function's flags at run time
|
||||
build->Emit(OP_SCOPE, selfemit.RegNum, outerside + 1, build->GetConstantAddress(vmfunc, ATAG_OBJECT));
|
||||
}
|
||||
}
|
||||
|
||||
if (selfemit.Fixed && selfemit.Target)
|
||||
|
|
Loading…
Reference in a new issue