Function: comp--sanitizer

comp--sanitizer is a byte-compiled function defined in comp.el.gz.

Signature

(comp--sanitizer _)

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/comp.el.gz
(defun comp--sanitizer (_)
  (when comp-sanitizer-emit
    (cl-loop
     for f being each hash-value of (comp-ctxt-funcs-h comp-ctxt)
     for comp-func = f
     unless (comp-func-has-non-local comp-func)
     do
     (cl-loop
      for b being each hash-value of (comp-func-blocks f)
      do
      (cl-loop
       named in-the-basic-block
       for insns-seq on (comp-block-insns b)
       do (pcase insns-seq
            (`((cond-jump ,(and (pred comp-mvar-p) mvar-tested)
                          ,(pred comp-mvar-p) ,_bb1 ,_bb2))
             (let ((type (comp-cstr-to-type-spec mvar-tested))
                   (insn (car insns-seq)))
               ;; No need to check if type is t.
               (unless (eq type t)
                 (comp--add-const-to-relocs type)
                 (setcar
                  insns-seq
                  (comp--call 'helper_sanitizer_assert
                              mvar-tested
                              (make--comp-mvar :constant type)))
                 (setcdr insns-seq (list insn)))
               ;; (setf (comp-func-ssa-status comp-func) 'dirty)
               (cl-return-from in-the-basic-block))))))
     do (comp--log-func comp-func 3))))