[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 4ff1fb8eb4 08/14: Move a runtime interpreter check to debug mode
From: |
Mattias Engdegård |
Subject: |
master 4ff1fb8eb4 08/14: Move a runtime interpreter check to debug mode |
Date: |
Mon, 24 Jan 2022 05:42:37 -0500 (EST) |
branch: master
commit 4ff1fb8eb475a540c094878db1811797e2ca2368
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
Move a runtime interpreter check to debug mode
* src/bytecode.c (exec_byte_code): Perform bytecode unwinding error
check only when building with debugging (NDEBUG not defined, checking
enabled, or BYTE_CODE_SAFE enabled). This improves speed in several
ways.
---
src/bytecode.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/bytecode.c b/src/bytecode.c
index 8e0f3d3e4b..75f1a6b43e 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -1564,15 +1564,17 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object
vector, Lisp_Object maxdepth,
exit:
- eassert (SDATA (bytestr) == bytestr_data);
-
- /* Binds and unbinds are supposed to be compiled balanced. */
+#if BYTE_CODE_SAFE || !defined NDEBUG
if (SPECPDL_INDEX () != count)
{
+ /* Binds and unbinds are supposed to be compiled balanced. */
if (SPECPDL_INDEX () > count)
unbind_to (count, Qnil);
error ("binding stack not balanced (serious byte compiler bug)");
}
+#endif
+ /* The byte code should have been properly pinned. */
+ eassert (SDATA (bytestr) == bytestr_data);
Lisp_Object result = TOP;
SAFE_FREE ();
- master updated (bcf844b5fc -> a8b713d83a), Mattias Engdegård, 2022/01/24
- master 15961108c9 01/14: Short-circuit the recursive bytecode funcall chain, Mattias Engdegård, 2022/01/24
- master ce1de3a8d9 03/14: Inline setcar and setcdr in byte-code interpreter, Mattias Engdegård, 2022/01/24
- master 6c000af611 02/14: Inline fixnum operations in bytecode interpreter, Mattias Engdegård, 2022/01/24
- master 65caf5b205 04/14: Pin bytecode strings to avoid copy at call time, Mattias Engdegård, 2022/01/24
- master 7392f2dc41 05/14: Byte code arity check micro-optimisation, Mattias Engdegård, 2022/01/24
- master 4a0541a5dd 12/14: Implement Ffuncall in terms of funcall_general, Mattias Engdegård, 2022/01/24
- master b3377e67a7 07/14: Remove nil check in exec_byte_code, Mattias Engdegård, 2022/01/24
- master 4ff1fb8eb4 08/14: Move a runtime interpreter check to debug mode,
Mattias Engdegård <=
- master 11e1abd5cc 10/14: Open-code aref and aset in bytecode interpreter, Mattias Engdegård, 2022/01/24
- master 721357b868 09/14: Remove the unused unbind-all bytecode, Mattias Engdegård, 2022/01/24
- master d05f387407 06/14: ; * src/bytecode.c (exec_byte_code): Cosmetic improvement, Mattias Engdegård, 2022/01/24
- master 75c6564c92 11/14: ; * lisp/emacs-lisp/byte-opt.el: Remove outdated comments, Mattias Engdegård, 2022/01/24
- master b7902a9b48 13/14: Bump specpdl inline, move reallocation out of line, Mattias Engdegård, 2022/01/24
- master a8b713d83a 14/14: Inline maybe_quit, Mattias Engdegård, 2022/01/24
- Re: master updated (bcf844b5fc -> a8b713d83a), Lars Ingebrigtsen, 2022/01/24