diff options
| author | Mattias EngdegÄrd | 2021-12-31 19:44:02 +0100 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2022-01-24 11:41:46 +0100 |
| commit | 7392f2dc4102fcc5bc4e8a9752db589f75ab9f52 (patch) | |
| tree | 2ca8cc728608bb11ef60d609c713803e9bd2c418 /src/bytecode.c | |
| parent | 65caf5b205d22f76bb4ec85cfe597b621a83afb3 (diff) | |
| download | emacs-7392f2dc4102fcc5bc4e8a9752db589f75ab9f52.tar.gz emacs-7392f2dc4102fcc5bc4e8a9752db589f75ab9f52.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.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/bytecode.c b/src/bytecode.c index 0d0a28cd0bb..00db29b0140 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))); |