mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-25 15:00:45 -08:00
Byte code arity check micro-optimisation
* src/bytecode.c (exec_byte_code): Slight simplification.
This commit is contained in:
parent
65caf5b205
commit
7392f2dc41
1 changed files with 1 additions and 2 deletions
|
|
@ -391,8 +391,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
|
|||
bool rest = (at & 128) != 0;
|
||||
int mandatory = at & 127;
|
||||
ptrdiff_t nonrest = at >> 8;
|
||||
ptrdiff_t maxargs = rest ? PTRDIFF_MAX : nonrest;
|
||||
if (! (mandatory <= nargs && nargs <= maxargs))
|
||||
if (! (mandatory <= nargs && (rest || nargs <= nonrest)))
|
||||
Fsignal (Qwrong_number_of_arguments,
|
||||
list2 (Fcons (make_fixnum (mandatory), make_fixnum (nonrest)),
|
||||
make_fixnum (nargs)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue