Remove bytecomp- prefix, plus misc changes.
[emacs.git] / src / ChangeLog
blobe34cd6943213e6e72a1d20f9cd9619d447ea2028
1 2011-03-16  Stefan Monnier  <monnier@iro.umontreal.ca>
3         * image.c (parse_image_spec): Use Ffunctionp.
4         * lisp.h: Declare Ffunctionp.
6 2011-03-13  Stefan Monnier  <monnier@iro.umontreal.ca>
8         * eval.c (Ffunction): Use simpler format for closures.
9         (Fcommandp, funcall_lambda):
10         * doc.c (Fdocumentation, store_function_docstring):
11         * data.c (Finteractive_form): Adjust to new closure format.
13 2011-03-11  Stefan Monnier  <monnier@iro.umontreal.ca>
15         * eval.c (Fprog1, Fprog2): Simplify and use XCDR/XCAR.
16         (Fdefvar): Remove redundant SYMBOLP check.
17         (Ffunctionp): Don't signal an error for undefined aliases.
19 2011-03-06  Stefan Monnier  <monnier@iro.umontreal.ca>
21         * bytecode.c (exec_byte_code): Remove old lexical binding slot handling
22         and replace it with the a integer args-desc handling.
23         * eval.c (funcall_lambda): Adjust arglist test accordingly.
25 2011-03-01  Stefan Monnier  <monnier@iro.umontreal.ca>
27         * callint.c (quotify_arg): Simplify the logic.
28         (Fcall_interactively): Use lexical binding when evaluating the
29         interactive spec of a lexically bound function.
31 2011-02-25  Stefan Monnier  <monnier@iro.umontreal.ca>
33         * eval.c (Qcurry): Remove.
34         (funcall_funvec): Remove.
35         (funcall_lambda): Move new byte-code handling to reduce impact.
36         Treat all args as lexical in the case of lexbind.
37         (Fcurry): Remove.
38         * data.c (Qfunction_vector): Remove.
39         (Ffunvecp): Remove.
40         * lread.c (read1): Revert to calling make_byte_code here.
41         (read_vector): Don't call make_byte_code any more.
42         * lisp.h (enum pvec_type): Rename back to PVEC_COMPILED.
43         (XSETCOMPILED): Rename back from XSETFUNVEC.
44         (FUNVEC_SIZE): Remove.
45         (FUNVEC_COMPILED_TAG_P, FUNVEC_COMPILED_P): Remove.
46         (COMPILEDP): Rename back from FUNVECP.
47         * fns.c (Felt): Remove unexplained FUNVEC check.
48         * doc.c (Fdocumentation): Don't handle funvec.
49         * alloc.c (make_funvec, Ffunvec): Remove.
51 2011-02-21  Stefan Monnier  <monnier@iro.umontreal.ca>
53         * bytecode.c (exec_byte_code): Change stack_ref and stack_set to use
54         offsets relative to top rather than to bottom.
56         * alloc.c (Fgarbage_collect): Don't mark the byte-stack redundantly.
58 2011-02-19  Stefan Monnier  <monnier@iro.umontreal.ca>
60         * window.c (Fsave_window_excursion): Remove.  Moved to Lisp.
61         (syms_of_window): Don't defsubr it.
62         * window.h (Fsave_window_excursion): Don't declare it.
63         * bytecode.c (exec_byte_code): Inline Fsave_window_excursion.
65 2011-02-17  Stefan Monnier  <monnier@iro.umontreal.ca>
67         * eval.c (Vinternal_interpreter_environment): Remove.
68         (syms_of_eval): Do declare Vinternal_interpreter_environment as
69         a global lisp var, but unintern it to hide it.
70         (Fcommandp):
71         * data.c (Finteractive_form): Understand `closure's.
73         * bytecode.c (exec_byte_code): Fix handling of &rest.
75 2011-02-12  Stefan Monnier  <monnier@iro.umontreal.ca>
77         * bytecode.c (Bvec_ref, Bvec_set): Remove.
78         (exec_byte_code): Don't handle them.
80 2010-12-27  Stefan Monnier  <monnier@iro.umontreal.ca>
82         * eval.c (Fdefvar): Record specialness before computing initial value.
84 2010-12-15  Stefan Monnier  <monnier@iro.umontreal.ca>
86         * eval.c (Feval): Add `lexical' argument.  Adjust callers.
87         (Ffuncall, eval_sub): Avoid goto.
89 2010-12-14  Stefan Monnier  <monnier@iro.umontreal.ca>
91         Try and be more careful about propagation of lexical environment.
92         * eval.c (apply_lambda, funcall_lambda): Remove lexenv arg.
93         (Feval): Always eval in the empty environment.
94         (eval_sub): New function.  Use it for all calls to Feval that should
95         evaluate in the lexical environment of the caller.
96         Pass `closure's as is to apply_lambda.
97         (Ffuncall): Pass `closure's as is to funcall_lambda.
98         (funcall_lambda): Extract lexenv for `closure's, when applicable.
99         Also use lexical scoping for the &rest argument, if applicable.
100         * lisp.h (eval_sub): Declare.
101         * lread.c (readevalloop): Remove `evalfun' argument.
102         * print.c (Fwith_output_to_temp_buffer):
103         * data.c (Fsetq_default): Use eval_sub.
105 2010-12-13  Stefan Monnier  <monnier@iro.umontreal.ca>
107         Make the effect of (defvar foo) local.
108         * eval.c (apply_lambda): Make static.  Remove eval_flag arg.
109         (Fsetq): Don't check declared_special.
110         (Fdefun, Fdefmacro): Use Ffunction.
111         (Fdefvar): Don't set declared_special for (defvar foo).
112         (FletX): Check locally-special vars.  Only do specbind once.
113         (Flet): Check locally-special vars.
114         (Feval): Don't check declared_special.
115         (funcall_lambda): Check locally-special vars.
116         * lisp.h (apply_lambda): Remove extern declaration.
117         * lread.c (readevalloop): CSE.
119 2010-07-23  Andreas Schwab  <schwab@linux-m68k.org>
121         * eval.c (funcall_funvec): Replace bcopy by memcpy.
123 2010-06-18  Stefan Monnier  <monnier@iro.umontreal.ca>
125         * eval.c (Fspecial_variable_p): Rename from `specialp'.
127 2010-06-15  Stefan Monnier  <monnier@iro.umontreal.ca>
129         * bytecode.c (exec_byte_code):
130         * eval.c (Ffunctionp): Fix up int/Lisp_Object confusions.
132 2008-04-23  Miles Bader  <miles@gnu.org>
134         * eval.c (Ffunctionp): Return nil for special forms.
135         (Qunevalled): New variable.
136         (syms_of_eval): Initialize it.
138 2007-10-18  Miles Bader  <miles@gnu.org>
140         * eval.c (FletX): Test the type of VARLIST rather than just !NILP.
141         (Flet): Use XCAR instead of Fcar.
143 2007-10-16  Miles Bader  <miles@gnu.org>
145         * alloc.c (make_funvec, Fpurecopy): Set the pseudo-vector type.
147 2006-02-10  Miles Bader  <miles@gnu.org>
149         * eval.c (Ffunctionp): Supply new 2nd arg to Findirect_function.
151 2005-03-04  Miles Bader  <miles@gnu.org>
153         * eval.c (FletX): Update Vinterpreter_lexical_environment for each
154         variable we bind, instead of all at once like `let'.
156 2004-08-09  Miles Bader  <miles@gnu.org>
158         Changes from merging the funvec patch:
160         * eval.c (Feval, Ffuncall): Don't special-case vectors.
161         (funcall_lambda): Use FUNVEC_SIZE.
162         (Fcurry): Remove function.
164         Merge funvec patch.
166 2004-05-20  Miles Bader  <miles@gnu.org>
168         * lisp.h: Declare make_funvec and Ffunvec.
169         (enum pvec_type): Rename `PVEC_COMPILED' to `PVEC_FUNVEC'.
170         (XSETFUNVEC): Rename from `XSETCOMPILED'.
171         (FUNVEC_SIZE, FUNVEC_COMPILED_TAG_P, FUNVEC_COMPILED_P): New macros.
172         (COMPILEDP): Define in terms of funvec macros.
173         (FUNVECP, GC_FUNVECP): Rename from `COMPILEDP' & `GC_COMPILEDP'.
174         (FUNCTIONP): Use FUNVECP instead of COMPILEDP.
175         * alloc.c (make_funvec, funvec): New functions.
176         (Fmake_byte_code): Make sure the first element is a list.
178         * eval.c (Qcurry): New variable.
179         (funcall_funvec, Fcurry): New functions.
180         (syms_of_eval): Initialize them.
181         (funcall_lambda): Handle non-bytecode funvec objects by calling
182         funcall_funvec.
183         (Ffuncall, Feval): Use FUNVECP insetad of COMPILEDP.
184         * lread.c (read1): Return result of read_vector for `#[' syntax
185         directly; read_vector now does any extra work required.
186         (read_vector): Handle both funvec and byte-code objects, converting the
187         type as necessary.  `bytecodeflag' argument is now called
188         `read_funvec'.
189         * data.c (Ffunvecp): New function.
190         * doc.c (Fdocumentation): Return nil for unknown funvecs.
191         * fns.c (mapcar1, Felt, concat): Allow funvecs.
193         * eval.c (Ffunctionp): Use `funvec' operators instead of `compiled'
194         operators.
195         * alloc.c (Fmake_byte_code, Fpurecopy, mark_object): Likewise.
196         * keyboard.c (Fcommand_execute): Likewise.
197         * image.c (parse_image_spec): Likewise.
198         * fns.c (Flength, concat, internal_equal): Likewise.
199         * data.c (Faref, Ftype_of): Likewise.
200         * print.c (print_preprocess, print_object): Likewise.
202 2004-04-10  Miles Bader  <miles@gnu.org>
204         * eval.c (Fspecialp): New function.
205         (syms_of_eval): Initialize it.
207 2004-04-03  Miles Bader  <miles@gnu.org>
209         * eval.c (Feval): If a variable isn't bound lexically, fall back
210         to looking it up dynamically even if it isn't declared special.
212 2002-08-26  Miles Bader  <miles@gnu.org>
214         * bytecode.c (Fbyte_code): Fsub1 can GC, so protect it.
216 2002-06-12  Miles Bader  <miles@gnu.org>
218         Lexical binding changes to the byte-code interpreter:
220         * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, Bvec_ref, Bvec_set)
221         (BdiscardN): New constants.
222         (exec_byte_code): Rename from `Fbyte_code'.
223         Implement above new bytecodes.
224         Add ARGS-TEMPLATE, NARGS and ARGS parameters, and optionally use
225         them push initial args on the stack.
226         (Fbyte_code): New function, just call `exec_byte_code'.
227         Add additional optional arguments for `exec_byte_code'.
228         (Qand_optional, Qand_rest): New extern declarations.
229         * eval.c (Fcurry, Ffunctionp): New functions.
230         (syms_of_eval): Initialize them.
231         (funcall_lambda): Call `exec_byte_code' instead of Fbyte_code.
232         If a compiled-function object has a `push-args' slot, call the
233         byte-code interpreter without binding any arguments.
234         (Ffuncall): Add support for curried functions.
235         * lisp.h (Fbyte_code): Declare max-args as MANY.
236         (exec_byte_code): New declaration.
238         Lexical binding changes to the lisp interpreter:
240         * lisp.h (struct Lisp_Symbol): Add `declared_special' field.
241         (apply_lambda): Add new 3rd arg to decl.
242         * alloc.c (Fmake_symbol): Initialize `declared_special' field.
243         * eval.c (Vinterpreter_lexical_environment): New variable.
244         (syms_of_eval): Initialize it.
245         (Fsetq): Modify SYM's lexical binding if appropriate.
246         (Ffunction): Return a closure if within a lexical environment.
247         (Flet, FletX): Lexically bind non-defvar'd variables if inside a
248         lexical environment.
249         (Feval): Return lexical binding of variables, if they have one.
250         Pass current lexical environment to embedded lambdas.  Handle closures.
251         (Ffuncall): Pass nil lexical environment to lambdas.  Handle closures.
252         (funcall_lambda): Add new LEXENV argument, and lexically bind
253         arguments if it's non-nil.  Bind `interpreter-lexenv' if it changed.
254         (apply_lambda): Add new LEXENV argument and pass it to funcall_lambda.
255         (Fdefvaralias, Fdefvar, Fdefconst): Mark the variable as special.
256         (Qinternal_interpreter_environment, Qclosure): New constants.
257         (syms_of_eval): Initialize them.
258         (Fdefun, Fdefmacro): Use a closure if lexical binding is active.
259         * lread.c (defvar_bool, defvar_lisp_nopro, defvar_per_buffer)
260         (defvar_kboard, defvar_int): Mark the variable as special.
261         (Vlexical_binding, Qlexical_binding): New variables.
262         (syms_of_lread): Initialize them.
263         (Fload): Bind `lexically-bound' to nil unless specified otherwise
264         in the file header.
265         (lisp_file_lexically_bound_p): New function.
266         (Qinternal_interpreter_environment): New variable.
267         * doc.c (Qclosure): New extern declaration.
268         (Fdocumentation, store_function_docstring): Handle interpreted
269         closures.
271 ;; arch-tag: 7cf884aa-6b48-40cb-bfca-265a1e99b3c5