mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-29 08:31:35 -08:00
Fix miscompilation of funcall forms in some cases (bug#46974)
* lisp/emacs-lisp/comp.el (comp-call-optim-func): Call comp-cstr-imm-vld-p before relying on comp-cstr-imm to return the right value.
This commit is contained in:
parent
3848f3bff0
commit
6c73418c95
1 changed files with 4 additions and 2 deletions
|
|
@ -3282,11 +3282,13 @@ FUNCTION can be a function-name or byte compiled function."
|
|||
do (comp-loop-insn-in-block b
|
||||
(pcase insn
|
||||
(`(set ,lval (callref funcall ,f . ,rest))
|
||||
(when-let ((new-form (comp-call-optim-form-call
|
||||
(when-let ((ok (comp-cstr-imm-vld-p f))
|
||||
(new-form (comp-call-optim-form-call
|
||||
(comp-cstr-imm f) rest)))
|
||||
(setf insn `(set ,lval ,new-form))))
|
||||
(`(callref funcall ,f . ,rest)
|
||||
(when-let ((new-form (comp-call-optim-form-call
|
||||
(when-let ((ok (comp-cstr-imm-vld-p f))
|
||||
(new-form (comp-call-optim-form-call
|
||||
(comp-cstr-imm f) rest)))
|
||||
(setf insn new-form)))))))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue