Preserve progn-like clauses for coverage
commit340689f1f472a6f85d31bcc76b8d700f96542a2d
authorSamuel Freilich <sfreilich@google.com>
Mon, 13 Mar 2017 17:52:43 +0000 (13 13:52 -0400)
committerDouglas Katzman <dougk@google.com>
Tue, 18 Apr 2017 13:08:19 +0000 (18 09:08 -0400)
tree4ae23060f6e38d56f51b397d2b4c7e5f3a313d61
parent2309852345e893c9e536a9b23d6f22a7f58bc428
Preserve progn-like clauses for coverage

Removing spurious progns makes for a cleaner macro-expansion. However,
because SBCL maps cons cells in the original source file to source paths
when recording coverage instrumentation, discarding cons cells
unnecessarily leads to worse coverage instrumentation.

Generally, we can't record form coverage for atoms, but if the atom is
in a progn-like form, we can get accurate coverage information by
mapping the cons cell whose car contains that atom to its source-path.
This is handled in maybe-instrument-progn-like in
src/compiler/ir1-tran.lisp.
contrib/sb-cover/test-data-branching-forms.lisp [new file with mode: 0644]
contrib/sb-cover/tests.lisp
src/code/defboot.lisp