aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2024-03-24 18:32:25 -0400
committerStefan Monnier2024-04-18 12:29:58 -0400
commit7842af6095db4384898725fb4a14ebaa11379a34 (patch)
treeec7d690893ffe393a0e6020f9e26881613d9e4f3
parent3228c1222c99e672ca0cd7599c07ea1db852aa1a (diff)
downloademacs-7842af6095db4384898725fb4a14ebaa11379a34.tar.gz
emacs-7842af6095db4384898725fb4a14ebaa11379a34.zip
(COMPILED): Rename to CLOSURE
In preparation for the use of `PVEC_COMPILED` objects for interpreted functions, rename them to use a more neutral name. * src/lisp.h (enum pvec_type): Rename `PVEC_COMPILED` to `PVEC_CLOSURE`. (enum Lisp_Compiled): Use `CLOSURE_` prefix i.s.o `COMPILED_`. Also use `CODE` rather than `BYTECODE`. (CLOSUREP): Rename from `COMPILEDP`. (enum Lisp_Closure): Rename from `Lisp_Compiled`. * src/alloc.c, src/bytecode.c, src/comp.c, src/data.c, src/eval.c, * src/fns.c, src/lisp.h, src/lread.c, src/pdumper.c, src/print.c, * src/profiler.c: Rename all uses accordingly. * src/.gdbinit (xclosure): Rename from `xcompiled`. (xcompiled): New obsolete alias. (xpr): Adjust accordingly. Also adjust to new PVEC_CLOSURE tag name.
-rw-r--r--src/.gdbinit17
-rw-r--r--src/alloc.c40
-rw-r--r--src/bytecode.c20
-rw-r--r--src/comp.c2
-rw-r--r--src/data.c22
-rw-r--r--src/eval.c26
-rw-r--r--src/fns.c14
-rw-r--r--src/lisp.h22
-rw-r--r--src/lread.c40
-rw-r--r--src/pdumper.c2
-rw-r--r--src/print.c6
-rw-r--r--src/profiler.c6
12 files changed, 112 insertions, 105 deletions
diff --git a/src/.gdbinit b/src/.gdbinit
index 6c4dda67f06..7645d466a5e 100644
--- a/src/.gdbinit
+++ b/src/.gdbinit
@@ -822,15 +822,22 @@ Print $ as a frame pointer.
822This command assumes $ is an Emacs Lisp frame value. 822This command assumes $ is an Emacs Lisp frame value.
823end 823end
824 824
825define xcompiled 825define xclosure
826 xgetptr $ 826 xgetptr $
827 print (struct Lisp_Vector *) $ptr 827 print (struct Lisp_Vector *) $ptr
828 output ($->contents[0])@($->header.size & 0xff) 828 output ($->contents[0])@($->header.size & 0xff)
829 echo \n 829 echo \n
830end 830end
831document xclosure
832Print $ as a function pointer.
833This command assumes that $ is an Emacs Lisp byte-code or interpreted function value.
834end
835
836define xcompiled
837 xclosure
838end
831document xcompiled 839document xcompiled
832Print $ as a compiled function pointer. 840Obsolete alias for "xclosure".
833This command assumes that $ is an Emacs Lisp compiled value.
834end 841end
835 842
836define xwindow 843define xwindow
@@ -1038,8 +1045,8 @@ define xpr
1038 if $vec == PVEC_FRAME 1045 if $vec == PVEC_FRAME
1039 xframe 1046 xframe
1040 end 1047 end
1041 if $vec == PVEC_COMPILED 1048 if $vec == PVEC_CLOSURE
1042 xcompiled 1049 xclosure
1043 end 1050 end
1044 if $vec == PVEC_WINDOW 1051 if $vec == PVEC_WINDOW
1045 xwindow 1052 xwindow
diff --git a/src/alloc.c b/src/alloc.c
index 6779d0ca9ce..a8dfde56739 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -3481,7 +3481,7 @@ cleanup_vector (struct Lisp_Vector *vector)
3481 case PVEC_XWIDGET_VIEW: 3481 case PVEC_XWIDGET_VIEW:
3482 case PVEC_TS_NODE: 3482 case PVEC_TS_NODE:
3483 case PVEC_SQLITE: 3483 case PVEC_SQLITE:
3484 case PVEC_COMPILED: 3484 case PVEC_CLOSURE:
3485 case PVEC_CHAR_TABLE: 3485 case PVEC_CHAR_TABLE:
3486 case PVEC_SUB_CHAR_TABLE: 3486 case PVEC_SUB_CHAR_TABLE:
3487 case PVEC_RECORD: 3487 case PVEC_RECORD:
@@ -3813,17 +3813,17 @@ stack before executing the byte-code.
3813usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INTERACTIVE-SPEC &rest ELEMENTS) */) 3813usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INTERACTIVE-SPEC &rest ELEMENTS) */)
3814 (ptrdiff_t nargs, Lisp_Object *args) 3814 (ptrdiff_t nargs, Lisp_Object *args)
3815{ 3815{
3816 if (! ((FIXNUMP (args[COMPILED_ARGLIST]) 3816 if (! ((FIXNUMP (args[CLOSURE_ARGLIST])
3817 || CONSP (args[COMPILED_ARGLIST]) 3817 || CONSP (args[CLOSURE_ARGLIST])
3818 || NILP (args[COMPILED_ARGLIST])) 3818 || NILP (args[CLOSURE_ARGLIST]))
3819 && STRINGP (args[COMPILED_BYTECODE]) 3819 && STRINGP (args[CLOSURE_CODE])
3820 && !STRING_MULTIBYTE (args[COMPILED_BYTECODE]) 3820 && !STRING_MULTIBYTE (args[CLOSURE_CODE])
3821 && VECTORP (args[COMPILED_CONSTANTS]) 3821 && VECTORP (args[CLOSURE_CONSTANTS])
3822 && FIXNATP (args[COMPILED_STACK_DEPTH]))) 3822 && FIXNATP (args[CLOSURE_STACK_DEPTH])))
3823 error ("Invalid byte-code object"); 3823 error ("Invalid byte-code object");
3824 3824
3825 /* Bytecode must be immovable. */ 3825 /* Bytecode must be immovable. */
3826 pin_string (args[COMPILED_BYTECODE]); 3826 pin_string (args[CLOSURE_CODE]);
3827 3827
3828 /* We used to purecopy everything here, if purify-flag was set. This worked 3828 /* We used to purecopy everything here, if purify-flag was set. This worked
3829 OK for Emacs-23, but with Emacs-24's lexical binding code, it can be 3829 OK for Emacs-23, but with Emacs-24's lexical binding code, it can be
@@ -3833,7 +3833,7 @@ usage: (make-byte-code ARGLIST BYTE-CODE CONSTANTS DEPTH &optional DOCSTRING INT
3833 just wasteful and other times plainly wrong (e.g. those free vars may want 3833 just wasteful and other times plainly wrong (e.g. those free vars may want
3834 to be setcar'd). */ 3834 to be setcar'd). */
3835 Lisp_Object val = Fvector (nargs, args); 3835 Lisp_Object val = Fvector (nargs, args);
3836 XSETPVECTYPE (XVECTOR (val), PVEC_COMPILED); 3836 XSETPVECTYPE (XVECTOR (val), PVEC_CLOSURE);
3837 return val; 3837 return val;
3838} 3838}
3839 3839
@@ -3845,12 +3845,12 @@ usage: (make-closure PROTOTYPE &rest CLOSURE-VARS) */)
3845 (ptrdiff_t nargs, Lisp_Object *args) 3845 (ptrdiff_t nargs, Lisp_Object *args)
3846{ 3846{
3847 Lisp_Object protofun = args[0]; 3847 Lisp_Object protofun = args[0];
3848 CHECK_TYPE (COMPILEDP (protofun), Qbyte_code_function_p, protofun); 3848 CHECK_TYPE (CLOSUREP (protofun), Qbyte_code_function_p, protofun);
3849 3849
3850 /* Create a copy of the constant vector, filling it with the closure 3850 /* Create a copy of the constant vector, filling it with the closure
3851 variables in the beginning. (The overwritten part should just 3851 variables in the beginning. (The overwritten part should just
3852 contain placeholder values.) */ 3852 contain placeholder values.) */
3853 Lisp_Object proto_constvec = AREF (protofun, COMPILED_CONSTANTS); 3853 Lisp_Object proto_constvec = AREF (protofun, CLOSURE_CONSTANTS);
3854 ptrdiff_t constsize = ASIZE (proto_constvec); 3854 ptrdiff_t constsize = ASIZE (proto_constvec);
3855 ptrdiff_t nvars = nargs - 1; 3855 ptrdiff_t nvars = nargs - 1;
3856 if (nvars > constsize) 3856 if (nvars > constsize)
@@ -3866,7 +3866,7 @@ usage: (make-closure PROTOTYPE &rest CLOSURE-VARS) */)
3866 struct Lisp_Vector *v = allocate_vectorlike (protosize, false); 3866 struct Lisp_Vector *v = allocate_vectorlike (protosize, false);
3867 v->header = XVECTOR (protofun)->header; 3867 v->header = XVECTOR (protofun)->header;
3868 memcpy (v->contents, XVECTOR (protofun)->contents, protosize * word_size); 3868 memcpy (v->contents, XVECTOR (protofun)->contents, protosize * word_size);
3869 v->contents[COMPILED_CONSTANTS] = constvec; 3869 v->contents[CLOSURE_CONSTANTS] = constvec;
3870 return make_lisp_ptr (v, Lisp_Vectorlike); 3870 return make_lisp_ptr (v, Lisp_Vectorlike);
3871} 3871}
3872 3872
@@ -6046,7 +6046,7 @@ purecopy (Lisp_Object obj)
6046 6046
6047 obj = make_lisp_hash_table (purecopy_hash_table (table)); 6047 obj = make_lisp_hash_table (purecopy_hash_table (table));
6048 } 6048 }
6049 else if (COMPILEDP (obj) || VECTORP (obj) || RECORDP (obj)) 6049 else if (CLOSUREP (obj) || VECTORP (obj) || RECORDP (obj))
6050 { 6050 {
6051 struct Lisp_Vector *objp = XVECTOR (obj); 6051 struct Lisp_Vector *objp = XVECTOR (obj);
6052 ptrdiff_t nbytes = vector_nbytes (objp); 6052 ptrdiff_t nbytes = vector_nbytes (objp);
@@ -6059,7 +6059,7 @@ purecopy (Lisp_Object obj)
6059 for (i = 0; i < size; i++) 6059 for (i = 0; i < size; i++)
6060 vec->contents[i] = purecopy (vec->contents[i]); 6060 vec->contents[i] = purecopy (vec->contents[i]);
6061 /* Byte code strings must be pinned. */ 6061 /* Byte code strings must be pinned. */
6062 if (COMPILEDP (obj) && size >= 2 && STRINGP (vec->contents[1]) 6062 if (CLOSUREP (obj) && size >= 2 && STRINGP (vec->contents[1])
6063 && !STRING_MULTIBYTE (vec->contents[1])) 6063 && !STRING_MULTIBYTE (vec->contents[1]))
6064 pin_string (vec->contents[1]); 6064 pin_string (vec->contents[1]);
6065 XSETVECTOR (obj, vec); 6065 XSETVECTOR (obj, vec);
@@ -8014,11 +8014,11 @@ symbol_uses_obj (Lisp_Object symbol, Lisp_Object obj)
8014 return (EQ (val, obj) 8014 return (EQ (val, obj)
8015 || EQ (sym->u.s.function, obj) 8015 || EQ (sym->u.s.function, obj)
8016 || (!NILP (sym->u.s.function) 8016 || (!NILP (sym->u.s.function)
8017 && COMPILEDP (sym->u.s.function) 8017 && CLOSUREP (sym->u.s.function)
8018 && EQ (AREF (sym->u.s.function, COMPILED_BYTECODE), obj)) 8018 && EQ (AREF (sym->u.s.function, CLOSURE_CODE), obj))
8019 || (!NILP (val) 8019 || (!NILP (val)
8020 && COMPILEDP (val) 8020 && CLOSUREP (val)
8021 && EQ (AREF (val, COMPILED_BYTECODE), obj))); 8021 && EQ (AREF (val, CLOSURE_CODE), obj)));
8022} 8022}
8023 8023
8024/* Find at most FIND_MAX symbols which have OBJ as their value or 8024/* Find at most FIND_MAX symbols which have OBJ as their value or
@@ -8343,7 +8343,7 @@ union
8343 enum CHECK_LISP_OBJECT_TYPE CHECK_LISP_OBJECT_TYPE; 8343 enum CHECK_LISP_OBJECT_TYPE CHECK_LISP_OBJECT_TYPE;
8344 enum DEFAULT_HASH_SIZE DEFAULT_HASH_SIZE; 8344 enum DEFAULT_HASH_SIZE DEFAULT_HASH_SIZE;
8345 enum Lisp_Bits Lisp_Bits; 8345 enum Lisp_Bits Lisp_Bits;
8346 enum Lisp_Compiled Lisp_Compiled; 8346 enum Lisp_Closure Lisp_Closure;
8347 enum maxargs maxargs; 8347 enum maxargs maxargs;
8348 enum MAX_ALLOCA MAX_ALLOCA; 8348 enum MAX_ALLOCA MAX_ALLOCA;
8349 enum More_Lisp_Bits More_Lisp_Bits; 8349 enum More_Lisp_Bits More_Lisp_Bits;
diff --git a/src/bytecode.c b/src/bytecode.c
index de25069d94a..03443ed54ab 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -479,7 +479,7 @@ exec_byte_code (Lisp_Object fun, ptrdiff_t args_template,
479 Lisp_Object *top = NULL; 479 Lisp_Object *top = NULL;
480 unsigned char const *pc = NULL; 480 unsigned char const *pc = NULL;
481 481
482 Lisp_Object bytestr = AREF (fun, COMPILED_BYTECODE); 482 Lisp_Object bytestr = AREF (fun, CLOSURE_CODE);
483 483
484 setup_frame: ; 484 setup_frame: ;
485 eassert (!STRING_MULTIBYTE (bytestr)); 485 eassert (!STRING_MULTIBYTE (bytestr));
@@ -489,8 +489,8 @@ exec_byte_code (Lisp_Object fun, ptrdiff_t args_template,
489 when returning, to detect unwind imbalances. This would require adding 489 when returning, to detect unwind imbalances. This would require adding
490 a field to the frame header. */ 490 a field to the frame header. */
491 491
492 Lisp_Object vector = AREF (fun, COMPILED_CONSTANTS); 492 Lisp_Object vector = AREF (fun, CLOSURE_CONSTANTS);
493 Lisp_Object maxdepth = AREF (fun, COMPILED_STACK_DEPTH); 493 Lisp_Object maxdepth = AREF (fun, CLOSURE_STACK_DEPTH);
494 ptrdiff_t const_length = ASIZE (vector); 494 ptrdiff_t const_length = ASIZE (vector);
495 ptrdiff_t bytestr_length = SCHARS (bytestr); 495 ptrdiff_t bytestr_length = SCHARS (bytestr);
496 Lisp_Object *vectorp = XVECTOR (vector)->contents; 496 Lisp_Object *vectorp = XVECTOR (vector)->contents;
@@ -792,14 +792,14 @@ exec_byte_code (Lisp_Object fun, ptrdiff_t args_template,
792 /* Calls to symbols-with-pos don't need to be on the fast path. */ 792 /* Calls to symbols-with-pos don't need to be on the fast path. */
793 if (BARE_SYMBOL_P (call_fun)) 793 if (BARE_SYMBOL_P (call_fun))
794 call_fun = XBARE_SYMBOL (call_fun)->u.s.function; 794 call_fun = XBARE_SYMBOL (call_fun)->u.s.function;
795 if (COMPILEDP (call_fun)) 795 if (CLOSUREP (call_fun))
796 { 796 {
797 Lisp_Object template = AREF (call_fun, COMPILED_ARGLIST); 797 Lisp_Object template = AREF (call_fun, CLOSURE_ARGLIST);
798 if (FIXNUMP (template)) 798 if (FIXNUMP (template))
799 { 799 {
800 /* Fast path for lexbound functions. */ 800 /* Fast path for lexbound functions. */
801 fun = call_fun; 801 fun = call_fun;
802 bytestr = AREF (call_fun, COMPILED_BYTECODE), 802 bytestr = AREF (call_fun, CLOSURE_CODE),
803 args_template = XFIXNUM (template); 803 args_template = XFIXNUM (template);
804 nargs = call_nargs; 804 nargs = call_nargs;
805 args = call_args; 805 args = call_args;
@@ -897,8 +897,8 @@ exec_byte_code (Lisp_Object fun, ptrdiff_t args_template,
897 bc->fp = fp; 897 bc->fp = fp;
898 898
899 Lisp_Object fun = fp->fun; 899 Lisp_Object fun = fp->fun;
900 Lisp_Object bytestr = AREF (fun, COMPILED_BYTECODE); 900 Lisp_Object bytestr = AREF (fun, CLOSURE_CODE);
901 Lisp_Object vector = AREF (fun, COMPILED_CONSTANTS); 901 Lisp_Object vector = AREF (fun, CLOSURE_CONSTANTS);
902 bytestr_data = SDATA (bytestr); 902 bytestr_data = SDATA (bytestr);
903 vectorp = XVECTOR (vector)->contents; 903 vectorp = XVECTOR (vector)->contents;
904 if (BYTE_CODE_SAFE) 904 if (BYTE_CODE_SAFE)
@@ -974,8 +974,8 @@ exec_byte_code (Lisp_Object fun, ptrdiff_t args_template,
974 struct bc_frame *fp = bc->fp; 974 struct bc_frame *fp = bc->fp;
975 975
976 Lisp_Object fun = fp->fun; 976 Lisp_Object fun = fp->fun;
977 Lisp_Object bytestr = AREF (fun, COMPILED_BYTECODE); 977 Lisp_Object bytestr = AREF (fun, CLOSURE_CODE);
978 Lisp_Object vector = AREF (fun, COMPILED_CONSTANTS); 978 Lisp_Object vector = AREF (fun, CLOSURE_CONSTANTS);
979 bytestr_data = SDATA (bytestr); 979 bytestr_data = SDATA (bytestr);
980 vectorp = XVECTOR (vector)->contents; 980 vectorp = XVECTOR (vector)->contents;
981 if (BYTE_CODE_SAFE) 981 if (BYTE_CODE_SAFE)
diff --git a/src/comp.c b/src/comp.c
index 99f51e07048..d2115de522c 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -5199,7 +5199,7 @@ maybe_defer_native_compilation (Lisp_Object function_name,
5199 if (!native_comp_jit_compilation 5199 if (!native_comp_jit_compilation
5200 || noninteractive 5200 || noninteractive
5201 || !NILP (Vpurify_flag) 5201 || !NILP (Vpurify_flag)
5202 || !COMPILEDP (definition) 5202 || !CLOSUREP (definition)
5203 || !STRINGP (Vload_true_file_name) 5203 || !STRINGP (Vload_true_file_name)
5204 || !suffix_p (Vload_true_file_name, ".elc") 5204 || !suffix_p (Vload_true_file_name, ".elc")
5205 || !NILP (Fgethash (Vload_true_file_name, V_comp_no_native_file_h, Qnil))) 5205 || !NILP (Fgethash (Vload_true_file_name, V_comp_no_native_file_h, Qnil)))
diff --git a/src/data.c b/src/data.c
index c4b9cff8ae0..681054ff8cb 100644
--- a/src/data.c
+++ b/src/data.c
@@ -248,7 +248,7 @@ a fixed set of types. */)
248 return XSUBR (object)->max_args == UNEVALLED ? Qspecial_form 248 return XSUBR (object)->max_args == UNEVALLED ? Qspecial_form
249 : SUBR_NATIVE_COMPILEDP (object) ? Qsubr_native_elisp 249 : SUBR_NATIVE_COMPILEDP (object) ? Qsubr_native_elisp
250 : Qprimitive_function; 250 : Qprimitive_function;
251 case PVEC_COMPILED: return Qcompiled_function; 251 case PVEC_CLOSURE: return Qcompiled_function;
252 case PVEC_BUFFER: return Qbuffer; 252 case PVEC_BUFFER: return Qbuffer;
253 case PVEC_CHAR_TABLE: return Qchar_table; 253 case PVEC_CHAR_TABLE: return Qchar_table;
254 case PVEC_BOOL_VECTOR: return Qbool_vector; 254 case PVEC_BOOL_VECTOR: return Qbool_vector;
@@ -523,7 +523,7 @@ DEFUN ("byte-code-function-p", Fbyte_code_function_p, Sbyte_code_function_p,
523 doc: /* Return t if OBJECT is a byte-compiled function object. */) 523 doc: /* Return t if OBJECT is a byte-compiled function object. */)
524 (Lisp_Object object) 524 (Lisp_Object object)
525{ 525{
526 if (COMPILEDP (object)) 526 if (CLOSUREP (object))
527 return Qt; 527 return Qt;
528 return Qnil; 528 return Qnil;
529} 529}
@@ -1143,19 +1143,19 @@ Value, if non-nil, is a list (interactive SPEC). */)
1143 (*spec != '(') ? build_string (spec) : 1143 (*spec != '(') ? build_string (spec) :
1144 Fcar (Fread_from_string (build_string (spec), Qnil, Qnil))); 1144 Fcar (Fread_from_string (build_string (spec), Qnil, Qnil)));
1145 } 1145 }
1146 else if (COMPILEDP (fun)) 1146 else if (CLOSUREP (fun))
1147 { 1147 {
1148 if (PVSIZE (fun) > COMPILED_INTERACTIVE) 1148 if (PVSIZE (fun) > CLOSURE_INTERACTIVE)
1149 { 1149 {
1150 Lisp_Object form = AREF (fun, COMPILED_INTERACTIVE); 1150 Lisp_Object form = AREF (fun, CLOSURE_INTERACTIVE);
1151 /* The vector form is the new form, where the first 1151 /* The vector form is the new form, where the first
1152 element is the interactive spec, and the second is the 1152 element is the interactive spec, and the second is the
1153 command modes. */ 1153 command modes. */
1154 return list2 (Qinteractive, VECTORP (form) ? AREF (form, 0) : form); 1154 return list2 (Qinteractive, VECTORP (form) ? AREF (form, 0) : form);
1155 } 1155 }
1156 else if (PVSIZE (fun) > COMPILED_DOC_STRING) 1156 else if (PVSIZE (fun) > CLOSURE_DOC_STRING)
1157 { 1157 {
1158 Lisp_Object doc = AREF (fun, COMPILED_DOC_STRING); 1158 Lisp_Object doc = AREF (fun, CLOSURE_DOC_STRING);
1159 /* An invalid "docstring" is a sign that we have an OClosure. */ 1159 /* An invalid "docstring" is a sign that we have an OClosure. */
1160 genfun = !(NILP (doc) || VALID_DOCSTRING_P (doc)); 1160 genfun = !(NILP (doc) || VALID_DOCSTRING_P (doc));
1161 } 1161 }
@@ -1225,11 +1225,11 @@ The value, if non-nil, is a list of mode name symbols. */)
1225 { 1225 {
1226 return XSUBR (fun)->command_modes; 1226 return XSUBR (fun)->command_modes;
1227 } 1227 }
1228 else if (COMPILEDP (fun)) 1228 else if (CLOSUREP (fun))
1229 { 1229 {
1230 if (PVSIZE (fun) <= COMPILED_INTERACTIVE) 1230 if (PVSIZE (fun) <= CLOSURE_INTERACTIVE)
1231 return Qnil; 1231 return Qnil;
1232 Lisp_Object form = AREF (fun, COMPILED_INTERACTIVE); 1232 Lisp_Object form = AREF (fun, CLOSURE_INTERACTIVE);
1233 if (VECTORP (form)) 1233 if (VECTORP (form))
1234 /* New form -- the second element is the command modes. */ 1234 /* New form -- the second element is the command modes. */
1235 return AREF (form, 1); 1235 return AREF (form, 1);
@@ -2546,7 +2546,7 @@ or a byte-code object. IDX starts at 0. */)
2546 ptrdiff_t size = 0; 2546 ptrdiff_t size = 0;
2547 if (VECTORP (array)) 2547 if (VECTORP (array))
2548 size = ASIZE (array); 2548 size = ASIZE (array);
2549 else if (COMPILEDP (array) || RECORDP (array)) 2549 else if (CLOSUREP (array) || RECORDP (array))
2550 size = PVSIZE (array); 2550 size = PVSIZE (array);
2551 else 2551 else
2552 wrong_type_argument (Qarrayp, array); 2552 wrong_type_argument (Qarrayp, array);
diff --git a/src/eval.c b/src/eval.c
index c5b8a375af4..a7d860114cf 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2151,15 +2151,15 @@ then strings and vectors are not accepted. */)
2151 return Qt; 2151 return Qt;
2152 } 2152 }
2153 /* Bytecode objects are interactive if they are long enough to 2153 /* Bytecode objects are interactive if they are long enough to
2154 have an element whose index is COMPILED_INTERACTIVE, which is 2154 have an element whose index is CLOSURE_INTERACTIVE, which is
2155 where the interactive spec is stored. */ 2155 where the interactive spec is stored. */
2156 else if (COMPILEDP (fun)) 2156 else if (CLOSUREP (fun))
2157 { 2157 {
2158 if (PVSIZE (fun) > COMPILED_INTERACTIVE) 2158 if (PVSIZE (fun) > CLOSURE_INTERACTIVE)
2159 return Qt; 2159 return Qt;
2160 else if (PVSIZE (fun) > COMPILED_DOC_STRING) 2160 else if (PVSIZE (fun) > CLOSURE_DOC_STRING)
2161 { 2161 {
2162 Lisp_Object doc = AREF (fun, COMPILED_DOC_STRING); 2162 Lisp_Object doc = AREF (fun, CLOSURE_DOC_STRING);
2163 /* An invalid "docstring" is a sign that we have an OClosure. */ 2163 /* An invalid "docstring" is a sign that we have an OClosure. */
2164 genfun = !(NILP (doc) || VALID_DOCSTRING_P (doc)); 2164 genfun = !(NILP (doc) || VALID_DOCSTRING_P (doc));
2165 } 2165 }
@@ -2567,7 +2567,7 @@ eval_sub (Lisp_Object form)
2567 } 2567 }
2568 } 2568 }
2569 } 2569 }
2570 else if (COMPILEDP (fun) 2570 else if (CLOSUREP (fun)
2571 || SUBR_NATIVE_COMPILED_DYNP (fun) 2571 || SUBR_NATIVE_COMPILED_DYNP (fun)
2572 || MODULE_FUNCTIONP (fun)) 2572 || MODULE_FUNCTIONP (fun))
2573 return apply_lambda (fun, original_args, count); 2573 return apply_lambda (fun, original_args, count);
@@ -2945,7 +2945,7 @@ FUNCTIONP (Lisp_Object object)
2945 2945
2946 if (SUBRP (object)) 2946 if (SUBRP (object))
2947 return XSUBR (object)->max_args != UNEVALLED; 2947 return XSUBR (object)->max_args != UNEVALLED;
2948 else if (COMPILEDP (object) || MODULE_FUNCTIONP (object)) 2948 else if (CLOSUREP (object) || MODULE_FUNCTIONP (object))
2949 return true; 2949 return true;
2950 else if (CONSP (object)) 2950 else if (CONSP (object))
2951 { 2951 {
@@ -2967,7 +2967,7 @@ funcall_general (Lisp_Object fun, ptrdiff_t numargs, Lisp_Object *args)
2967 2967
2968 if (SUBRP (fun) && !SUBR_NATIVE_COMPILED_DYNP (fun)) 2968 if (SUBRP (fun) && !SUBR_NATIVE_COMPILED_DYNP (fun))
2969 return funcall_subr (XSUBR (fun), numargs, args); 2969 return funcall_subr (XSUBR (fun), numargs, args);
2970 else if (COMPILEDP (fun) 2970 else if (CLOSUREP (fun)
2971 || SUBR_NATIVE_COMPILED_DYNP (fun) 2971 || SUBR_NATIVE_COMPILED_DYNP (fun)
2972 || MODULE_FUNCTIONP (fun)) 2972 || MODULE_FUNCTIONP (fun))
2973 return funcall_lambda (fun, numargs, args); 2973 return funcall_lambda (fun, numargs, args);
@@ -3181,9 +3181,9 @@ funcall_lambda (Lisp_Object fun, ptrdiff_t nargs, Lisp_Object *arg_vector)
3181 else 3181 else
3182 xsignal1 (Qinvalid_function, fun); 3182 xsignal1 (Qinvalid_function, fun);
3183 } 3183 }
3184 else if (COMPILEDP (fun)) 3184 else if (CLOSUREP (fun))
3185 { 3185 {
3186 syms_left = AREF (fun, COMPILED_ARGLIST); 3186 syms_left = AREF (fun, CLOSURE_ARGLIST);
3187 /* Bytecode objects using lexical binding have an integral 3187 /* Bytecode objects using lexical binding have an integral
3188 ARGLIST slot value: pass the arguments to the byte-code 3188 ARGLIST slot value: pass the arguments to the byte-code
3189 engine directly. */ 3189 engine directly. */
@@ -3315,7 +3315,7 @@ function with `&rest' args, or `unevalled' for a special form. */)
3315 3315
3316 if (SUBRP (function)) 3316 if (SUBRP (function))
3317 result = Fsubr_arity (function); 3317 result = Fsubr_arity (function);
3318 else if (COMPILEDP (function)) 3318 else if (CLOSUREP (function))
3319 result = lambda_arity (function); 3319 result = lambda_arity (function);
3320#ifdef HAVE_MODULES 3320#ifdef HAVE_MODULES
3321 else if (MODULE_FUNCTIONP (function)) 3321 else if (MODULE_FUNCTIONP (function))
@@ -3363,9 +3363,9 @@ lambda_arity (Lisp_Object fun)
3363 else 3363 else
3364 xsignal1 (Qinvalid_function, fun); 3364 xsignal1 (Qinvalid_function, fun);
3365 } 3365 }
3366 else if (COMPILEDP (fun)) 3366 else if (CLOSUREP (fun))
3367 { 3367 {
3368 syms_left = AREF (fun, COMPILED_ARGLIST); 3368 syms_left = AREF (fun, CLOSURE_ARGLIST);
3369 if (FIXNUMP (syms_left)) 3369 if (FIXNUMP (syms_left))
3370 return get_byte_code_arity (syms_left); 3370 return get_byte_code_arity (syms_left);
3371 } 3371 }
diff --git a/src/fns.c b/src/fns.c
index db5e856d5bd..e987d64319f 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -152,7 +152,7 @@ efficient. */)
152 val = MAX_CHAR; 152 val = MAX_CHAR;
153 else if (BOOL_VECTOR_P (sequence)) 153 else if (BOOL_VECTOR_P (sequence))
154 val = bool_vector_size (sequence); 154 val = bool_vector_size (sequence);
155 else if (COMPILEDP (sequence) || RECORDP (sequence)) 155 else if (CLOSUREP (sequence) || RECORDP (sequence))
156 val = PVSIZE (sequence); 156 val = PVSIZE (sequence);
157 else 157 else
158 wrong_type_argument (Qsequencep, sequence); 158 wrong_type_argument (Qsequencep, sequence);
@@ -1054,7 +1054,7 @@ concat_to_list (ptrdiff_t nargs, Lisp_Object *args, Lisp_Object last_tail)
1054 else if (NILP (arg)) 1054 else if (NILP (arg))
1055 ; 1055 ;
1056 else if (VECTORP (arg) || STRINGP (arg) 1056 else if (VECTORP (arg) || STRINGP (arg)
1057 || BOOL_VECTOR_P (arg) || COMPILEDP (arg)) 1057 || BOOL_VECTOR_P (arg) || CLOSUREP (arg))
1058 { 1058 {
1059 ptrdiff_t arglen = XFIXNUM (Flength (arg)); 1059 ptrdiff_t arglen = XFIXNUM (Flength (arg));
1060 ptrdiff_t argindex_byte = 0; 1060 ptrdiff_t argindex_byte = 0;
@@ -1114,7 +1114,7 @@ concat_to_vector (ptrdiff_t nargs, Lisp_Object *args)
1114 { 1114 {
1115 Lisp_Object arg = args[i]; 1115 Lisp_Object arg = args[i];
1116 if (!(VECTORP (arg) || CONSP (arg) || NILP (arg) || STRINGP (arg) 1116 if (!(VECTORP (arg) || CONSP (arg) || NILP (arg) || STRINGP (arg)
1117 || BOOL_VECTOR_P (arg) || COMPILEDP (arg))) 1117 || BOOL_VECTOR_P (arg) || CLOSUREP (arg)))
1118 wrong_type_argument (Qsequencep, arg); 1118 wrong_type_argument (Qsequencep, arg);
1119 EMACS_INT len = XFIXNAT (Flength (arg)); 1119 EMACS_INT len = XFIXNAT (Flength (arg));
1120 result_len += len; 1120 result_len += len;
@@ -1170,7 +1170,7 @@ concat_to_vector (ptrdiff_t nargs, Lisp_Object *args)
1170 } 1170 }
1171 else 1171 else
1172 { 1172 {
1173 eassert (COMPILEDP (arg)); 1173 eassert (CLOSUREP (arg));
1174 ptrdiff_t size = PVSIZE (arg); 1174 ptrdiff_t size = PVSIZE (arg);
1175 memcpy (dst, XVECTOR (arg)->contents, size * sizeof *dst); 1175 memcpy (dst, XVECTOR (arg)->contents, size * sizeof *dst);
1176 dst += size; 1176 dst += size;
@@ -2949,7 +2949,7 @@ internal_equal (Lisp_Object o1, Lisp_Object o2, enum equal_kind equal_kind,
2949 if (size & PSEUDOVECTOR_FLAG) 2949 if (size & PSEUDOVECTOR_FLAG)
2950 { 2950 {
2951 if (((size & PVEC_TYPE_MASK) >> PSEUDOVECTOR_AREA_BITS) 2951 if (((size & PVEC_TYPE_MASK) >> PSEUDOVECTOR_AREA_BITS)
2952 < PVEC_COMPILED) 2952 < PVEC_CLOSURE)
2953 return false; 2953 return false;
2954 size &= PSEUDOVECTOR_SIZE_MASK; 2954 size &= PSEUDOVECTOR_SIZE_MASK;
2955 } 2955 }
@@ -3346,7 +3346,7 @@ mapcar1 (EMACS_INT leni, Lisp_Object *vals, Lisp_Object fn, Lisp_Object seq)
3346 tail = XCDR (tail); 3346 tail = XCDR (tail);
3347 } 3347 }
3348 } 3348 }
3349 else if (VECTORP (seq) || COMPILEDP (seq)) 3349 else if (VECTORP (seq) || CLOSUREP (seq))
3350 { 3350 {
3351 for (ptrdiff_t i = 0; i < leni; i++) 3351 for (ptrdiff_t i = 0; i < leni; i++)
3352 { 3352 {
@@ -5512,7 +5512,7 @@ sxhash_obj (Lisp_Object obj, int depth)
5512 case Lisp_Vectorlike: 5512 case Lisp_Vectorlike:
5513 { 5513 {
5514 enum pvec_type pvec_type = PSEUDOVECTOR_TYPE (XVECTOR (obj)); 5514 enum pvec_type pvec_type = PSEUDOVECTOR_TYPE (XVECTOR (obj));
5515 if (! (PVEC_NORMAL_VECTOR < pvec_type && pvec_type < PVEC_COMPILED)) 5515 if (! (PVEC_NORMAL_VECTOR < pvec_type && pvec_type < PVEC_CLOSURE))
5516 { 5516 {
5517 /* According to the CL HyperSpec, two arrays are equal only if 5517 /* According to the CL HyperSpec, two arrays are equal only if
5518 they are 'eq', except for strings and bit-vectors. In 5518 they are 'eq', except for strings and bit-vectors. In
diff --git a/src/lisp.h b/src/lisp.h
index 3cb4361e75e..526248dd2ba 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -1049,7 +1049,7 @@ enum pvec_type
1049 PVEC_SQLITE, 1049 PVEC_SQLITE,
1050 1050
1051 /* These should be last, for internal_equal and sxhash_obj. */ 1051 /* These should be last, for internal_equal and sxhash_obj. */
1052 PVEC_COMPILED, 1052 PVEC_CLOSURE,
1053 PVEC_CHAR_TABLE, 1053 PVEC_CHAR_TABLE,
1054 PVEC_SUB_CHAR_TABLE, 1054 PVEC_SUB_CHAR_TABLE,
1055 PVEC_RECORD, 1055 PVEC_RECORD,
@@ -3223,16 +3223,16 @@ XFLOAT_DATA (Lisp_Object f)
3223#define IEEE_FLOATING_POINT (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \ 3223#define IEEE_FLOATING_POINT (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \
3224 && FLT_MIN_EXP == -125 && FLT_MAX_EXP == 128) 3224 && FLT_MIN_EXP == -125 && FLT_MAX_EXP == 128)
3225 3225
3226/* Meanings of slots in a Lisp_Compiled: */ 3226/* Meanings of slots in a Lisp_Closure: */
3227 3227
3228enum Lisp_Compiled 3228enum Lisp_Closure
3229 { 3229 {
3230 COMPILED_ARGLIST = 0, 3230 CLOSURE_ARGLIST = 0,
3231 COMPILED_BYTECODE = 1, 3231 CLOSURE_CODE = 1,
3232 COMPILED_CONSTANTS = 2, 3232 CLOSURE_CONSTANTS = 2,
3233 COMPILED_STACK_DEPTH = 3, 3233 CLOSURE_STACK_DEPTH = 3,
3234 COMPILED_DOC_STRING = 4, 3234 CLOSURE_DOC_STRING = 4,
3235 COMPILED_INTERACTIVE = 5 3235 CLOSURE_INTERACTIVE = 5
3236 }; 3236 };
3237 3237
3238/* Flag bits in a character. These also get used in termhooks.h. 3238/* Flag bits in a character. These also get used in termhooks.h.
@@ -3307,9 +3307,9 @@ WINDOW_CONFIGURATIONP (Lisp_Object a)
3307} 3307}
3308 3308
3309INLINE bool 3309INLINE bool
3310COMPILEDP (Lisp_Object a) 3310CLOSUREP (Lisp_Object a)
3311{ 3311{
3312 return PSEUDOVECTORP (a, PVEC_COMPILED); 3312 return PSEUDOVECTORP (a, PVEC_CLOSURE);
3313} 3313}
3314 3314
3315INLINE bool 3315INLINE bool
diff --git a/src/lread.c b/src/lread.c
index 09a5589fd0c..8b614e6220e 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -3498,52 +3498,52 @@ bytecode_from_rev_list (Lisp_Object elems, Lisp_Object readcharfun)
3498 Lisp_Object *vec = XVECTOR (obj)->contents; 3498 Lisp_Object *vec = XVECTOR (obj)->contents;
3499 ptrdiff_t size = ASIZE (obj); 3499 ptrdiff_t size = ASIZE (obj);
3500 3500
3501 if (infile && size >= COMPILED_CONSTANTS) 3501 if (infile && size >= CLOSURE_CONSTANTS)
3502 { 3502 {
3503 /* Always read 'lazily-loaded' bytecode (generated by the 3503 /* Always read 'lazily-loaded' bytecode (generated by the
3504 `byte-compile-dynamic' feature prior to Emacs 30) eagerly, to 3504 `byte-compile-dynamic' feature prior to Emacs 30) eagerly, to
3505 avoid code in the fast path during execution. */ 3505 avoid code in the fast path during execution. */
3506 if (CONSP (vec[COMPILED_BYTECODE]) 3506 if (CONSP (vec[CLOSURE_CODE])
3507 && FIXNUMP (XCDR (vec[COMPILED_BYTECODE]))) 3507 && FIXNUMP (XCDR (vec[CLOSURE_CODE])))
3508 vec[COMPILED_BYTECODE] = get_lazy_string (vec[COMPILED_BYTECODE]); 3508 vec[CLOSURE_CODE] = get_lazy_string (vec[CLOSURE_CODE]);
3509 3509
3510 /* Lazily-loaded bytecode is represented by the constant slot being nil 3510 /* Lazily-loaded bytecode is represented by the constant slot being nil
3511 and the bytecode slot a (lazily loaded) string containing the 3511 and the bytecode slot a (lazily loaded) string containing the
3512 print representation of (BYTECODE . CONSTANTS). Unpack the 3512 print representation of (BYTECODE . CONSTANTS). Unpack the
3513 pieces by coerceing the string to unibyte and reading the result. */ 3513 pieces by coerceing the string to unibyte and reading the result. */
3514 if (NILP (vec[COMPILED_CONSTANTS]) && STRINGP (vec[COMPILED_BYTECODE])) 3514 if (NILP (vec[CLOSURE_CONSTANTS]) && STRINGP (vec[CLOSURE_CODE]))
3515 { 3515 {
3516 Lisp_Object enc = vec[COMPILED_BYTECODE]; 3516 Lisp_Object enc = vec[CLOSURE_CODE];
3517 Lisp_Object pair = Fread (Fcons (enc, readcharfun)); 3517 Lisp_Object pair = Fread (Fcons (enc, readcharfun));
3518 if (!CONSP (pair)) 3518 if (!CONSP (pair))
3519 invalid_syntax ("Invalid byte-code object", readcharfun); 3519 invalid_syntax ("Invalid byte-code object", readcharfun);
3520 3520
3521 vec[COMPILED_BYTECODE] = XCAR (pair); 3521 vec[CLOSURE_CODE] = XCAR (pair);
3522 vec[COMPILED_CONSTANTS] = XCDR (pair); 3522 vec[CLOSURE_CONSTANTS] = XCDR (pair);
3523 } 3523 }
3524 } 3524 }
3525 3525
3526 if (!(size >= COMPILED_STACK_DEPTH + 1 && size <= COMPILED_INTERACTIVE + 1 3526 if (!(size >= CLOSURE_STACK_DEPTH + 1 && size <= CLOSURE_INTERACTIVE + 1
3527 && (FIXNUMP (vec[COMPILED_ARGLIST]) 3527 && (FIXNUMP (vec[CLOSURE_ARGLIST])
3528 || CONSP (vec[COMPILED_ARGLIST]) 3528 || CONSP (vec[CLOSURE_ARGLIST])
3529 || NILP (vec[COMPILED_ARGLIST])) 3529 || NILP (vec[CLOSURE_ARGLIST]))
3530 && STRINGP (vec[COMPILED_BYTECODE]) 3530 && STRINGP (vec[CLOSURE_CODE])
3531 && VECTORP (vec[COMPILED_CONSTANTS]) 3531 && VECTORP (vec[CLOSURE_CONSTANTS])
3532 && FIXNATP (vec[COMPILED_STACK_DEPTH]))) 3532 && FIXNATP (vec[CLOSURE_STACK_DEPTH])))
3533 invalid_syntax ("Invalid byte-code object", readcharfun); 3533 invalid_syntax ("Invalid byte-code object", readcharfun);
3534 3534
3535 if (STRING_MULTIBYTE (vec[COMPILED_BYTECODE])) 3535 if (STRING_MULTIBYTE (vec[CLOSURE_CODE]))
3536 /* BYTESTR must have been produced by Emacs 20.2 or earlier 3536 /* BYTESTR must have been produced by Emacs 20.2 or earlier
3537 because it produced a raw 8-bit string for byte-code and 3537 because it produced a raw 8-bit string for byte-code and
3538 now such a byte-code string is loaded as multibyte with 3538 now such a byte-code string is loaded as multibyte with
3539 raw 8-bit characters converted to multibyte form. 3539 raw 8-bit characters converted to multibyte form.
3540 Convert them back to the original unibyte form. */ 3540 Convert them back to the original unibyte form. */
3541 vec[COMPILED_BYTECODE] = Fstring_as_unibyte (vec[COMPILED_BYTECODE]); 3541 vec[CLOSURE_CODE] = Fstring_as_unibyte (vec[CLOSURE_CODE]);
3542 3542
3543 /* Bytecode must be immovable. */ 3543 /* Bytecode must be immovable. */
3544 pin_string (vec[COMPILED_BYTECODE]); 3544 pin_string (vec[CLOSURE_CODE]);
3545 3545
3546 XSETPVECTYPE (XVECTOR (obj), PVEC_COMPILED); 3546 XSETPVECTYPE (XVECTOR (obj), PVEC_CLOSURE);
3547 return obj; 3547 return obj;
3548} 3548}
3549 3549
@@ -4678,7 +4678,7 @@ substitute_object_recurse (struct subst *subst, Lisp_Object subtree)
4678 if (BOOL_VECTOR_P (subtree)) 4678 if (BOOL_VECTOR_P (subtree))
4679 return subtree; /* No sub-objects anyway. */ 4679 return subtree; /* No sub-objects anyway. */
4680 else if (CHAR_TABLE_P (subtree) || SUB_CHAR_TABLE_P (subtree) 4680 else if (CHAR_TABLE_P (subtree) || SUB_CHAR_TABLE_P (subtree)
4681 || COMPILEDP (subtree) || HASH_TABLE_P (subtree) 4681 || CLOSUREP (subtree) || HASH_TABLE_P (subtree)
4682 || RECORDP (subtree)) 4682 || RECORDP (subtree))
4683 length = PVSIZE (subtree); 4683 length = PVSIZE (subtree);
4684 else if (VECTORP (subtree)) 4684 else if (VECTORP (subtree))
diff --git a/src/pdumper.c b/src/pdumper.c
index ac8bf6f31f4..2963efc56ab 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -3068,7 +3068,7 @@ dump_vectorlike (struct dump_context *ctx,
3068 error_unsupported_dump_object(ctx, lv, "font"); 3068 error_unsupported_dump_object(ctx, lv, "font");
3069 FALLTHROUGH; 3069 FALLTHROUGH;
3070 case PVEC_NORMAL_VECTOR: 3070 case PVEC_NORMAL_VECTOR:
3071 case PVEC_COMPILED: 3071 case PVEC_CLOSURE:
3072 case PVEC_CHAR_TABLE: 3072 case PVEC_CHAR_TABLE:
3073 case PVEC_SUB_CHAR_TABLE: 3073 case PVEC_SUB_CHAR_TABLE:
3074 case PVEC_RECORD: 3074 case PVEC_RECORD:
diff --git a/src/print.c b/src/print.c
index 0d867b89395..612d63b7e94 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1299,7 +1299,7 @@ print (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
1299 (STRINGP (obj) \ 1299 (STRINGP (obj) \
1300 || CONSP (obj) \ 1300 || CONSP (obj) \
1301 || (VECTORLIKEP (obj) \ 1301 || (VECTORLIKEP (obj) \
1302 && (VECTORP (obj) || COMPILEDP (obj) \ 1302 && (VECTORP (obj) || CLOSUREP (obj) \
1303 || CHAR_TABLE_P (obj) || SUB_CHAR_TABLE_P (obj) \ 1303 || CHAR_TABLE_P (obj) || SUB_CHAR_TABLE_P (obj) \
1304 || HASH_TABLE_P (obj) || FONTP (obj) \ 1304 || HASH_TABLE_P (obj) || FONTP (obj) \
1305 || RECORDP (obj))) \ 1305 || RECORDP (obj))) \
@@ -2091,7 +2091,7 @@ print_vectorlike_unreadable (Lisp_Object obj, Lisp_Object printcharfun,
2091 /* Types handled earlier. */ 2091 /* Types handled earlier. */
2092 case PVEC_NORMAL_VECTOR: 2092 case PVEC_NORMAL_VECTOR:
2093 case PVEC_RECORD: 2093 case PVEC_RECORD:
2094 case PVEC_COMPILED: 2094 case PVEC_CLOSURE:
2095 case PVEC_CHAR_TABLE: 2095 case PVEC_CHAR_TABLE:
2096 case PVEC_SUB_CHAR_TABLE: 2096 case PVEC_SUB_CHAR_TABLE:
2097 case PVEC_HASH_TABLE: 2097 case PVEC_HASH_TABLE:
@@ -2559,7 +2559,7 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
2559 print_stack_push_vector ("#s(", ")", obj, 0, PVSIZE (obj), 2559 print_stack_push_vector ("#s(", ")", obj, 0, PVSIZE (obj),
2560 printcharfun); 2560 printcharfun);
2561 goto next_obj; 2561 goto next_obj;
2562 case PVEC_COMPILED: 2562 case PVEC_CLOSURE:
2563 print_stack_push_vector ("#[", "]", obj, 0, PVSIZE (obj), 2563 print_stack_push_vector ("#[", "]", obj, 0, PVSIZE (obj),
2564 printcharfun); 2564 printcharfun);
2565 goto next_obj; 2565 goto next_obj;
diff --git a/src/profiler.c b/src/profiler.c
index 5a6a8b48f6b..ac23a97b672 100644
--- a/src/profiler.c
+++ b/src/profiler.c
@@ -170,7 +170,7 @@ trace_hash (Lisp_Object *trace, int depth)
170 { 170 {
171 Lisp_Object f = trace[i]; 171 Lisp_Object f = trace[i];
172 EMACS_UINT hash1 172 EMACS_UINT hash1
173 = (COMPILEDP (f) ? XHASH (AREF (f, COMPILED_BYTECODE)) 173 = (CLOSUREP (f) ? XHASH (AREF (f, CLOSURE_CODE))
174 : (CONSP (f) && CONSP (XCDR (f)) && BASE_EQ (Qclosure, XCAR (f))) 174 : (CONSP (f) && CONSP (XCDR (f)) && BASE_EQ (Qclosure, XCAR (f)))
175 ? XHASH (XCDR (XCDR (f))) : XHASH (f)); 175 ? XHASH (XCDR (XCDR (f))) : XHASH (f));
176 hash = sxhash_combine (hash, hash1); 176 hash = sxhash_combine (hash, hash1);
@@ -675,8 +675,8 @@ the same lambda expression, or are really unrelated function. */)
675 bool res; 675 bool res;
676 if (EQ (f1, f2)) 676 if (EQ (f1, f2))
677 res = true; 677 res = true;
678 else if (COMPILEDP (f1) && COMPILEDP (f2)) 678 else if (CLOSUREP (f1) && CLOSUREP (f2))
679 res = EQ (AREF (f1, COMPILED_BYTECODE), AREF (f2, COMPILED_BYTECODE)); 679 res = EQ (AREF (f1, CLOSURE_CODE), AREF (f2, CLOSURE_CODE));
680 else if (CONSP (f1) && CONSP (f2) && CONSP (XCDR (f1)) && CONSP (XCDR (f2)) 680 else if (CONSP (f1) && CONSP (f2) && CONSP (XCDR (f1)) && CONSP (XCDR (f2))
681 && EQ (Qclosure, XCAR (f1)) 681 && EQ (Qclosure, XCAR (f1))
682 && EQ (Qclosure, XCAR (f2))) 682 && EQ (Qclosure, XCAR (f2)))