From 879c755d017b3717c857d4689f492bfd3cf9ebf4 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Sun, 17 May 2009 12:44:17 +0000 Subject: [PATCH] 1.0.28.53: enable dumping of specialized complexes in the cross-compiler * No reason to disable it that I can see, and if it is disabled the cross-compiler will dump slightly bogus objects for complex single and double floats -- using the generic complex widetag. Noticed while trying to initialize arrays using the SAETP-DEFAULT-INITIAL-ELEMENT. --- src/compiler/dump.lisp | 2 -- tests/compiler.pure.lisp | 10 ++++++++++ version.lisp-expr | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/compiler/dump.lisp b/src/compiler/dump.lisp index 6cffe91..8b7f9b0 100644 --- a/src/compiler/dump.lisp +++ b/src/compiler/dump.lisp @@ -568,12 +568,10 @@ (defun dump-complex (x file) (typecase x - #-sb-xc-host ((complex single-float) (dump-fop 'fop-complex-single-float file) (dump-integer-as-n-bytes (single-float-bits (realpart x)) 4 file) (dump-integer-as-n-bytes (single-float-bits (imagpart x)) 4 file)) - #-sb-xc-host ((complex double-float) (dump-fop 'fop-complex-double-float file) (let ((re (realpart x))) diff --git a/tests/compiler.pure.lisp b/tests/compiler.pure.lisp index 08fbf6a..ca3c9a4 100644 --- a/tests/compiler.pure.lisp +++ b/tests/compiler.pure.lisp @@ -2896,3 +2896,13 @@ (assert (= 1 n)) (compile nil `(lambda (x) (the 'fixnum x))) (assert (= 2 n))))) + +(with-test (:name :complex-subtype-dumping-in-xc) + (assert + (= sb-vm:complex-single-float-widetag + (sb-kernel:widetag-of + (sb-vm:saetp-initial-element-default (sb-c::find-saetp '(complex single-float)))))) + (assert + (= sb-vm:complex-double-float-widetag + (sb-kernel:widetag-of + (sb-vm:saetp-initial-element-default (sb-c::find-saetp '(complex double-float))))))) diff --git a/version.lisp-expr b/version.lisp-expr index 5da0e43..62e1b93 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.28.52" +"1.0.28.53" -- 1.7.10.4