[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp 6c73418: Fix miscompilation of funcall forms in some
From: |
Pip Cet |
Subject: |
feature/native-comp 6c73418: Fix miscompilation of funcall forms in some cases (bug#46974) |
Date: |
Sat, 6 Mar 2021 16:07:50 -0500 (EST) |
branch: feature/native-comp
commit 6c73418c95ae5aca7e63d8d5703a90e178350527
Author: Pip Cet <pipcet@gmail.com>
Commit: Pip Cet <pipcet@gmail.com>
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.
---
lisp/emacs-lisp/comp.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 8a6e761..134b5a2 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)))))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- feature/native-comp 6c73418: Fix miscompilation of funcall forms in some cases (bug#46974),
Pip Cet <=