-
-;;; Or a complex...
-
-(defun dump-complex (x file)
- (typecase x
- ((complex single-float)
- (dump-fop 'sb!impl::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))
- ((complex double-float)
- (dump-fop 'sb!impl::fop-complex-double-float file)
- (let ((re (realpart x)))
- (declare (double-float re))
- (dump-unsigned-32 (double-float-low-bits re) file)
- (dump-integer-as-n-bytes (double-float-high-bits re) 4 file))
- (let ((im (imagpart x)))
- (declare (double-float im))
- (dump-unsigned-32 (double-float-low-bits im) file)
- (dump-integer-as-n-bytes (double-float-high-bits im) 4 file)))
- #!+long-float
- ((complex long-float)
- (dump-fop 'sb!impl::fop-complex-long-float file)
- (dump-long-float (realpart x) file)
- (dump-long-float (imagpart x) file))
- (t
- (sub-dump-object (realpart x) file)
- (sub-dump-object (imagpart x) file)
- (dump-fop 'sb!impl::fop-complex file))))
-