- backend update from GZDoom

This commit is contained in:
Rachael Alexanderson 2024-04-20 00:07:17 -04:00
parent d2b209261d
commit 30e9cb7e75
No known key found for this signature in database
GPG key ID: 26A8ACCE97115EE0
3 changed files with 14 additions and 2 deletions

View file

@ -40,6 +40,9 @@
#include <limits.h>
#include <stdlib.h>
#ifdef __FreeBSD__
#include <sys/time.h>
#endif
#include <unistd.h>
#include <fnmatch.h>
#include <sys/stat.h>

View file

@ -667,6 +667,8 @@ PClass *PClass::FindClassTentative(FName name)
//
//==========================================================================
bool ShouldAllowGameSpecificVirtual(FName name, unsigned index, PType* arg, PType* varg);
int PClass::FindVirtualIndex(FName name, PFunction::Variant *variant, PFunction *parentfunc, bool exactReturnType, bool ignorePointerReadOnly)
{
auto proto = variant->Proto;
@ -698,7 +700,7 @@ int PClass::FindVirtualIndex(FName name, PFunction::Variant *variant, PFunction
break;
}
}
else
else if(!ShouldAllowGameSpecificVirtual(name, a, proto->ArgumentTypes[a], vproto->ArgumentTypes[a]))
{
fail = true;
break;

View file

@ -12564,7 +12564,14 @@ FxExpression *FxLocalVariableDeclaration::Resolve(FCompileContext &ctx)
{
if (Init->IsStruct())
{
ValueType = NewPointer(ValueType);
bool writable = true;
if(ctx.Version >= MakeVersion(4, 12, 0))
{
Init->RequestAddress(ctx, &writable);
}
ValueType = NewPointer(ValueType, !writable);
Init = new FxTypeCast(Init, ValueType, false);
SAFE_RESOLVE(Init, ctx);
}