mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
Merge remote-tracking branch 'remotes/origin/master' into asmjit
This commit is contained in:
commit
acbdfddb26
2 changed files with 11 additions and 15 deletions
|
@ -1,4 +1,4 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright 1993-1996 id Software
|
||||
// Copyright 1994-1996 Raven Software
|
||||
|
@ -533,7 +533,8 @@ void AActor::Serialize(FSerializer &arc)
|
|||
A("renderhidden", RenderHidden)
|
||||
A("renderrequired", RenderRequired)
|
||||
A("friendlyseeblocks", friendlyseeblocks)
|
||||
A("spawntime", SpawnTime);
|
||||
A("spawntime", SpawnTime)
|
||||
A("friction", Friction);
|
||||
}
|
||||
|
||||
#undef A
|
||||
|
|
|
@ -2058,10 +2058,12 @@ ExpEmit FxUnaryNotBitwise::Emit(VMFunctionBuilder *build)
|
|||
{
|
||||
assert(Operand->ValueType->GetRegType() == REGT_INT);
|
||||
ExpEmit from = Operand->Emit(build);
|
||||
from.Free(build);
|
||||
ExpEmit to(build, REGT_INT);
|
||||
assert(!from.Konst);
|
||||
// Do it in-place.
|
||||
build->Emit(OP_NOT, from.RegNum, from.RegNum, 0);
|
||||
return from;
|
||||
|
||||
build->Emit(OP_NOT, to.RegNum, from.RegNum, 0);
|
||||
return to;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
@ -4009,7 +4011,7 @@ FxExpression *FxShift::Resolve(FCompileContext& ctx)
|
|||
if (left->IsNumeric() && right->IsNumeric())
|
||||
{
|
||||
if (!Promote(ctx, true)) return nullptr;
|
||||
if (ValueType == TypeUInt32 && Operator == TK_RShift) Operator = TK_URShift;
|
||||
if ((left->ValueType == TypeUInt32 && ctx.Version >= MakeVersion(3, 7)) && Operator == TK_RShift) Operator = TK_URShift;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -4691,14 +4693,7 @@ FxExpression *FxDynamicCast::Resolve(FCompileContext& ctx)
|
|||
{
|
||||
CHECKRESOLVED();
|
||||
SAFE_RESOLVE(expr, ctx);
|
||||
bool constflag = expr->ValueType->isPointer() && expr->ValueType->toPointer()->IsConst;
|
||||
if (constflag)
|
||||
{
|
||||
// readonly pointers are normally only used for class defaults which lack type information to be cast properly, so we have to error out here.
|
||||
ScriptPosition.Message(MSG_ERROR, "Cannot cast a readonly pointer");
|
||||
delete this;
|
||||
return nullptr;
|
||||
}
|
||||
bool constflag = expr->ValueType->isPointer() && expr->ValueType->toPointer()->IsConst;
|
||||
expr = new FxTypeCast(expr, NewPointer(RUNTIME_CLASS(DObject), constflag), true, true);
|
||||
expr = expr->Resolve(ctx);
|
||||
if (expr == nullptr)
|
||||
|
@ -10645,7 +10640,7 @@ FxExpression *FxReturnStatement::Resolve(FCompileContext &ctx)
|
|||
|
||||
PPrototype *retproto;
|
||||
|
||||
if (ctx.ReturnProto != nullptr && ctx.ReturnProto->ReturnTypes.Size() != Args.Size())
|
||||
if (ctx.ReturnProto != nullptr && ctx.ReturnProto->ReturnTypes.Size() == 0 && ctx.ReturnProto->ReturnTypes.Size() != Args.Size())
|
||||
{
|
||||
int severity = ctx.Version >= MakeVersion(3, 7) ? MSG_ERROR : MSG_WARNING;
|
||||
ScriptPosition.Message(severity, "Incorrect number of return values. Got %u, but expected %u", Args.Size(), ctx.ReturnProto->ReturnTypes.Size());
|
||||
|
|
Loading…
Reference in a new issue