Coverage report: home:Documents;Work;Repo;alu;src;spec;emit.lisp.newest
| Expressions | Branches | Code Forms | Functions |
| Total | Entered | % entered | Fully covered | % fully covered | total unreached | Total | Covered | % covered | Total | Fully covered | % fully covered | Partly covered | % partly covered | Not entered | % not entered |
| | | | | | | | | | | | | | | |
Key
Fully covered - every single instruction executed
Partly covered - entered but some subforms not executed
Never entered - not a single instruction executed
Uninstrumented - a form whose coverage was not measured
1 (in-package :alu.spec.emit)
2
3 (defparameter *circuit-body* (list nil))
4
5 (defmacro with-circuit-body (init-body &body body)
6 "Creates a fresh circuit body"
7 `(progn (let ((*circuit-body* ,init-body))
8 ,@body)
9 (setf ,init-body (remove-if #'null ,init-body))
10 ,init-body))
Show expansion
Show tags
(lambda (#:whole53444 #:environment53445)
(let* ((#:args53446 (funcall 'ccl::prepare-to-destructure (cdr #:whole53444) '(init-body &body body) 1 nil))
(init-body (prog1 (car #:args53446) (setq #:args53446 (ccl::%cdr (ccl::typed-form 'list #:args53446)))))
(#:rest53447 #:args53446)
(body #:rest53447))
(list 'progn
(list* 'let (cons (list '*circuit-body* init-body) nil) body)
(list 'setf init-body (list 'remove-if '(function null) init-body))
init-body)))
11
12 (defun instruction (term)
13 "Adds the given term to the circuit body. This adds the value to the
14 last slot of the given body"
15 (setf (cdr *circuit-body*) (list term)
16 *circuit-body* (cdr *circuit-body*)))
Show expansion
Show tags
(lambda (term) (progn (ccl::set-cdr *circuit-body* (cons term nil)) (setq *circuit-body* (cdr *circuit-body*))))