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