mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 22:41:06 -08:00
Propagate function calls also when hiddend under funcall
* lisp/emacs-lisp/comp.el (comp-fwprop-call): Propagate functions also when called under `funcall'. * test/src/comp-tests.el (comp-tests-type-spec-tests): Add a test.
This commit is contained in:
parent
e532ec9552
commit
eafcc8eda0
2 changed files with 10 additions and 1 deletions
|
|
@ -2642,6 +2642,10 @@ Return non-nil if the function is folded successfully."
|
|||
F is the function being called with arguments ARGS.
|
||||
Fold the call in case."
|
||||
(unless (comp-function-call-maybe-fold insn f args)
|
||||
(when (and (eq 'funcall f)
|
||||
(comp-mvar-value-vld-p (car args)))
|
||||
(setf f (comp-mvar-value (car args))
|
||||
args (cdr args)))
|
||||
(when-let ((cstr-f (gethash f comp-known-func-cstr-h)))
|
||||
(let ((cstr (comp-cstr-f-ret cstr-f)))
|
||||
(setf (comp-mvar-range lval) (comp-cstr-range cstr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue