]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/comp.el (comp-fwprop-call): Extend to understand `record'
authorAndrea Corallo <akrl@sdf.org>
Wed, 24 Aug 2022 16:41:19 +0000 (18:41 +0200)
committerAndrea Corallo <akrl@sdf.org>
Tue, 23 May 2023 14:39:05 +0000 (16:39 +0200)
lisp/emacs-lisp/comp.el

index 2e07b0b0e6080cb2b3fc518137c75142835e63ef..289c5bf2ac41c582fd765c12295c5392c8c0ce5c 100644 (file)
@@ -3198,7 +3198,11 @@ Fold the call in case."
       (+ (comp-cstr-add lval args))
       (- (comp-cstr-sub lval args))
       (1+ (comp-cstr-add lval `(,(car args) ,comp-cstr-one)))
-      (1- (comp-cstr-sub lval `(,(car args) ,comp-cstr-one))))))
+      (1- (comp-cstr-sub lval `(,(car args) ,comp-cstr-one)))
+      (record (when (comp-cstr-imm-vld-p (car args))
+                (comp-cstr-shallow-copy lval
+                                        (comp-type-spec-to-cstr
+                                         (comp-cstr-imm (car args)))))))))
 
 (defun comp-fwprop-insn (insn)
   "Propagate within INSN."