From c5073cb2c5352c1d2c15d2a551b602b442d05ebf Mon Sep 17 00:00:00 2001 From: uis Date: Mon, 13 May 2024 18:10:42 +0300 Subject: [PATCH] Combine IF and GOTO handlers --- prvm_execprogram.h | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/prvm_execprogram.h b/prvm_execprogram.h index f60f74cc..dedde967 100644 --- a/prvm_execprogram.h +++ b/prvm_execprogram.h @@ -362,6 +362,7 @@ // although mostly unneeded, thanks to the only float being false being 0x0 and 0x80000000 (negative zero) // and entity, string, field values can never have that value { + HANDLE_OPCODE(INS_GOTO): ADVANCE_PROFILE_BEFORE_JUMP(); st = cached_statements + st->jumpabsolute - 1; // offset the st++ startst = st; @@ -375,19 +376,6 @@ } DISPATCH_OPCODE(); - HANDLE_OPCODE(INS_GOTO): - ADVANCE_PROFILE_BEFORE_JUMP(); - st = cached_statements + st->jumpabsolute - 1; // offset the st++ - startst = st; - // no bounds check needed, it is done when loading progs - if (++jumpcount == 10000000 && prvm_runawaycheck) - { - prog->xstatement = st - cached_statements; - PRVM_Profile(prog, 1<<30, 0.01, 0); - prog->error_cmd("%s runaway loop counter hit limit of %d jumps\ntip: read above for list of most-executed functions", prog->name, jumpcount); - } - DISPATCH_OPCODE(); - HANDLE_OPCODE(INS_CALL): #ifdef PRVMTIMEPROFILING tm = Sys_DirtyTime(); -- 2.39.2