summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-07-20 06:04:46 +0000
committerRichard M. Stallman <rms@gnu.org>1994-07-20 06:04:46 +0000
commitcffcfe6652d40b453fd86e5ba6a058934030ff14 (patch)
tree845c1d5708d45f7b4ce683db3be813b30ff4e17a /lisp/emacs-lisp
parent3c7e6b9d2a427acdcb03d63b3c19939180687b9e (diff)
downloademacs-cffcfe6652d40b453fd86e5ba6a058934030ff14.tar.gz
emacs-cffcfe6652d40b453fd86e5ba6a058934030ff14.tar.bz2
emacs-cffcfe6652d40b453fd86e5ba6a058934030ff14.zip
(byte-decompile-bytecode-1): Don't add pc values
if make-spliceable is non-nil. (Arg renamed from make-splicable.)
Diffstat (limited to 'lisp/emacs-lisp')
-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 @@
;; As byte-decompile-bytecode, but updates
;; byte-compile-{constants, variables, tag-number}.
-;; If the optional 3rd arg is true, then `return' opcodes are replaced
+;; If MAKE-SPLICEABLE is true, then `return' opcodes are replaced
;; with `goto's destined for the end of the code.
-(defun byte-decompile-bytecode-1 (bytes constvec &optional make-splicable)
+;; That is for use by the compiler.
+;; If MAKE-SPLICEABLE is nil, we are being called for the disassembler.
+;; In that case, we put a pc value into the list
+;; before each insn (or its label).
+(defun byte-decompile-bytecode-1 (bytes constvec &optional make-spliceable)
(let ((length (length bytes))
(ptr 0) optr tag tags op offset
lap tmp
endtag
(retcount 0))
(while (not (= ptr length))
- (setq lap (cons ptr lap))
+ (or make-spliceable
+ (setq lap (cons ptr lap)))
(setq op (aref bytes ptr)
optr ptr
offset (disassemble-offset)) ; this does dynamic-scope magic
@@ -1125,7 +1130,7 @@
(car (setq byte-compile-variables
(cons (list tmp)
byte-compile-variables)))))))
- ((and make-splicable
+ ((and make-spliceable
(eq op 'byte-return))
(if (= ptr (1- length))
(setq op nil)