[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/bytecode-speedup a2b4058b96 05/11: Byte code arity check micro-o
From: |
Mattias Engdegård |
Subject: |
scratch/bytecode-speedup a2b4058b96 05/11: Byte code arity check micro-optimisation |
Date: |
Tue, 11 Jan 2022 11:50:48 -0500 (EST) |
branch: scratch/bytecode-speedup
commit a2b4058b96ccbb24b2047cab46517a10d7b4b686
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
Byte code arity check micro-optimisation
* src/bytecode.c (exec_byte_code): Slight simplification.
---
src/bytecode.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/bytecode.c b/src/bytecode.c
index 1561bdc149..2b017f0e8d 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,
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)));
- scratch/bytecode-speedup 1e439fe19a 10/11: Open-code aref and aset in bytecode interpreter, (continued)
- scratch/bytecode-speedup 1e439fe19a 10/11: Open-code aref and aset in bytecode interpreter, Mattias Engdegård, 2022/01/11
- scratch/bytecode-speedup 712237cab6 11/11: ; * lisp/emacs-lisp/byte-opt.el: Remove outdated comments, Mattias Engdegård, 2022/01/11
- scratch/bytecode-speedup 02ff30bfbb 06/11: ; * src/bytecode.c (exec_byte_code): Cosmetic improvement, Mattias Engdegård, 2022/01/11
- scratch/bytecode-speedup 09b5ed93b1 07/11: Remove nil check in exec_byte_code, Mattias Engdegård, 2022/01/11
- scratch/bytecode-speedup 870806d4c4 04/11: Pin bytecode strings to avoid copy at call time, Mattias Engdegård, 2022/01/11
- scratch/bytecode-speedup 43932a0d90 01/11: Short-circuit the recursive bytecode funcall chain, Mattias Engdegård, 2022/01/11
- scratch/bytecode-speedup 5dd261282d 02/11: Inline fixnum operations in bytecode interpreter, Mattias Engdegård, 2022/01/11
- scratch/bytecode-speedup 1eacfb3c88 09/11: Remove the unused unbind-all bytecode, Mattias Engdegård, 2022/01/11
- scratch/bytecode-speedup b43e4a184f 03/11: Inline setcar and setcdr in byte-code interpreter, Mattias Engdegård, 2022/01/11
- scratch/bytecode-speedup 1dca615cf9 08/11: Move a runtime interpreter check to ENABLE_CHECKING, Mattias Engdegård, 2022/01/11
- scratch/bytecode-speedup a2b4058b96 05/11: Byte code arity check micro-optimisation,
Mattias Engdegård <=