aboutsummaryrefslogtreecommitdiffstats
path: root/src/bytecode.c
diff options
context:
space:
mode:
authorMattias EngdegÄrd2021-12-31 19:44:02 +0100
committerMattias EngdegÄrd2022-01-11 15:22:48 +0100
commita2b4058b96ccbb24b2047cab46517a10d7b4b686 (patch)
treefea3511b7a3935a6e3d6ddd305c074fdb4990da5 /src/bytecode.c
parent870806d4c453addca794aa0940298425241e13d9 (diff)
downloademacs-a2b4058b96ccbb24b2047cab46517a10d7b4b686.tar.gz
emacs-a2b4058b96ccbb24b2047cab46517a10d7b4b686.zip
Byte code arity check micro-optimisation
* src/bytecode.c (exec_byte_code): Slight simplification.
Diffstat (limited to 'src/bytecode.c')
-rw-r--r--src/bytecode.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/bytecode.c b/src/bytecode.c
index 1561bdc149d..2b017f0e8d5 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -391,8 +391,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
391 bool rest = (at & 128) != 0; 391 bool rest = (at & 128) != 0;
392 int mandatory = at & 127; 392 int mandatory = at & 127;
393 ptrdiff_t nonrest = at >> 8; 393 ptrdiff_t nonrest = at >> 8;
394 ptrdiff_t maxargs = rest ? PTRDIFF_MAX : nonrest; 394 if (! (mandatory <= nargs && (rest || nargs <= nonrest)))
395 if (! (mandatory <= nargs && nargs <= maxargs))
396 Fsignal (Qwrong_number_of_arguments, 395 Fsignal (Qwrong_number_of_arguments,
397 list2 (Fcons (make_fixnum (mandatory), make_fixnum (nonrest)), 396 list2 (Fcons (make_fixnum (mandatory), make_fixnum (nonrest)),
398 make_fixnum (nargs))); 397 make_fixnum (nargs)));