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