X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.impure.lisp;h=8e78f57c5eada528467356b4a8655d39ba4b04d3;hb=6075b05401346ac20ec9a647fe192a2a959f3882;hp=cb6ec003fa3ece382cb46f015cf0c25b8fd0eb4f;hpb=1a19da9ff50a45962fc2cf42c7a241a2ce97a364;p=sbcl.git diff --git a/tests/compiler.impure.lisp b/tests/compiler.impure.lisp index cb6ec00..8e78f57 100644 --- a/tests/compiler.impure.lisp +++ b/tests/compiler.impure.lisp @@ -1551,4 +1551,17 @@ (not (or c d e f g h i j k l m n o p q r s)))))) (wants-many-values 1 42) +;;; constant coalescing (named and unnamed) +(defconstant +born-to-coalesce+ '.born-to-coalesce.) +(let* ((f (compile nil '(lambda () + (let ((x (cons +born-to-coalesce+ nil)) + (y (cons '.born-to-coalesce. nil))) + (list x y))))) + (b-t-c 0) + (code (sb-kernel:fun-code-header f))) + (loop for i from sb-vm::code-constants-offset below (sb-kernel:get-header-data code) + do (when (eq '.born-to-coalesce. (sb-kernel:code-header-ref code i)) + (incf b-t-c))) + (assert (= 1 b-t-c))) + ;;; success