Commit | Line | Data |
---|---|---|
ca105506 SM |
1 | 2011-03-16 Stefan Monnier <monnier@iro.umontreal.ca> |
2 | ||
3 | * image.c (parse_image_spec): Use Ffunctionp. | |
4 | * lisp.h: Declare Ffunctionp. | |
5 | ||
23aba0ea SM |
6 | 2011-03-13 Stefan Monnier <monnier@iro.umontreal.ca> |
7 | ||
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. | |
12 | ||
ba83908c SM |
13 | 2011-03-11 Stefan Monnier <monnier@iro.umontreal.ca> |
14 | ||
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. | |
18 | ||
e2abe5a1 SM |
19 | 2011-03-06 Stefan Monnier <monnier@iro.umontreal.ca> |
20 | ||
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. | |
24 | ||
d032d5e7 SM |
25 | 2011-03-01 Stefan Monnier <monnier@iro.umontreal.ca> |
26 | ||
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. | |
30 | ||
876c194c SM |
31 | 2011-02-25 Stefan Monnier <monnier@iro.umontreal.ca> |
32 | ||
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. | |
50 | ||
3e21b6a7 SM |
51 | 2011-02-21 Stefan Monnier <monnier@iro.umontreal.ca> |
52 | ||
53 | * bytecode.c (exec_byte_code): Change stack_ref and stack_set to use | |
54 | offsets relative to top rather than to bottom. | |
55 | ||
56 | * alloc.c (Fgarbage_collect): Don't mark the byte-stack redundantly. | |
57 | ||
e0f57e65 SM |
58 | 2011-02-19 Stefan Monnier <monnier@iro.umontreal.ca> |
59 | ||
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. | |
64 | ||
b38b1ec0 SM |
65 | 2011-02-17 Stefan Monnier <monnier@iro.umontreal.ca> |
66 | ||
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. | |
72 | ||
73 | * bytecode.c (exec_byte_code): Fix handling of &rest. | |
74 | ||
ce5b520a SM |
75 | 2011-02-12 Stefan Monnier <monnier@iro.umontreal.ca> |
76 | ||
77 | * bytecode.c (Bvec_ref, Bvec_set): Remove. | |
78 | (exec_byte_code): Don't handle them. | |
79 | ||
590130fb SM |
80 | 2010-12-27 Stefan Monnier <monnier@iro.umontreal.ca> |
81 | ||
82 | * eval.c (Fdefvar): Record specialness before computing initial value. | |
83 | ||
a0ee6f27 SM |
84 | 2010-12-15 Stefan Monnier <monnier@iro.umontreal.ca> |
85 | ||
86 | * eval.c (Feval): Add `lexical' argument. Adjust callers. | |
87 | (Ffuncall, eval_sub): Avoid goto. | |
88 | ||
defb1411 SM |
89 | 2010-12-14 Stefan Monnier <monnier@iro.umontreal.ca> |
90 | ||
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. | |
104 | ||
f07a954e SM |
105 | 2010-12-13 Stefan Monnier <monnier@iro.umontreal.ca> |
106 | ||
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. | |
118 | ||
0bfdb86f AS |
119 | 2010-07-23 Andreas Schwab <schwab@linux-m68k.org> |
120 | ||
121 | * eval.c (funcall_funvec): Replace bcopy by memcpy. | |
122 | ||
4a330052 SM |
123 | 2010-06-18 Stefan Monnier <monnier@iro.umontreal.ca> |
124 | ||
125 | * eval.c (Fspecial_variable_p): Rename from `specialp'. | |
126 | ||
3c3ddb98 SM |
127 | 2010-06-15 Stefan Monnier <monnier@iro.umontreal.ca> |
128 | ||
129 | * bytecode.c (exec_byte_code): | |
130 | * eval.c (Ffunctionp): Fix up int/Lisp_Object confusions. | |
131 | ||
894e369d | 132 | 2008-04-23 Miles Bader <miles@gnu.org> |
6e6e5760 | 133 | |
894e369d SM |
134 | * eval.c (Ffunctionp): Return nil for special forms. |
135 | (Qunevalled): New variable. | |
aac0c6e3 MR |
136 | (syms_of_eval): Initialize it. |
137 | ||
894e369d | 138 | 2007-10-18 Miles Bader <miles@gnu.org> |
aac0c6e3 | 139 | |
894e369d SM |
140 | * eval.c (FletX): Test the type of VARLIST rather than just !NILP. |
141 | (Flet): Use XCAR instead of Fcar. | |
aac0c6e3 | 142 | |
894e369d | 143 | 2007-10-16 Miles Bader <miles@gnu.org> |
aac0c6e3 | 144 | |
894e369d | 145 | * alloc.c (make_funvec, Fpurecopy): Set the pseudo-vector type. |
aac0c6e3 | 146 | |
894e369d | 147 | 2006-02-10 Miles Bader <miles@gnu.org> |
aac0c6e3 | 148 | |
894e369d | 149 | * eval.c (Ffunctionp): Supply new 2nd arg to Findirect_function. |
aac0c6e3 | 150 | |
894e369d | 151 | 2005-03-04 Miles Bader <miles@gnu.org> |
aac0c6e3 | 152 | |
894e369d SM |
153 | * eval.c (FletX): Update Vinterpreter_lexical_environment for each |
154 | variable we bind, instead of all at once like `let'. | |
aac0c6e3 | 155 | |
894e369d | 156 | 2004-08-09 Miles Bader <miles@gnu.org> |
aac0c6e3 | 157 | |
894e369d | 158 | Changes from merging the funvec patch: |
aac0c6e3 | 159 | |
894e369d SM |
160 | * eval.c (Feval, Ffuncall): Don't special-case vectors. |
161 | (funcall_lambda): Use FUNVEC_SIZE. | |
162 | (Fcurry): Remove function. | |
aac0c6e3 | 163 | |
894e369d | 164 | Merge funvec patch. |
aac0c6e3 | 165 | |
876c194c SM |
166 | 2004-05-20 Miles Bader <miles@gnu.org> |
167 | ||
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. | |
177 | ||
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. | |
192 | ||
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. | |
201 | ||
894e369d | 202 | 2004-04-10 Miles Bader <miles@gnu.org> |
aac0c6e3 | 203 | |
894e369d SM |
204 | * eval.c (Fspecialp): New function. |
205 | (syms_of_eval): Initialize it. | |
aac0c6e3 | 206 | |
894e369d | 207 | 2004-04-03 Miles Bader <miles@gnu.org> |
aac0c6e3 | 208 | |
894e369d SM |
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. | |
aac0c6e3 | 211 | |
894e369d | 212 | 2002-08-26 Miles Bader <miles@gnu.org> |
aac0c6e3 | 213 | |
894e369d | 214 | * bytecode.c (Fbyte_code): Fsub1 can GC, so protect it. |
aac0c6e3 | 215 | |
894e369d | 216 | 2002-06-12 Miles Bader <miles@gnu.org> |
aac0c6e3 | 217 | |
894e369d | 218 | Lexical binding changes to the byte-code interpreter: |
aac0c6e3 | 219 | |
894e369d SM |
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. | |
aac0c6e3 | 237 | |
894e369d | 238 | Lexical binding changes to the lisp interpreter: |
aac0c6e3 | 239 | |
894e369d SM |
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. | |
270 | ||
271 | ;; arch-tag: 7cf884aa-6b48-40cb-bfca-265a1e99b3c5 |