* 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.
* 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.
(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.
* 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.
(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.
(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.