mirror of
https://github.com/nzp-team/fteqw.git
synced 2025-01-20 07:20:50 +00:00
A minor optimisation for lazy compilers.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3259 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
3b9f4c9fbb
commit
bde52736c2
1 changed files with 15 additions and 6 deletions
|
@ -474,13 +474,22 @@ void QVM_UnLoadVM(qvm_t *qvm)
|
|||
|
||||
/*
|
||||
** QVM_Goto
|
||||
|
||||
(inlined this the old fashioned way)
|
||||
*/
|
||||
static void inline QVM_Goto(qvm_t *vm, int addr)
|
||||
{
|
||||
if(addr<0 || addr>vm->len_cs)
|
||||
Sys_Error("VM run time error: program jumped off to hyperspace\n");
|
||||
vm->pc=vm->cs+addr*2;
|
||||
}
|
||||
#define QVM_Goto(vm,addr) \
|
||||
do{ \
|
||||
if(addr<0 || addr>vm->len_cs) \
|
||||
Sys_Error("VM run time error: program jumped off to hyperspace\n"); \
|
||||
vm->pc=vm->cs+addr*2; \
|
||||
} while(0)
|
||||
|
||||
//static void inline QVM_Goto(qvm_t *vm, int addr)
|
||||
//{
|
||||
// if(addr<0 || addr>vm->len_cs)
|
||||
// Sys_Error("VM run time error: program jumped off to hyperspace\n");
|
||||
// vm->pc=vm->cs+addr*2;
|
||||
//}
|
||||
|
||||
/*
|
||||
** QVM_Call
|
||||
|
|
Loading…
Reference in a new issue