* lisp/emacs-lisp/cconv.el: New file.
[emacs.git] / lisp / ChangeLog
blobc137860013bb867db6a58d3006220fea5e135e49
1 2011-02-10  Igor Kuzmin  <kuzminig@iro.umontreal.ca>
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.
13 2010-12-27  Stefan Monnier  <monnier@iro.umontreal.ca>
15         * emacs-lisp/bytecomp.el (byte-compile-track-mouse): Don't use #'.
17 2010-12-15  Stefan Monnier  <monnier@iro.umontreal.ca>
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.
24 2010-12-14  Stefan Monnier  <monnier@iro.umontreal.ca>
26         * emacs-lisp/bytecomp.el (byte-compile-condition-case): Use push.
28 2010-12-13  Stefan Monnier  <monnier@iro.umontreal.ca>
30         * subr.el (with-lexical-binding): Remove.
32 2010-06-18  Stefan Monnier  <monnier@iro.umontreal.ca>
34         * emacs-lisp/byte-lexbind.el (byte-compile-compute-lforminfo):
35         specialp -> special-variable-p.
37 2010-06-15  Stefan Monnier  <monnier@iro.umontreal.ca>
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.
43 2010-06-14  Stefan Monnier  <monnier@iro.umontreal.ca>
45         * emacs-lisp/bytecomp.el (byte-compile-check-variable):
46         Update byte-compile-not-obsolete-var to byte-compile-not-obsolete-vars.
48         * Makefile.in (.el.elc): Increase max-lisp-eval-depth.
50 2006-12-04  Miles Bader  <miles@gnu.org>
52         * Makefile.in (COMPILE_FIRST_STACK_DEPTH): New variable.
53         (compile, compile-always): Use it.
55 2005-10-24  Miles Bader  <miles@gnu.org>
57         * subr.el (functionp): Re-remove.
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.
64 2004-08-09  Miles Bader  <miles@gnu.org>
66         Changes from merging the funvec patch:
68         * emacs-lisp/bytecomp.el (byte-compile-make-closure): Use `curry'
69         instead of `vector' to create compiled closures.
71         Merge funvec patch.
73 2004-04-29  Miles Bader  <miles@gnu.org>
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.
79         * emacs-lisp/byte-opt.el (byte-opt-update-stack-params):
80         Don't crash on no-op lapcode entries (car is nil).
82         * emacs-lisp/byte-lexbind.el (byte-compile-make-lambda-lexenv):
83         Push a lexvar onto lexenv, not a vinfo!
85 2004-04-11  Miles Bader  <miles@gnu.org>
87         * emacs-lisp/bytecomp.el (byte-compile-top-level):
88         Correctly analyze lexically-bound arguments.
90         * emacs-lisp/byte-lexbind.el (byte-compile-lforminfo-analyze):
91         Use `append' instead of `nconc'.
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.
99 2004-04-10  Miles Bader  <miles@gnu.org>
101         * emacs-lisp/byte-lexbind.el (byte-compile-compute-lforminfo):
102         Look at variable's global specialp state too.
104 2004-04-09  Miles Bader  <miles@gnu.org>
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.
111 2004-04-02  Miles Bader  <miles@gnu.org>
113         * emacs-lisp/lisp-mode.el (eval-last-sexp-1): Setup the lexical
114         environment if lexical-binding is enabled.
116 2003-10-14  Miles Bader  <miles@gnu.org>
118         * emacs-lisp/macroexp.el (macroexpand-all-1): Special-case
119         `backquote-list*' to avoid stack overflows.
121 2003-04-04  Miles Bader  <miles@gnu.org>
123         * help-fns.el (help-function-arglist): Handle interpreted closures.
125 2002-11-20  Miles Bader  <miles@gnu.org>
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.
132 2002-08-26  Miles Bader  <miles@gnu.org>
134         * international/mule.el (make-char): Macroexpand call to
135         charset-id constructed by `byte-compile' hook.
137         * emacs-lisp/macroexp.el (macroexpand-all-1): Expand defconst value.
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.
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.
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.
158         * emacs-lisp/disass.el (disassemble-1): Print arg for discardN ops.
160 2002-08-19  Miles Bader  <miles@gnu.org>
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.
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.
175 2002-08-17  Miles Bader  <miles@gnu.org>
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.
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.
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.
207 2002-06-16  Miles Bader  <miles@gnu.org>
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.
213 2002-06-14  Miles Bader  <miles@gnu.org>
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.
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'.
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.
235 2002-06-13  Miles Bader  <miles@gnu.org>
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):
257         New functions.
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.
282         * emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
283         Don't expand macros here.
285         * emacs-lisp/macroexp.el (macroexpand-all-1): Expand defmacro forms.
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.
298 2002-06-12  Miles Bader  <miles@gnu.org>
300         * emacs-lisp/byte-lexbind.el, emacs-lisp/macroexp.el: New files.
302         * subr.el (functionp): Function removed (now a subr).
303         * help-fns.el (describe-function-1): Handle interpreted closures.
305 ;; arch-tag: bd1b5b8b-fdb2-425d-9ac2-20689fb0ee70