summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/comp.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 8a6e761fe40..134b5a28086 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -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)))))))