Function: comp--emit-cond-jump
comp--emit-cond-jump is a byte-compiled function defined in
comp.el.gz.
Signature
(comp--emit-cond-jump A B TARGET-OFFSET LAP-LABEL NEGATED)
Documentation
Emit a conditional jump to LAP-LABEL when A and B satisfy EQ.
TARGET-OFFSET is the positive offset on the SP when branching to the target block. If NEGATED is non null, negate the tested condition. Return value is the fall-through block name.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/comp.el.gz
(defun comp--emit-cond-jump (a b target-offset lap-label negated)
"Emit a conditional jump to LAP-LABEL when A and B satisfy EQ.
TARGET-OFFSET is the positive offset on the SP when branching to the target
block.
If NEGATED is non null, negate the tested condition.
Return value is the fall-through block name."
(cl-destructuring-bind (label-num . label-sp) lap-label
(let* ((bb (comp-block-name (comp--bb-maybe-add
(1+ (comp-limplify-pc comp-pass))
(comp--sp)))) ; Fall through block.
(target-sp (+ target-offset (comp--sp)))
(target-addr (comp--label-to-addr label-num))
(target (comp--bb-maybe-add target-addr target-sp))
(latch (when (< target-addr (comp-limplify-pc comp-pass))
(comp--latch-make-fill target)))
(eff-target-name (comp-block-name (or latch target))))
(when label-sp
(cl-assert (= (1- label-sp) (+ target-offset (comp--sp)))))
(comp--emit (if negated
(list 'cond-jump a b bb eff-target-name)
(list 'cond-jump a b eff-target-name bb)))
(comp--mark-curr-bb-closed)
bb)))