aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-07-20 06:04:46 +0000
committerRichard M. Stallman1994-07-20 06:04:46 +0000
commitcffcfe6652d40b453fd86e5ba6a058934030ff14 (patch)
tree845c1d5708d45f7b4ce683db3be813b30ff4e17a
parent3c7e6b9d2a427acdcb03d63b3c19939180687b9e (diff)
downloademacs-cffcfe6652d40b453fd86e5ba6a058934030ff14.tar.gz
emacs-cffcfe6652d40b453fd86e5ba6a058934030ff14.zip
(byte-decompile-bytecode-1): Don't add pc values
if make-spliceable is non-nil. (Arg renamed from make-splicable.)
-rw-r--r--lisp/emacs-lisp/byte-opt.el13
1 files changed, 9 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index cb9f4ffab3a..8b7937b7d80 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -1094,16 +1094,21 @@
1094 1094
1095;; As byte-decompile-bytecode, but updates 1095;; As byte-decompile-bytecode, but updates
1096;; byte-compile-{constants, variables, tag-number}. 1096;; byte-compile-{constants, variables, tag-number}.
1097;; If the optional 3rd arg is true, then `return' opcodes are replaced 1097;; If MAKE-SPLICEABLE is true, then `return' opcodes are replaced
1098;; with `goto's destined for the end of the code. 1098;; with `goto's destined for the end of the code.
1099(defun byte-decompile-bytecode-1 (bytes constvec &optional make-splicable) 1099;; That is for use by the compiler.
1100;; If MAKE-SPLICEABLE is nil, we are being called for the disassembler.
1101;; In that case, we put a pc value into the list
1102;; before each insn (or its label).
1103(defun byte-decompile-bytecode-1 (bytes constvec &optional make-spliceable)
1100 (let ((length (length bytes)) 1104 (let ((length (length bytes))
1101 (ptr 0) optr tag tags op offset 1105 (ptr 0) optr tag tags op offset
1102 lap tmp 1106 lap tmp
1103 endtag 1107 endtag
1104 (retcount 0)) 1108 (retcount 0))
1105 (while (not (= ptr length)) 1109 (while (not (= ptr length))
1106 (setq lap (cons ptr lap)) 1110 (or make-spliceable
1111 (setq lap (cons ptr lap)))
1107 (setq op (aref bytes ptr) 1112 (setq op (aref bytes ptr)
1108 optr ptr 1113 optr ptr
1109 offset (disassemble-offset)) ; this does dynamic-scope magic 1114 offset (disassemble-offset)) ; this does dynamic-scope magic
@@ -1125,7 +1130,7 @@
1125 (car (setq byte-compile-variables 1130 (car (setq byte-compile-variables
1126 (cons (list tmp) 1131 (cons (list tmp)
1127 byte-compile-variables))))))) 1132 byte-compile-variables)))))))
1128 ((and make-splicable 1133 ((and make-spliceable
1129 (eq op 'byte-return)) 1134 (eq op 'byte-return))
1130 (if (= ptr (1- length)) 1135 (if (= ptr (1- length))
1131 (setq op nil) 1136 (setq op nil)