(defun show-fn (fn &optional (stream t) (indent 2)) (if (not (fn-p fn)) (format stream "~8a" fn) (progn (fresh-line) (dotimes (i (length (fn-code fn))) (let ((instr (elt (fn-code fn) i))) (if (atom instr) (format stream "~a:" instr) (progn (format stream "~VT~2d: " indent i) (dolist (arg instr) (show-fn arg stream (+ indent 8))) (fresh-line))))))))
<cl> (comp-show '(if a b c)) 0: ARGS 0 1: GVAR A 2: FJUMP 5 3: GVAR B 4: JUMP 6 5: GVAR C 6: RETURN NIL <cl> (comp-show '(and a b c)) 0: ARGS 0 1: GVAR A 2: FJUMP 9 3: GVAR B 4: FJUMP 7 5: GVAR C 6: JUMP 8 7: GVAR NIL 8: JUMP 10 9: GVAR NIL 10: RETURN <cl> (comp-show '(if (and a b) c)) 0: ARGS 0 1: GVAR A 2: FJUMP 5 3: GVAR B 4: JUMP 6 5: GVAR NIL 6: FJUMP 9 7: GVAR C 8: JUMP 10 9: GVAR NIL 10: RETURN