[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 202c331: Restore runtime check for invalid tag
From: |
Paul Eggert |
Subject: |
master 202c331: Restore runtime check for invalid tag |
Date: |
Sat, 22 Feb 2020 11:06:06 -0500 (EST) |
branch: master
commit 202c3319a28c029d6971dccea92f92425c5e8067
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
Restore runtime check for invalid tag
* src/data.c (wrong_type_argument): Restore check that the
object’s tag is valid, since invalid tags exist again.
* src/lisp.h (Lisp_Type_Unused0): New constant.
---
src/data.c | 10 ++--------
src/lisp.h | 1 +
2 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/src/data.c b/src/data.c
index fae9cee..460cb93 100644
--- a/src/data.c
+++ b/src/data.c
@@ -143,15 +143,9 @@ wrong_length_argument (Lisp_Object a1, Lisp_Object a2,
Lisp_Object a3)
}
AVOID
-wrong_type_argument (register Lisp_Object predicate, register Lisp_Object
value)
+wrong_type_argument (Lisp_Object predicate, Lisp_Object value)
{
- /* If VALUE is not even a valid Lisp object, we'd want to abort here
- where we can get a backtrace showing where it came from. We used
- to try and do that by checking the tagbits, but nowadays all
- tagbits are potentially valid. */
- /* if ((unsigned int) XTYPE (value) >= Lisp_Type_Limit)
- * emacs_abort (); */
-
+ eassert (!TAGGEDP (value, Lisp_Type_Unused0));
xsignal2 (Qwrong_type_argument, predicate, value);
}
diff --git a/src/lisp.h b/src/lisp.h
index 0bd3756..a379977 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -481,6 +481,7 @@ enum Lisp_Type
Lisp_Symbol = 0,
/* Type 1 is currently unused. */
+ Lisp_Type_Unused0 = 1,
/* Fixnum. XFIXNUM (obj) is the integer value. */
Lisp_Int0 = 2,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 202c331: Restore runtime check for invalid tag,
Paul Eggert <=