* lisp/emacs-lisp/comp.el (comp-post-pass-hooks): New special
variable.
(native-compile): Run what is registered in
`comp-post-pass-hooks'.
comp-final)
"Passes to be executed in order.")
+(defvar comp-post-pass-hooks ()
+ "Alist PASS FUNCTIONS.
+Each function in FUNCTIONS is run after PASS.
+Useful to hook into pass checkers.")
+
(defconst comp-known-ret-types '((cons . cons)
(1+ . number)
(1- . number)
(comp-log (format "(%s) Running pass %s:\n"
function-or-file pass)
2)
- (setf data (funcall pass data)))
+ (setf data (funcall pass data))
+ (cl-loop for f in (alist-get pass comp-post-pass-hooks)
+ do (funcall f data)))
comp-passes)
(native-compiler-error
;; Add source input.