diff options
| author | Stefan Monnier | 2024-03-24 18:32:25 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2024-04-28 11:58:05 -0400 |
| commit | 2fa839c1886acd4a7b6c25c50877534fe1d669bb (patch) | |
| tree | 9db25d761b2de896a902ccae32dc02c7a9dc56f4 /src/data.c | |
| parent | 1e931f1c3db1588ba402d0eab60f03cc036f814a (diff) | |
| download | emacs-2fa839c1886acd4a7b6c25c50877534fe1d669bb.tar.gz emacs-2fa839c1886acd4a7b6c25c50877534fe1d669bb.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.
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 22 |
1 files changed, 11 insertions, 11 deletions
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); |