master: Delete useless test
snuglas via Sbcl-commits <[email protected]>
| Newsgroups | gmane.lisp.steel-bank.cvs |
|---|---|
| Message-ID | <[email protected]> |
The branch "master" has been updated in SBCL:
via c2df85fe12dd412c0db10ba716b1bb33e40cbc3b (commit)
from 900e2f1e6eacb01a260c2019de9f67641ed87d73 (commit)
- Log -----------------------------------------------------------------
commit c2df85fe12dd412c0db10ba716b1bb33e40cbc3b
Author: Douglas Katzman <[email protected]>
Date: Wed Apr 29 22:27:04 2026 -0400
Delete useless test
This test was trying to assert that no slow TYPEP call existed. Since positive
assertions are generally better than negative ones, it instead asserted that
exactly one LAYOUT existed, which would be expected for %INSTANCE-TYPEP.
And it used to be meaningful because:
* MUTEX stored its owner as a THREAD instance, not a raw word, therefore
* MUTEX and THREAD were mutually referential types.
The compiler could not efficiently deal with a forward-referenced types in
whichever defstruct appeared first in the defining file. So either it couldn't
optimize TYPEP in (SETF OWNER) or (SETF THREAD-INTERRUPTIONS-LOCK) depending
on which defstruct appeared first. That defect was eventually rectified.
However, now the test is just bad, as neither of the above points hold.
---
tests/defstruct.impure-cload.lisp | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/tests/defstruct.impure-cload.lisp b/tests/defstruct.impure-cload.lisp
index 45b53c551..a0fb85301 100644
--- a/tests/defstruct.impure-cload.lisp
+++ b/tests/defstruct.impure-cload.lisp
@@ -27,18 +27,6 @@
:type 'sb-kernel:layout)))
(assert (= (length constants) 1)))))
-(with-test (:name :mutex-owner-typecheck)
- (let ((layouts
- (ctu:find-code-constants #'(setf sb-thread::mutex-%owner)
- :type 'sb-kernel:layout)))
- ;; expect exactly 1 layout, that of MUTEX, for signaling OBJECT-NOT-TYPE.
- ;; To be really pedantic we'd want to assert that in the source file
- ;; the defstruct of MUTEX appears prior to the defstruct of THREAD,
- ;; proving without a doubt that block compilation worked.
- (assert (= (length layouts) 1))
- (assert (find (sb-kernel:find-layout 'sb-thread:mutex)
- layouts))))
-
(defstruct (parent)
(bv #* :type bit-vector)
(x 0d0 :type double-float))
-----------------------------------------------------------------------
hooks/post-receive
--
SBCL