Function: comp--limplify-block
comp--limplify-block is a byte-compiled function defined in
comp.el.gz.
Signature
(comp--limplify-block BB)
Documentation
Limplify basic-block BB and add it to the current function.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/comp.el.gz
(defun comp--limplify-block (bb)
"Limplify basic-block BB and add it to the current function."
(setf (comp-limplify-curr-block comp-pass) bb
(comp-limplify-sp comp-pass) (comp-block-lap-sp bb)
(comp-limplify-pc comp-pass) (comp-block-lap-addr bb))
(puthash (comp-block-name bb) bb (comp-func-blocks comp-func))
(cl-loop
for inst-cell on (nthcdr (comp-limplify-pc comp-pass)
(comp-func-lap comp-func))
for inst = (car inst-cell)
for next-inst = (car-safe (cdr inst-cell))
do (comp--limplify-lap-inst inst)
(cl-incf (comp-limplify-pc comp-pass))
when (comp--lap-fall-through-p inst)
do (pcase next-inst
(`(TAG ,_label . ,label-sp)
(when label-sp
(cl-assert (= (1- label-sp) (comp--sp))))
(let* ((stack-depth (if label-sp
(1- label-sp)
(comp--sp)))
(next-bb (comp-block-name (comp--bb-maybe-add
(comp-limplify-pc comp-pass)
stack-depth))))
(unless (comp-block-closed bb)
(comp--emit `(jump ,next-bb))))
(cl-return)))
until (comp--lap-eob-p inst)))