Amend byte-run-strip-symbol-positions so that an unexec build builds
This fixes bug #54098. * lisp/emacs-lisp/byte-run.el (byte-run--strip-list) (byte-run--strip-vector/record): New functions. These alter a list or vector/record structure only where a symbol with position gets replaced by a bare symbol. (byte-run-strip-symbol-positions): Reformulate to use the two new functions. (function-put): No longer strip positions from the second and third arguments. * lisp/emacs-lisp/bytecomp.el (byte-compile-out): Remove the senseless "stripping" of putative symbol positions from OPERAND, which is nil or a number.
This commit is contained in:
parent
2db149539b
commit
6092ee1c3f
2 changed files with 58 additions and 45 deletions
|
@ -5099,7 +5099,7 @@ binding slots have been popped."
|
|||
OP and OPERAND are as passed to `byte-compile-out'."
|
||||
(if (memq op '(byte-call byte-discardN byte-discardN-preserve-tos))
|
||||
;; For calls, OPERAND is the number of args, so we pop OPERAND + 1
|
||||
;; elements, and the push the result, for a total of -OPERAND.
|
||||
;; elements, and then push the result, for a total of -OPERAND.
|
||||
;; For discardN*, of course, we just pop OPERAND elements.
|
||||
(- operand)
|
||||
(or (aref byte-stack+-info (symbol-value op))
|
||||
|
@ -5109,7 +5109,6 @@ OP and OPERAND are as passed to `byte-compile-out'."
|
|||
(- 1 operand))))
|
||||
|
||||
(defun byte-compile-out (op &optional operand)
|
||||
(setq operand (byte-run-strip-symbol-positions operand))
|
||||
(push (cons op operand) byte-compile-output)
|
||||
(if (eq op 'byte-return)
|
||||
;; This is actually an unnecessary case, because there should be no
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue