From 37ff7a05f3e5af4d570db1b3ed4d4aa2190f70f5 Mon Sep 17 00:00:00 2001 From: Mattias EngdegÄrd Date: Thu, 16 Oct 2025 17:01:24 +0200 Subject: ; exec_byte_code: refactor branch case --- src/bytecode.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/bytecode.c b/src/bytecode.c index c3fc3100e21..ad3844d0213 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -851,20 +851,20 @@ exec_byte_code (Lisp_Object fun, ptrdiff_t args_template, CASE (Bgoto): arg = FETCH2; op_branch: - arg -= pc - bytestr_data; - if (BYTE_CODE_SAFE - && ! (bytestr_data - pc <= arg - && arg < bytestr_data + bytestr_length - pc)) - emacs_abort (); - quitcounter += arg < 0; - if (!quitcounter) - { - quitcounter = 1; - maybe_gc (); - maybe_quit (); - } - pc += arg; - NEXT; + { + if (BYTE_CODE_SAFE && !(arg >= 0 && arg < bytestr_length)) + emacs_abort (); + const unsigned char *new_pc = bytestr_data + arg; + quitcounter += arg < 0; + if (!quitcounter) + { + quitcounter = 1; + maybe_gc (); + maybe_quit (); + } + pc = new_pc; + NEXT; + } CASE (Bgotoifnonnil): arg = FETCH2; -- cgit v1.2.1