aboutsummaryrefslogtreecommitdiffstats
path: root/src/comp.c
diff options
context:
space:
mode:
authorStefan Monnier2024-03-12 09:26:24 -0400
committerStefan Monnier2024-03-18 09:29:47 -0400
commit706403f2aa3a306369a0150022da0cba1802ca2b (patch)
treec2a2a7e1dc919efdead6ee36f1fb91e3f624c673 /src/comp.c
parent1a8b34a503e5af32851c1aac27a3f09e2345673b (diff)
downloademacs-706403f2aa3a306369a0150022da0cba1802ca2b.tar.gz
emacs-706403f2aa3a306369a0150022da0cba1802ca2b.zip
(cl-type-of): New function to return more precise types (bug#69739)
* src/data.c (Fcl_type_of): New function, extracted from `Ftype_of`. Make it return more precise types for symbols, integers, and subrs. (Ftype_of): Use it. (syms_of_data): Define the corresponding new symbols and defsubr the new function. * doc/lispref/objects.texi (Type Predicates): Document it. * src/comp.c (emit_limple_insn): Use `Fcl_type_of`. * lisp/emacs-lisp/cl-preloaded.el (subr): Demote it to `atom`. (subr-native-elisp, subr-primitive): Add `compiled-function` as parent instead. (special-form): New type. * lisp/obsolete/eieio-core.el (cl--generic-struct-tag): * lisp/emacs-lisp/cl-generic.el (cl--generic-typeof-generalizer): Use `cl-type-of`. cl--generic--unreachable-types): Update accordingly. test/src/data-tests.el (data-tests--cl-type-of): New test.
Diffstat (limited to 'src/comp.c')
-rw-r--r--src/comp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/comp.c b/src/comp.c
index 3f989c722d4..76cf1f3ab6e 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -2442,7 +2442,7 @@ emit_limple_insn (Lisp_Object insn)
2442 { 2442 {
2443 Lisp_Object arg1 = arg[1]; 2443 Lisp_Object arg1 = arg[1];
2444 2444
2445 if (EQ (Ftype_of (arg1), Qcomp_mvar)) 2445 if (EQ (Fcl_type_of (arg1), Qcomp_mvar))
2446 res = emit_mvar_rval (arg1); 2446 res = emit_mvar_rval (arg1);
2447 else if (EQ (FIRST (arg1), Qcall)) 2447 else if (EQ (FIRST (arg1), Qcall))
2448 res = emit_limple_call (XCDR (arg1)); 2448 res = emit_limple_call (XCDR (arg1));