A supplementary commit to that on 2022-04-18:
* lisp/emacs-lisp/bytecomp.el (byte-compile--first-symbol-with-pos): Handle
vectors and records correctly.
* lisp/emacs-lisp/byte-run.el (byte-run--ssp-seen): Correct the doc string.
(defvar byte-run--ssp-seen nil
"Which conses/vectors/records have been processed in strip-symbol-positions?
-The value is a hash table, the key being the old element and the value being
-the corresponding new element of the same type.
+The value is a hash table, the keys being the elements and the values being t.
The purpose of this is to detect circular structures.")
(and (symbolp (setq sym (byte-compile--first-symbol-with-pos (cdr form))))
sym)
0))
- ((and (vectorp form)
+ ((and (or (vectorp form) (recordp form))
(> (length form) 0))
(let ((i 0)
(len (length form))
elt)
(catch 'sym
(while (< i len)
- (when (symbolp
+ (when (symbol-with-pos-p
(setq elt (byte-compile--first-symbol-with-pos (aref form i))))
(throw 'sym elt))
(setq i (1+ i)))