From 5dedbff1b283fdfebe600598def0fd421625ef64 Mon Sep 17 00:00:00 2001 From: Samuel Freilich Date: Thu, 12 May 2016 09:44:41 -0400 Subject: [PATCH 1/1] Fix comment about *code-coverage-info* structure *code-coverage-info* uses +code-coverage-unmarked+, not nil, to indicate the state of a path that has not been visited. The instrumentation generating code marks those records as constant to ensure that multiple records for the same location get coalesced (the instrumentation code subsequently modifies them anyways, suppressing the warning about modifying a constant value). Because of that, it's important that well-behaved user code won't contain any constant lists that are coincidentally equivalent to (cons path state), where path is a list of fixnums. --- src/compiler/main.lisp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/main.lisp b/src/compiler/main.lisp index 0bfaa98..cf8ef89 100644 --- a/src/compiler/main.lisp +++ b/src/compiler/main.lisp @@ -123,9 +123,9 @@ ;; Used during compilation to keep track of with source paths have been ;; instrumented in which blocks. (defvar *code-coverage-blocks* nil) -;; Stores the code coverage instrumentation results. Keys are namestrings, -;; the value is a list of (CONS PATH STATE), where STATE is NIL for -;; a path that has not been visited, and T for one that has. +;; Stores the code coverage instrumentation results. Keys are namestrings, the +;; value is a list of (CONS PATH STATE), where STATE is +CODE-COVERAGE-UNMARKED+ +;; for a path that has not been visited, and T for one that has. (defvar *code-coverage-info* (make-hash-table :test 'equal)) -- 2.8.0.rc3.226.g39d4020