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