diff options
| author | Stefan Monnier | 2011-02-24 22:27:45 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2011-02-24 22:27:45 -0500 |
| commit | 876c194cbac17a6220dbf406b0a602325978011c (patch) | |
| tree | f76a686c53e547a24039d9de2deaf68598e75518 /src/data.c | |
| parent | cb9336bd977d3345b86234c36d45228f7fb27eec (diff) | |
| download | emacs-876c194cbac17a6220dbf406b0a602325978011c.tar.gz emacs-876c194cbac17a6220dbf406b0a602325978011c.zip | |
Get rid of funvec.
* lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode): Handle new form of
`byte-constant'.
(byte-compile-close-variables, displaying-byte-compile-warnings):
Add edebug spec.
(byte-compile-toplevel-file-form): New fun, split out of
byte-compile-file-form.
(byte-compile-from-buffer): Use it to avoid applying cconv
multiple times.
(byte-compile): Only strip `function' if it's present.
(byte-compile-lambda): Add `reserved-csts' argument.
Use new lexenv arg of byte-compile-top-level.
(byte-compile-reserved-constants): New var.
(byte-compile-constants-vector): Obey it.
(byte-compile-constants-vector): Handle new `byte-constant' form.
(byte-compile-top-level): Add args `lexenv' and `reserved-csts'.
(byte-compile-form): Don't check callargs here.
(byte-compile-normal-call): Do it here instead.
(byte-compile-push-unknown-constant)
(byte-compile-resolve-unknown-constant): Remove, unused.
(byte-compile-make-closure): Use `make-byte-code' rather than `curry',
putting the environment into the "constant" pool.
(byte-compile-get-closed-var): Use special byte-constant.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Handle new
intermediate special form `internal-make-vector'.
(byte-optimize-lapcode): Handle new form of `byte-constant'.
* lisp/help-fns.el (describe-function-1): Don't handle funvecs.
* lisp/emacs-lisp/macroexp.el (macroexpand-all-1): Only convert quote to
function if the content is a lambda expression, not if it's a closure.
* emacs-lisp/eieio-come.el: Remove.
* lisp/emacs-lisp/eieio.el: Don't require eieio-comp.
(defmethod): Do a bit more work to find the body and wrap it into
a function before passing it to eieio-defmethod.
(eieio-defmethod): New arg `code' for it.
* lisp/emacs-lisp/debug.el (debugger-setup-buffer): Don't hide things in
debugger backtrace.
* lisp/emacs-lisp/cl-extra.el (cl-macroexpand-all): Use backquotes, and be
more careful when quoting a function value.
* lisp/emacs-lisp/cconv.el (cconv-freevars): Accept defvar/defconst.
(cconv-closure-convert-rec): Catch stray `internal-make-closure'.
* lisp/Makefile.in (COMPILE_FIRST): Compile pcase and cconv early.
* src/eval.c (Qcurry): Remove.
(funcall_funvec): Remove.
(funcall_lambda): Move new byte-code handling to reduce impact.
Treat all args as lexical in the case of lexbind.
(Fcurry): Remove.
* src/data.c (Qfunction_vector): Remove.
(Ffunvecp): Remove.
* src/lread.c (read1): Revert to calling make_byte_code here.
(read_vector): Don't call make_byte_code any more.
* src/lisp.h (enum pvec_type): Rename back to PVEC_COMPILED.
(XSETCOMPILED): Rename back from XSETFUNVEC.
(FUNVEC_SIZE): Remove.
(FUNVEC_COMPILED_TAG_P, FUNVEC_COMPILED_P): Remove.
(COMPILEDP): Rename back from FUNVECP.
* src/fns.c (Felt): Remove unexplained FUNVEC check.
* src/doc.c (Fdocumentation): Don't handle funvec.
* src/alloc.c (make_funvec, Ffunvec): Remove.
* doc/lispref/vol2.texi (Top):
* doc/lispref/vol1.texi (Top):
* doc/lispref/objects.texi (Programming Types, Funvec Type, Type Predicates):
* doc/lispref/functions.texi (Functions, What Is a Function, FunctionCurrying):
* doc/lispref/elisp.texi (Top): Remove mentions of funvec and curry.
Diffstat (limited to 'src/data.c')
| -rw-r--r-- | src/data.c | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/src/data.c b/src/data.c index ecedba24101..186e9cb9859 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -84,7 +84,7 @@ static Lisp_Object Qsymbol, Qstring, Qcons, Qmarker, Qoverlay; | |||
| 84 | Lisp_Object Qwindow; | 84 | Lisp_Object Qwindow; |
| 85 | static Lisp_Object Qfloat, Qwindow_configuration; | 85 | static Lisp_Object Qfloat, Qwindow_configuration; |
| 86 | Lisp_Object Qprocess; | 86 | Lisp_Object Qprocess; |
| 87 | static Lisp_Object Qcompiled_function, Qfunction_vector, Qbuffer, Qframe, Qvector; | 87 | static Lisp_Object Qcompiled_function, Qbuffer, Qframe, Qvector; |
| 88 | static Lisp_Object Qchar_table, Qbool_vector, Qhash_table; | 88 | static Lisp_Object Qchar_table, Qbool_vector, Qhash_table; |
| 89 | static Lisp_Object Qsubrp, Qmany, Qunevalled; | 89 | static Lisp_Object Qsubrp, Qmany, Qunevalled; |
| 90 | Lisp_Object Qfont_spec, Qfont_entity, Qfont_object; | 90 | Lisp_Object Qfont_spec, Qfont_entity, Qfont_object; |
| @@ -194,11 +194,8 @@ for example, (type-of 1) returns `integer'. */) | |||
| 194 | return Qwindow; | 194 | return Qwindow; |
| 195 | if (SUBRP (object)) | 195 | if (SUBRP (object)) |
| 196 | return Qsubr; | 196 | return Qsubr; |
| 197 | if (FUNVECP (object)) | 197 | if (COMPILEDP (object)) |
| 198 | if (FUNVEC_COMPILED_P (object)) | 198 | return Qcompiled_function; |
| 199 | return Qcompiled_function; | ||
| 200 | else | ||
| 201 | return Qfunction_vector; | ||
| 202 | if (BUFFERP (object)) | 199 | if (BUFFERP (object)) |
| 203 | return Qbuffer; | 200 | return Qbuffer; |
| 204 | if (CHAR_TABLE_P (object)) | 201 | if (CHAR_TABLE_P (object)) |
| @@ -397,13 +394,6 @@ DEFUN ("byte-code-function-p", Fbyte_code_function_p, Sbyte_code_function_p, | |||
| 397 | return Qnil; | 394 | return Qnil; |
| 398 | } | 395 | } |
| 399 | 396 | ||
| 400 | DEFUN ("funvecp", Ffunvecp, Sfunvecp, 1, 1, 0, | ||
| 401 | doc: /* Return t if OBJECT is a `function vector' object. */) | ||
| 402 | (Lisp_Object object) | ||
| 403 | { | ||
| 404 | return FUNVECP (object) ? Qt : Qnil; | ||
| 405 | } | ||
| 406 | |||
| 407 | DEFUN ("char-or-string-p", Fchar_or_string_p, Schar_or_string_p, 1, 1, 0, | 397 | DEFUN ("char-or-string-p", Fchar_or_string_p, Schar_or_string_p, 1, 1, 0, |
| 408 | doc: /* Return t if OBJECT is a character or a string. */) | 398 | doc: /* Return t if OBJECT is a character or a string. */) |
| 409 | (register Lisp_Object object) | 399 | (register Lisp_Object object) |
| @@ -2113,9 +2103,9 @@ or a byte-code object. IDX starts at 0. */) | |||
| 2113 | { | 2103 | { |
| 2114 | int size = 0; | 2104 | int size = 0; |
| 2115 | if (VECTORP (array)) | 2105 | if (VECTORP (array)) |
| 2116 | size = ASIZE (array); | 2106 | size = XVECTOR (array)->size; |
| 2117 | else if (FUNVECP (array)) | 2107 | else if (COMPILEDP (array)) |
| 2118 | size = FUNVEC_SIZE (array); | 2108 | size = XVECTOR (array)->size & PSEUDOVECTOR_SIZE_MASK; |
| 2119 | else | 2109 | else |
| 2120 | wrong_type_argument (Qarrayp, array); | 2110 | wrong_type_argument (Qarrayp, array); |
| 2121 | 2111 | ||
| @@ -3180,7 +3170,6 @@ syms_of_data (void) | |||
| 3180 | Qwindow = intern_c_string ("window"); | 3170 | Qwindow = intern_c_string ("window"); |
| 3181 | /* Qsubr = intern_c_string ("subr"); */ | 3171 | /* Qsubr = intern_c_string ("subr"); */ |
| 3182 | Qcompiled_function = intern_c_string ("compiled-function"); | 3172 | Qcompiled_function = intern_c_string ("compiled-function"); |
| 3183 | Qfunction_vector = intern_c_string ("function-vector"); | ||
| 3184 | Qbuffer = intern_c_string ("buffer"); | 3173 | Qbuffer = intern_c_string ("buffer"); |
| 3185 | Qframe = intern_c_string ("frame"); | 3174 | Qframe = intern_c_string ("frame"); |
| 3186 | Qvector = intern_c_string ("vector"); | 3175 | Qvector = intern_c_string ("vector"); |
| @@ -3206,7 +3195,6 @@ syms_of_data (void) | |||
| 3206 | staticpro (&Qwindow); | 3195 | staticpro (&Qwindow); |
| 3207 | /* staticpro (&Qsubr); */ | 3196 | /* staticpro (&Qsubr); */ |
| 3208 | staticpro (&Qcompiled_function); | 3197 | staticpro (&Qcompiled_function); |
| 3209 | staticpro (&Qfunction_vector); | ||
| 3210 | staticpro (&Qbuffer); | 3198 | staticpro (&Qbuffer); |
| 3211 | staticpro (&Qframe); | 3199 | staticpro (&Qframe); |
| 3212 | staticpro (&Qvector); | 3200 | staticpro (&Qvector); |
| @@ -3243,7 +3231,6 @@ syms_of_data (void) | |||
| 3243 | defsubr (&Smarkerp); | 3231 | defsubr (&Smarkerp); |
| 3244 | defsubr (&Ssubrp); | 3232 | defsubr (&Ssubrp); |
| 3245 | defsubr (&Sbyte_code_function_p); | 3233 | defsubr (&Sbyte_code_function_p); |
| 3246 | defsubr (&Sfunvecp); | ||
| 3247 | defsubr (&Schar_or_string_p); | 3234 | defsubr (&Schar_or_string_p); |
| 3248 | defsubr (&Scar); | 3235 | defsubr (&Scar); |
| 3249 | defsubr (&Scdr); | 3236 | defsubr (&Scdr); |