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