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