- Backend update from Raze.
This is mainly code cleanup from setting the compiler to a stricter warning level.
This commit is contained in:
parent
6aea7694bc
commit
1c517d19fa
102 changed files with 493 additions and 590 deletions
|
|
@ -692,7 +692,7 @@ static int ExecScriptFunc(VMFrameStack *stack, VMReturn *ret, int numret)
|
|||
{
|
||||
VMFunction *call = (VMFunction *)ptr;
|
||||
VMReturn returns[MAX_RETURNS];
|
||||
int numret;
|
||||
int numret1;
|
||||
|
||||
b = B;
|
||||
FillReturns(reg, f, returns, pc+1, C);
|
||||
|
|
@ -701,7 +701,7 @@ static int ExecScriptFunc(VMFrameStack *stack, VMReturn *ret, int numret)
|
|||
try
|
||||
{
|
||||
VMCycles[0].Unclock();
|
||||
numret = static_cast<VMNativeFunction *>(call)->NativeCall(VM_INVOKE(reg.param + f->NumParam - b, b, returns, C, call->RegTypes));
|
||||
numret1 = static_cast<VMNativeFunction *>(call)->NativeCall(VM_INVOKE(reg.param + f->NumParam - b, b, returns, C, call->RegTypes));
|
||||
VMCycles[0].Clock();
|
||||
}
|
||||
catch (CVMAbortException &err)
|
||||
|
|
@ -714,10 +714,10 @@ static int ExecScriptFunc(VMFrameStack *stack, VMReturn *ret, int numret)
|
|||
}
|
||||
else
|
||||
{
|
||||
auto sfunc = static_cast<VMScriptFunction *>(call);
|
||||
numret = sfunc->ScriptCall(sfunc, reg.param + f->NumParam - b, b, returns, C);
|
||||
auto sfunc1 = static_cast<VMScriptFunction *>(call);
|
||||
numret1 = sfunc1->ScriptCall(sfunc1, reg.param + f->NumParam - b, b, returns, C);
|
||||
}
|
||||
assert(numret == C && "Number of parameters returned differs from what was expected by the caller");
|
||||
assert(numret1 == C && "Number of parameters returned differs from what was expected by the caller");
|
||||
f->NumParam -= B;
|
||||
pc += C; // Skip RESULTs
|
||||
}
|
||||
|
|
@ -858,31 +858,31 @@ static int ExecScriptFunc(VMFrameStack *stack, VMReturn *ret, int numret)
|
|||
// chosen to conserve a few opcodes by condensing all the
|
||||
// string comparisons into a single one.
|
||||
{
|
||||
const FString *b, *c;
|
||||
const FString *b1, *c1;
|
||||
int test, method;
|
||||
bool cmp;
|
||||
|
||||
if (a & CMP_BK)
|
||||
{
|
||||
ASSERTKS(B);
|
||||
b = &konsts[B];
|
||||
b1 = &konsts[B];
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSERTS(B);
|
||||
b = ®.s[B];
|
||||
b1 = ®.s[B];
|
||||
}
|
||||
if (a & CMP_CK)
|
||||
{
|
||||
ASSERTKS(C);
|
||||
c = &konsts[C];
|
||||
c1 = &konsts[C];
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSERTS(C);
|
||||
c = ®.s[C];
|
||||
c1 = ®.s[C];
|
||||
}
|
||||
test = (a & CMP_APPROX) ? b->CompareNoCase(*c) : b->Compare(*c);
|
||||
test = (a & CMP_APPROX) ? b1->CompareNoCase(*c1) : b1->Compare(*c1);
|
||||
method = a & CMP_METHOD_MASK;
|
||||
if (method == CMP_EQ)
|
||||
{
|
||||
|
|
@ -1302,12 +1302,10 @@ static int ExecScriptFunc(VMFrameStack *stack, VMReturn *ret, int numret)
|
|||
ASSERTF(a); ASSERTF(B); ASSERTKF(C);
|
||||
fb = reg.f[B]; fc = konstf[C];
|
||||
goto Do_MODF;
|
||||
NEXTOP;
|
||||
OP(MODF_KR):
|
||||
ASSERTF(a); ASSERTKF(B); ASSERTF(C);
|
||||
fb = konstf[B]; fc = reg.f[C];
|
||||
goto Do_MODF;
|
||||
NEXTOP;
|
||||
|
||||
OP(POWF_RR):
|
||||
ASSERTF(a); ASSERTF(B); ASSERTF(C);
|
||||
|
|
@ -1712,7 +1710,6 @@ static int ExecScriptFunc(VMFrameStack *stack, VMReturn *ret, int numret)
|
|||
// PrintParameters(reg.param + f->NumParam - B, B);
|
||||
throw;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static double DoFLOP(int flop, double v)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue