- 29 May, 2012 1 commit
-
-
Stefan Monnier authored
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Don't re-preprocess functions from byte-compile-function-environment. * lisp/emacs-lisp/bytecomp.el (byte-compile-constp): Treat #'v as a constant. (byte-compile-close-variables): Bind byte-compile--outbuffer here... (byte-compile-from-buffer): ...rather than here. * lisp/emacs-lisp/pcase.el (pcase--expand): Accept different sets of vars in different alternative patterns. (pcase-codegen): Be more careful to preserve identity. (pcase--u1): Don't forget to mark vars as used.
-
- 26 May, 2012 1 commit
-
-
Stefan Monnier authored
* lisp/subr.el (lambda): Use declare. * lisp/emacs-lisp/lisp-mode.el (lambda): * lisp/emacs-lisp/edebug.el (lambda): Move properties to its definition. * lisp/gnus/legacy-gnus-agent.el (gnus-agent-unhook-expire-days): * lisp/gnus/gnus-demon.el (gnus-demon-init): Don't bother with type-of.
-
- 17 May, 2012 1 commit
-
-
Stefan Monnier authored
-
- 15 May, 2012 1 commit
-
-
Stefan Monnier authored
-
- 05 May, 2012 1 commit
-
-
Stefan Monnier authored
(pcase--expand, pcase-codegen, pcase--q1): Use it to reduce nesting a bit more. (pcase--split-pred): Be more clever about ruling out overlap between a predicate and some constant pattern. (pcase--q1): Use `null' instead of (eq foo nil).
-
- 05 Jan, 2012 1 commit
-
-
Glenn Morris authored
-
- 31 Dec, 2011 1 commit
-
-
Paul Eggert authored
-
- 15 Dec, 2011 1 commit
-
-
Paul Eggert authored
-
- 16 Mar, 2011 1 commit
-
-
Stefan Monnier authored
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Make it work to inline lexbind interpreted functions into lexbind code. (bytedecomp-bytes): Not a dynamic var any more. (disassemble-offset): Get the bytes via an argument instead. (byte-decompile-bytecode-1): Use push. * lisp/emacs-lisp/bytecomp.el: Remove the bytecomp- prefix now that we use lexical-binding. (byte-compile-outbuffer): Rename from bytecomp-outbuffer. * lisp/emacs-lisp/cl-macs.el (load-time-value): * lisp/emacs-lisp/cl.el (cl-compiling-file): Adjust to new name. * lisp/emacs-lisp/pcase.el (pcase-mutually-exclusive-predicates): Add byte-code-function-p. (pcase--u1): Remove left-over code from early development. Fix case of variable shadowing in guards and predicates. (pcase--u1): Add a new `let' pattern. * src/image.c (parse_image_spec): Use Ffunctionp. * src/lisp.h: Declare Ffunctionp.
-
- 06 Mar, 2011 1 commit
-
-
Stefan Monnier authored
* src/bytecode.c (exec_byte_code): Remove old lexical binding slot handling and replace it with the a integer args-desc handling. * eval.c (funcall_lambda): Adjust arglist test accordingly. * lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-signature): Handle integer arglist descriptor. (byte-compile-make-args-desc): Make integer arglist descriptor. (byte-compile-lambda): Use integer arglist descriptor to mark lexical byte-coded functions instead of an extra slot. * lisp/help-fns.el (help-add-fundoc-usage): Don't add a dummy doc. (help-split-fundoc): Return a nil doc if there was no actual doc. (help-function-arglist): Generate an arglist from an integer arg-desc. * lisp/emacs-lisp/pcase.el (pcase--memoize): Rename from pcase-memoize; Make only the key weak. (pcase): Change the key used in the memoization table, so it does not always get GC'd away. * lisp/emacs-lisp/macroexp.el (macroexpand-all-1): Slight change to the pcase pattern to generate slightly better code.
-
- 01 Mar, 2011 1 commit
-
-
Stefan Monnier authored
(Lexical Binding): New node. * doc/lispref/eval.texi (Eval): Add `eval's new `lexical' arg. * lisp/emacs-lisp/cconv.el (cconv-liftwhen): Increase threshold. (cconv-closure-convert-rec): Convert interactive spec in empty lexenv. (cconv-analyse-use): Improve unused vars warnings. (cconv-analyse-form): Analyze interactive spec in empty lexenv. * lisp/emacs-lisp/bytecomp.el (byte-compile-lambda): Always byte-compile the interactive spec in lexical-binding mode. (byte-compile-refresh-preloaded): Don't reload byte-compiler files. * lisp/custom.el (custom-initialize-default): Use defvar. (custom-declare-variable): Set the special-variable-p flag. * lisp/help-fns.el (help-make-usage): Drop leading underscores. * lisp/dired.el (dired-revert, dired-make-relative): Mark unused args. (dired-unmark-all-files): Remove unused var `query'. (dired-overwrite-confirmed): Declare. (dired-restore-desktop-buffer): Don't use dynamically scoped arg names. * lisp/mpc.el: Mark unused args. (mpc--faster-toggle): Remove unused var `songnb'. * lisp/server.el (server-kill-buffer-running): Move before first use. * lisp/minibuffer.el: Mark unused args. * src/callint.c (quotify_arg): Simplify the logic. (Fcall_interactively): Use lexical binding when evaluating the interactive spec of a lexically bound function.
-
- 28 Feb, 2011 1 commit
-
-
Juanma Barranquero authored
-
- 27 Feb, 2011 1 commit
-
-
Stefan Monnier authored
(pcase-mutually-exclusive-predicates): New var. (pcase--split-consp, pcase--split-pred): Use it. (pcase--split-equal, pcase--split-member): When splitting against a pure predicate, run it to know the outcome. (pcase--u1): Mark vars that are actually used. (pcase--q1): Avoid introducing unused vars.
-
- 18 Feb, 2011 2 commits
-
-
Stefan Monnier authored
Avoid destructuring-bind which results in poorer code.
-
Stefan Monnier authored
-
- 17 Feb, 2011 1 commit
-
-
Stefan Monnier authored
* lisp/files.el (lexical-binding): Add a safe-local-variable property. * lisp/emacs-lisp/byte-opt.el (byte-inline-lapcode): Check how many elements are added to the stack. (byte-compile-splice-in-already-compiled-code): Don't touch lexical nor byte-compile-depth now that byte-inline-lapcode does it for us. (byte-compile-inline-expand): Don't inline dynbind byte code into lexbind code, since it has to be done differently. * lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-warn): Correctly extract arglist from `closure's. (byte-compile-cl-warn): Compiler-macros are run earlier now. (byte-compile-top-level): Bind byte-compile-lexical-environment to nil, except for lambdas. (byte-compile-form): Don't run the compiler-macro expander here. (byte-compile-let): Merge with byte-compile-let*. Don't preserve-body-value if the body's value was discarded. * lisp/emacs-lisp/cconv.el (cconv--set-diff, cconv--set-diff-map) (cconv--map-diff, cconv--map-diff-elem, cconv--map-diff-set): New funs. (cconv--env-var): New constant. (cconv-closure-convert-rec): Use it and use them. Fix a typo that ended up forgetting to remove entries from lmenvs in `let'. For `lambda' use the outer `fvrs' when building the closure and don't forget to remove `vars' from the `emvrs' and `lmenvs' of the body. * lisp/emacs-lisp/cl-macs.el (cl-byte-compile-block): Disable optimization in lexbind, because it needs a different implementation. * src/bytecode.c (exec_byte_code): Fix handling of &rest. * src/eval.c (Vinternal_interpreter_environment): Remove. (syms_of_eval): Do declare Vinternal_interpreter_environment as a global lisp var, but unintern it to hide it. (Fcommandp): * src/data.c (Finteractive_form): Understand `closure's.
-
- 10 Feb, 2011 1 commit
-
-
Igor Kuzmin authored
* lisp/emacs-lisp/bytecomp.el: Use cconv. (byte-compile-file-form, byte-compile): Call cconv-closure-convert-toplevel when requested. * lisp/server.el: * lisp/mpc.el: * lisp/emacs-lisp/pcase.el: * lisp/doc-view.el: * lisp/dired.el: Use lexical-binding.
-
- 25 Jan, 2011 1 commit
-
-
Glenn Morris authored
-
- 15 Jan, 2011 1 commit
-
-
Glenn Morris authored
-
- 24 Nov, 2010 1 commit
-
-
Stefan Monnier authored
(pcase--dontcare-upats): New var. (pcase-let, pcase-let*): Generate better code. Accept the same bodies as `let'. (pcase-dolist): New macro. (pcase--trivial-upat-p): New helper function. (pcase--expand): Strip leading "(let nil" if any.
-
- 12 Nov, 2010 1 commit
-
-
Stefan Monnier authored
indentation specs.
-
- 29 Oct, 2010 1 commit
-
-
Stefan Monnier authored
(pcase-if): Add one minor optimization. (pcase-split-equal): Rename from pcase-split-eq. (pcase-split-member): Rename from pcase-split-memq. (pcase-u1): Add strings to the member optimization. Add `guard' variant of predicates. (pcase-q1): Add string patterns.
-
- 26 Sep, 2010 1 commit
-
-
Stefan Monnier authored
-
- 01 Sep, 2010 1 commit
-
-
Stefan Monnier authored
(pcase-u1): Handle the case of a lambda pred.
-
- 11 Aug, 2010 1 commit
-
-
Glenn Morris authored
-
- 10 Aug, 2010 1 commit
-
-
Stefan Monnier authored
-