Skip to content

Commit

Permalink
- backend update from GZDoom
Browse files Browse the repository at this point in the history
  • Loading branch information
madame-rachelle committed Apr 20, 2024
1 parent d2b2092 commit 30e9cb7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
3 changes: 3 additions & 0 deletions source/common/filesystem/source/fs_findfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 3 additions & 1 deletion source/common/objects/dobjtype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
9 changes: 8 additions & 1 deletion source/common/scripting/backend/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 30e9cb7

Please sign in to comment.