mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
CON_USE_COMPUTED_GOTO eval macro micro-optimization
This is almost as fast as ditching the bounds check here entirely. git-svn-id: https://svn.eduke32.com/eduke32@7657 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
61d2e31610
commit
7659e816fa
1 changed files with 1 additions and 1 deletions
|
@ -1264,7 +1264,7 @@ void Screen_Play(void)
|
|||
#ifdef CON_USE_COMPUTED_GOTO
|
||||
# define vInstruction(KEYWORDID) VINST_ ## KEYWORDID
|
||||
# define vmErrorCase VINST_CON_OPCODE_END
|
||||
# define eval(INSTRUCTION) { if ((unsigned)INSTRUCTION < CON_OPCODE_END) goto *jumpTable[INSTRUCTION]; else goto vmErrorCase; }
|
||||
# define eval(INSTRUCTION) { goto *jumpTable[min<uint16_t>((unsigned)INSTRUCTION, CON_OPCODE_END)]; }
|
||||
# define dispatch_unconditionally(...) { tw = *insptr; g_errorLineNum = tw >> 12; g_tw = tw &= VM_INSTMASK; eval(tw) }
|
||||
# define dispatch(...) { if (vm_execution_depth && (vm.flags & (VM_RETURN|VM_KILL|VM_NOEXECUTE)) == 0) dispatch_unconditionally(__VA_ARGS__); return; }
|
||||
# define abort_after_error(...) return
|
||||
|
|
Loading…
Reference in a new issue