Commit | Line | Data |
---|---|---|
94d11cb5 IK |
1 | 2011-02-10 Igor Kuzmin <kuzminig@iro.umontreal.ca> |
2 | ||
3 | * emacs-lisp/cconv.el: New file. | |
4 | * emacs-lisp/bytecomp.el: Use cconv. | |
5 | (byte-compile-file-form, byte-compile): | |
6 | Call cconv-closure-convert-toplevel when requested. | |
7 | * server.el: | |
8 | * mpc.el: | |
9 | * emacs-lisp/pcase.el: | |
10 | * doc-view.el: | |
11 | * dired.el: Use lexical-binding. | |
12 | ||
590130fb SM |
13 | 2010-12-27 Stefan Monnier <monnier@iro.umontreal.ca> |
14 | ||
15 | * emacs-lisp/bytecomp.el (byte-compile-track-mouse): Don't use #'. | |
16 | ||
a0ee6f27 SM |
17 | 2010-12-15 Stefan Monnier <monnier@iro.umontreal.ca> |
18 | ||
19 | * emacs-lisp/edebug.el (edebug-eval-defun, edebug-eval): | |
20 | * emacs-lisp/lisp-mode.el (eval-last-sexp-1, eval-defun-1): | |
21 | * ielm.el (ielm-eval-input): | |
22 | * simple.el (eval-expression): Use new eval arg to obey lexical-binding. | |
23 | ||
defb1411 SM |
24 | 2010-12-14 Stefan Monnier <monnier@iro.umontreal.ca> |
25 | ||
26 | * emacs-lisp/bytecomp.el (byte-compile-condition-case): Use push. | |
27 | ||
f07a954e SM |
28 | 2010-12-13 Stefan Monnier <monnier@iro.umontreal.ca> |
29 | ||
30 | * subr.el (with-lexical-binding): Remove. | |
31 | ||
4a330052 SM |
32 | 2010-06-18 Stefan Monnier <monnier@iro.umontreal.ca> |
33 | ||
34 | * emacs-lisp/byte-lexbind.el (byte-compile-compute-lforminfo): | |
35 | specialp -> special-variable-p. | |
36 | ||
3c3ddb98 SM |
37 | 2010-06-15 Stefan Monnier <monnier@iro.umontreal.ca> |
38 | ||
39 | * emacs-lisp/bytecomp.el (byte-compile-initial-macro-environment): | |
40 | Don't macroexpand before evaluating in eval-and-compile, in case | |
41 | `body's macro expansion uses macros and functions defined in itself. | |
42 | ||
f43cb649 SM |
43 | 2010-06-14 Stefan Monnier <monnier@iro.umontreal.ca> |
44 | ||
45 | * emacs-lisp/bytecomp.el (byte-compile-check-variable): | |
46 | Update byte-compile-not-obsolete-var to byte-compile-not-obsolete-vars. | |
47 | ||
48 | * Makefile.in (.el.elc): Increase max-lisp-eval-depth. | |
49 | ||
894e369d | 50 | 2006-12-04 Miles Bader <miles@gnu.org> |
89877f5f | 51 | |
894e369d SM |
52 | * Makefile.in (COMPILE_FIRST_STACK_DEPTH): New variable. |
53 | (compile, compile-always): Use it. | |
133a8d82 | 54 | |
894e369d | 55 | 2005-10-24 Miles Bader <miles@gnu.org> |
89877f5f | 56 | |
894e369d | 57 | * subr.el (functionp): Re-remove. |
89877f5f | 58 | |
894e369d SM |
59 | * emacs-lisp/bytecomp.el (byte-compile-closure): Add optional |
60 | ADD-LAMBDA argument, which we just pass to `byte-compile-lambda'. | |
61 | (byte-compile-defun): Use ADD-LAMBDA arg to `byte-compile-closure' | |
62 | instead of adding lambda ourselves. | |
9d1f18b5 | 63 | |
894e369d | 64 | 2004-08-09 Miles Bader <miles@gnu.org> |
9d1f18b5 | 65 | |
894e369d | 66 | Changes from merging the funvec patch: |
b81a0b56 | 67 | |
894e369d SM |
68 | * emacs-lisp/bytecomp.el (byte-compile-make-closure): Use `curry' |
69 | instead of `vector' to create compiled closures. | |
b81a0b56 | 70 | |
894e369d | 71 | Merge funvec patch. |
b81a0b56 | 72 | |
894e369d | 73 | 2004-04-29 Miles Bader <miles@gnu.org> |
69f18acc | 74 | |
894e369d SM |
75 | * emacs-lisp/bytecomp.el (byte-compile-top-level): Add new entries |
76 | to `byte-compile-lexical-environment' at the start, not end. | |
77 | (byte-compile-delay-out): Correctly default STACK-ADJUST to zero. | |
5fee75d4 | 78 | |
894e369d SM |
79 | * emacs-lisp/byte-opt.el (byte-opt-update-stack-params): |
80 | Don't crash on no-op lapcode entries (car is nil). | |
69f18acc | 81 | |
894e369d SM |
82 | * emacs-lisp/byte-lexbind.el (byte-compile-make-lambda-lexenv): |
83 | Push a lexvar onto lexenv, not a vinfo! | |
9766adfb | 84 | |
894e369d | 85 | 2004-04-11 Miles Bader <miles@gnu.org> |
9766adfb | 86 | |
894e369d SM |
87 | * emacs-lisp/bytecomp.el (byte-compile-top-level): |
88 | Correctly analyze lexically-bound arguments. | |
9766adfb | 89 | |
894e369d SM |
90 | * emacs-lisp/byte-lexbind.el (byte-compile-lforminfo-analyze): |
91 | Use `append' instead of `nconc'. | |
56b2854f | 92 | |
894e369d SM |
93 | * emacs-lisp/byte-lexbind.el (byte-compile-make-lvarinfo): |
94 | Don't use backquote to make a mutable data-structure. | |
95 | (byte-compile-lvarinfo-num-refs, byte-compile-lvarinfo-num-sets): | |
96 | Rename to use `num-' instead of `num'. | |
97 | (byte-compile-make-lambda-lexenv): Adjust accordingly. | |
56b2854f | 98 | |
894e369d | 99 | 2004-04-10 Miles Bader <miles@gnu.org> |
6534e58a | 100 | |
894e369d SM |
101 | * emacs-lisp/byte-lexbind.el (byte-compile-compute-lforminfo): |
102 | Look at variable's global specialp state too. | |
d6ceb380 | 103 | |
894e369d | 104 | 2004-04-09 Miles Bader <miles@gnu.org> |
d6ceb380 | 105 | |
894e369d SM |
106 | * emacs-lisp/byte-opt.el (byte-optimize-lapcode): |
107 | Default initial-stack-depth to 0. | |
108 | (byte-optimize-lapcode): Discard the right number of values in | |
109 | the stack-set+discard-->discard optimization. | |
c760f19e | 110 | |
894e369d | 111 | 2004-04-02 Miles Bader <miles@gnu.org> |
2e9b968b | 112 | |
894e369d SM |
113 | * emacs-lisp/lisp-mode.el (eval-last-sexp-1): Setup the lexical |
114 | environment if lexical-binding is enabled. | |
2e9b968b | 115 | |
894e369d | 116 | 2003-10-14 Miles Bader <miles@gnu.org> |
6d00ce04 | 117 | |
894e369d SM |
118 | * emacs-lisp/macroexp.el (macroexpand-all-1): Special-case |
119 | `backquote-list*' to avoid stack overflows. | |
baf1a55e | 120 | |
894e369d | 121 | 2003-04-04 Miles Bader <miles@gnu.org> |
6ee21b07 | 122 | |
894e369d | 123 | * help-fns.el (help-function-arglist): Handle interpreted closures. |
f0dbdc25 | 124 | |
894e369d | 125 | 2002-11-20 Miles Bader <miles@gnu.org> |
f0dbdc25 | 126 | |
894e369d SM |
127 | * emacs-lisp/bytecomp.el (byte-compile-stack-adjustment): |
128 | Correctly handle discardN* operators. | |
129 | * emacs-lisp/byte-opt.el (byte-optimize-lapcode): Fix stack-depth | |
130 | tracking errors. | |
e044e4fc | 131 | |
894e369d | 132 | 2002-08-26 Miles Bader <miles@gnu.org> |
e044e4fc | 133 | |
894e369d SM |
134 | * international/mule.el (make-char): Macroexpand call to |
135 | charset-id constructed by `byte-compile' hook. | |
2e9b968b | 136 | |
894e369d | 137 | * emacs-lisp/macroexp.el (macroexpand-all-1): Expand defconst value. |
2e9b968b | 138 | |
894e369d SM |
139 | * emacs-lisp/byte-opt.el (byte-opt-update-stack-params): New macro. |
140 | (byte-optimize-lapcode): Keep track of stack-depth in final pass too. | |
141 | Add more optimizations for lexical binding. | |
142 | (byte-compile-inline-expand): Macroexpand result of inlining. | |
baf1a55e | 143 | |
894e369d SM |
144 | * emacs-lisp/bytecomp.el (byte-compile-lambda): Update call to |
145 | byte-compile-closure-initial-lexenv-p. | |
146 | (byte-discardN-preserve-tos): Alias to byte-discardN. | |
147 | (byte-compile-push-binding-init): Don't push unused variables on | |
148 | init-lexenv. | |
149 | (byte-compile-push-binding-init): Don't use LFORMINFO if it's nil. | |
150 | (byte-compile-lambda): Don't look at lexical environment unless | |
151 | we're using lexical binding. | |
152 | (byte-compile-defmacro): Correctly generate macros. | |
153 | ||
154 | * emacs-lisp/byte-lexbind.el (byte-compile-unbind): Optimize the | |
155 | dynamic-bindings-only case. | |
156 | (byte-compile-bind): Don't special-case unused lexical variables. | |
157 | ||
158 | * emacs-lisp/disass.el (disassemble-1): Print arg for discardN ops. | |
159 | ||
160 | 2002-08-19 Miles Bader <miles@gnu.org> | |
161 | ||
162 | * emacs-lisp/byte-opt.el (byte-decompile-bytecode-1): | |
163 | Handle `byte-discardN-preserve-tos' pseudo-op. | |
164 | (byte-compile-side-effect-and-error-free-ops): Add `byte-stack-ref'. | |
165 | (byte-compile-side-effect-free-ops): Add `byte-vec-ref'. | |
166 | (byte-optimize-lapcode): Add some cases for stack-set/ref ops. | |
167 | Add tracking of stack-depth. Unfinished code to collapse | |
168 | lexical-unbinding sequences. | |
169 | ||
170 | * emacs-lisp/bytecomp.el (byte-compile-lapcode): | |
171 | Handle `byte-discardN-preserve-tos' pseudo-op. | |
172 | (byte-compile-top-level): If there are lexical args, output a TAG | |
173 | op to record the initial stack-depth for the optimizer. | |
174 | ||
175 | 2002-08-17 Miles Bader <miles@gnu.org> | |
176 | ||
177 | * emacs-lisp/bytecomp.el (byte-discardN): Add byte-defop. | |
178 | (byte-compile-lapcode): Include byte-discardN. | |
179 | (byte-compile-lambda): Fixup closure detection. | |
180 | (byte-compile-top-level): Handle arguments for a lexical lambda. | |
181 | (byte-compile-lexical-variable-ref, byte-compile-variable-ref) | |
182 | (byte-compile-variable-set): Use byte-compile-stack-set/ref. | |
183 | (byte-compile-discard): Add new parameters NUM and PRESERVE-TOS. | |
184 | (byte-compile-stack-ref, byte-compile-stack-set): New functions. | |
185 | (byte-compile-push-binding-init): Get the variable list properly | |
186 | from LFORMINFO. | |
187 | ||
188 | * emacs-lisp/byte-lexbind.el (byte-compile-lforminfo-analyze): | |
189 | Ignore setq'd variables we're not interested in. | |
190 | (byte-compile-make-lambda-lexenv): Add assertion that closed-over | |
191 | variables be heap allocated. | |
192 | (byte-compile-closure-initial-lexenv-p): Rename from | |
193 | byte-compile-closure-lexenv-p. | |
194 | (byte-compile-non-stack-bindings-p): Get the variable list | |
195 | properly from LFORMINFO. | |
196 | (byte-compile-maybe-push-heap-environment): Handle the | |
197 | no-closed-over-variables case correctly. | |
198 | (byte-compile-bind): Use byte-compile-stack-set/ref. | |
199 | Don't bother modifying INIT-LEXENV as no one will see the changes. | |
200 | (byte-compile-unbind): Call `byte-compile-discard' to handle | |
201 | unbinding lexical bindings. | |
202 | ||
203 | * emacs-lisp/disass.el (disassemble-internal): Handle closures. | |
204 | (disassemble-1): Handle new bytecodes. | |
205 | * emacs-lisp/byte-opt.el (disassemble-offset): Handle new bytecodes. | |
206 | ||
207 | 2002-06-16 Miles Bader <miles@gnu.org> | |
208 | ||
209 | * emacs-lisp/macroexp.el (macroexp-accumulate): New macro. | |
210 | (macroexpand-all-forms, macroexpand-all-clauses): Use it. | |
211 | * Makefile.in (compile): Undo previous change. | |
212 | ||
213 | 2002-06-14 Miles Bader <miles@gnu.org> | |
214 | ||
215 | * Makefile.in (COMPILE_FIRST): Add `emacs-lisp/macroexp.el'. | |
216 | (compile): Add a special case that compiles `emacs-lisp/macroexp.el' | |
217 | with an increased max-lisp-eval-depth. | |
218 | ||
219 | * emacs-lisp/bytecomp.el: Provide `bytecomp-preload', at the | |
220 | beginning of the file. Require `byte-lexbind' at compile time. | |
221 | Add a few doc string. | |
222 | (byte-compile-push-bytecodes) | |
223 | (byte-compile-push-bytecode-const2): New macros. | |
224 | (byte-compile-lapcode): Use them. Do general code cleanup. | |
225 | (byte-compile-initial-macro-environment): Expand macros in | |
226 | byte-compile-eval before passing to byte-compile-top-level. | |
227 | (byte-compile): Use the `byte-compile-initial-macro-environment'. | |
228 | ||
229 | * emacs-lisp/byte-lexbind.el: Require `bytecomp-preload' instead of | |
230 | `bytecomp'. | |
231 | (byte-compile-bind): Use `byte-compile-dynamic-variable-bind' to bind | |
232 | dynamic variables. | |
233 | (byte-compile-maybe-push-heap-environment): Fix function name typo. | |
234 | ||
235 | 2002-06-13 Miles Bader <miles@gnu.org> | |
236 | ||
237 | Byte compiler lexical binding support (not finished yet): | |
238 | * emacs-lisp/bytecomp.el: Require `macroexp'. | |
239 | (byte-compile-lexical-environment) | |
240 | (byte-compile-current-heap-environment) | |
241 | (byte-compile-current-num-closures): New variables. | |
242 | (0, 178, 179, 180, 181): New byte-opcodes. | |
243 | (byte-compile-lapcode): Handle stack-ref/set opcodes. Signal an | |
244 | error if a delay-output placeholder is not filled in yet. | |
245 | (byte-compile-file-form, byte-compile): Expand all macros with | |
246 | `macroexpand-all'. | |
247 | (byte-compile-file-form-defsubst, byte-compile-form): Don't expand | |
248 | macros here. | |
249 | (byte-compile-make-lambda-lexenv): Autoload. | |
250 | (byte-compile-lambda): Initial code for handling lexically-bound | |
251 | arguments and closures; doesn't work yet. | |
252 | (byte-compile-closure-code-p, byte-compile-make-closure) | |
253 | (byte-compile-closure): New functions. | |
254 | (byte-compile-check-variable, byte-compile-dynamic-variable-op) | |
255 | (byte-compile-dynamic-variable-bind) | |
256 | (byte-compile-lexical-variable-ref, byte-compile-variable-set): | |
baf1a55e | 257 | New functions. |
894e369d SM |
258 | (byte-compile-variable-ref): Remove second argument. Now only |
259 | handles real variable references (not setting or binding). | |
260 | (byte-compile-push-unknown-constant) | |
261 | (byte-compile-resolve-unknown-constant): New functions. | |
262 | (byte-compile-funarg, byte-compile-funarg-2): Functions removed. | |
263 | (byte-compile-function-form): Use either `byte-compile-constant' | |
264 | or `byte-compile-closure'. | |
265 | (byte-compile-setq): Use `byte-compile-variable-set' instead of | |
266 | `byte-compile-variable-ref'. | |
267 | (apply, mapcar, mapatoms, mapconcat, mapc, sort): | |
268 | `byte-defop-compiler-1's removed. | |
269 | (byte-compile-while): Make sure lexically-bound variables inside | |
270 | the loop don't get stored in an environment outside the loop. | |
271 | (byte-compile-compute-lforminfo): Autoload. | |
272 | (byte-compile-push-binding-init): New function. | |
273 | (byte-compile-let, byte-compile-let*): Handle lexical binding. | |
274 | (byte-compile-defun): Use `byte-compile-closure' to do the work. | |
275 | (byte-compile-defmacro): Use `byte-compile-make-closure'. | |
276 | (byte-compile-defvar): Expand the generated call to `push' since | |
277 | we're past macroexpansion already. | |
278 | (byte-compile-stack-adjustment): New function. | |
279 | (byte-compile-out): Make second arg optional. Rewrite for clarity. | |
280 | (byte-compile-delay-out, byte-compile-delayed-out): New functions. | |
281 | ||
282 | * emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): | |
283 | Don't expand macros here. | |
284 | ||
285 | * emacs-lisp/macroexp.el (macroexpand-all-1): Expand defmacro forms. | |
286 | ||
287 | * emacs-lisp/byte-lexbind.el (byte-compile-make-lvarinfo) | |
288 | (byte-compile-lforminfo-add-var) | |
289 | (byte-compile-lforminfo-note-closure) | |
290 | (byte-compile-compute-lforminfo) | |
291 | (byte-compile-lforminfo-from-lambda) | |
292 | (byte-compile-lforminfo-analyze) | |
293 | (byte-compile-heapenv-add-accessible-env) | |
294 | (byte-compile-heapenv-ensure-access) | |
295 | (byte-compile-rearrange-let-clauses, byte-compile-bind) | |
296 | (byte-compile-unbind): Fix a bunch of typos. | |
297 | ||
298 | 2002-06-12 Miles Bader <miles@gnu.org> | |
299 | ||
300 | * emacs-lisp/byte-lexbind.el, emacs-lisp/macroexp.el: New files. | |
301 | ||
302 | * subr.el (functionp): Function removed (now a subr). | |
303 | * help-fns.el (describe-function-1): Handle interpreted closures. | |
304 | ||
305 | ;; arch-tag: bd1b5b8b-fdb2-425d-9ac2-20689fb0ee70 |