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