emacs/test/lisp/emacs-lisp/bytecomp-resources
Mattias Engdegård 6825e5686a Normalise setq during macro-expansion
Early normalisation of setq during macroexpand-all allows later
stages, cconv, byte-opt and codegen, to be simplified and duplicated
checks to be eliminated.

* lisp/emacs-lisp/macroexp.el (macroexp--expand-all):
Normalise all setq forms to a sequence of (setq VAR EXPR).
Emit warnings if necessary.
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyze-form):
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
* lisp/emacs-lisp/bytecomp.el (byte-compile-setq):
Simplify.
* test/lisp/emacs-lisp/bytecomp-tests.el: Adapt and add tests.
* test/lisp/emacs-lisp/bytecomp-resources/warn-variable-setq-nonvariable.el;
* test/lisp/emacs-lisp/bytecomp-resources/warn-variable-setq-odd.el:
New files.
2022-06-14 20:19:59 +02:00
..
bc-test-alpha.el Don't propagate lexical variables into inlined functions 2021-05-27 14:16:17 +02:00
bc-test-beta.el Don't propagate lexical variables into inlined functions 2021-05-27 14:16:17 +02:00
error-lexical-var-with-add-hook.el Fix byte-compiler warning for failed uses of lexical vars 2020-12-01 13:35:03 +01:00
error-lexical-var-with-remove-hook.el Fix byte-compiler warning for failed uses of lexical vars 2020-12-01 13:35:03 +01:00
error-lexical-var-with-run-hook-with-args-until-failure.el Fix byte-compiler warning for failed uses of lexical vars 2020-12-01 13:35:03 +01:00
error-lexical-var-with-run-hook-with-args-until-success.el Fix byte-compiler warning for failed uses of lexical vars 2020-12-01 13:35:03 +01:00
error-lexical-var-with-run-hook-with-args.el Fix byte-compiler warning for failed uses of lexical vars 2020-12-01 13:35:03 +01:00
error-lexical-var-with-symbol-value.el Fix byte-compiler warning for failed uses of lexical vars 2020-12-01 13:35:03 +01:00
foo-inlinable.el Fix spurious "Lexical argument shadows the dynamic variable" due to inlining 2021-01-21 13:15:05 -05:00
nowarn-inline-after-defvar.el Fix spurious "Lexical argument shadows the dynamic variable" due to inlining 2021-01-21 13:15:05 -05:00
warn-autoload-not-on-top-level.el Add tests for several byte-compiler warnings 2020-12-03 17:08:28 +01:00
warn-callargs-defsubst.el Warn about arity errors in inlining calls (bug#12299) 2021-07-23 15:19:01 +02:00
warn-callargs.el Add tests for several byte-compiler warnings 2020-12-03 17:08:28 +01:00
warn-defcustom-nogroup.el Add tests for several byte-compiler warnings 2020-12-03 17:08:28 +01:00
warn-defcustom-notype.el Add tests for several byte-compiler warnings 2020-12-03 17:08:28 +01:00
warn-defvar-lacks-prefix.el Add tests for several byte-compiler warnings 2020-12-03 17:08:28 +01:00
warn-format.el Add tests for several byte-compiler warnings 2020-12-03 17:08:28 +01:00
warn-free-setq.el
warn-free-variable-reference.el
warn-interactive-only.el
warn-lambda-malformed-interactive-spec.el Add tests for several byte-compiler warnings 2020-12-03 17:08:28 +01:00
warn-make-variable-buffer-local.el Add tests for several byte-compiler warnings 2020-12-03 17:08:28 +01:00
warn-obsolete-defun.el
warn-obsolete-hook.el
warn-obsolete-variable-bound.el Fix obsolete variable warnings about class names 2021-01-06 10:51:28 +01:00
warn-obsolete-variable-same-file.el
warn-obsolete-variable.el
warn-redefine-defun-as-macro.el Add tests for several byte-compiler warnings 2020-12-03 17:08:28 +01:00
warn-redefine-defun.el Add tests for several byte-compiler warnings 2020-12-03 17:08:28 +01:00
warn-redefine-macro-as-defun.el Add tests for several byte-compiler warnings 2020-12-03 17:08:28 +01:00
warn-save-excursion.el Add tests for several byte-compiler warnings 2020-12-03 17:08:28 +01:00
warn-variable-let-bind-constant.el Add tests for several byte-compiler warnings 2020-12-03 17:08:28 +01:00
warn-variable-let-bind-nonvariable.el Add tests for several byte-compiler warnings 2020-12-03 17:08:28 +01:00
warn-variable-set-constant.el Add tests for several byte-compiler warnings 2020-12-03 17:08:28 +01:00
warn-variable-set-nonvariable.el Add tests for several byte-compiler warnings 2020-12-03 17:08:28 +01:00
warn-variable-setq-nonvariable.el Normalise setq during macro-expansion 2022-06-14 20:19:59 +02:00
warn-variable-setq-odd.el Normalise setq during macro-expansion 2022-06-14 20:19:59 +02:00
warn-wide-docstring-autoload.el Make byte-compiler warn about wide docstrings 2020-12-28 06:26:52 +01:00
warn-wide-docstring-custom-declare-variable.el Make byte-compiler warn about wide docstrings 2020-12-28 06:26:52 +01:00
warn-wide-docstring-defalias.el Make byte-compiler warn about wide docstrings 2020-12-28 06:26:52 +01:00
warn-wide-docstring-defconst.el Make byte-compiler warn about wide docstrings 2020-12-28 06:26:52 +01:00
warn-wide-docstring-define-abbrev-table.el Make byte-compiler warn about wide docstrings 2020-12-28 06:26:52 +01:00
warn-wide-docstring-define-obsolete-function-alias.el Make byte-compiler warn about wide docstrings 2020-12-28 06:26:52 +01:00
warn-wide-docstring-define-obsolete-variable-alias.el Make byte-compiler warn about wide docstrings 2020-12-28 06:26:52 +01:00
warn-wide-docstring-defun.el Make byte-compiler warn about wide docstrings 2020-12-28 06:26:52 +01:00
warn-wide-docstring-defvar.el Make byte-compiler warn about wide docstrings 2020-12-28 06:26:52 +01:00
warn-wide-docstring-defvaralias.el Make byte-compiler warn about wide docstrings 2020-12-28 06:26:52 +01:00
warn-wide-docstring-ignore-fill-column.el Make byte-compiler warn about wide docstrings 2020-12-28 06:26:52 +01:00
warn-wide-docstring-ignore-override.el Make byte-compiler warn about wide docstrings 2020-12-28 06:26:52 +01:00
warn-wide-docstring-ignore-substitutions.el Avoid false positives about wide docstrings for key sequences 2021-11-22 12:04:19 +01:00
warn-wide-docstring-ignore.el Make byte-compiler warn about wide docstrings 2020-12-28 06:26:52 +01:00
warn-wide-docstring-multiline-first.el Make byte-compiler warn about wide docstrings 2020-12-28 06:26:52 +01:00
warn-wide-docstring-multiline.el Make byte-compiler warn about wide docstrings 2020-12-28 06:26:52 +01:00