;;; compiler.
(declare (usual-integrations))
+
+(load-option 'COMPRESS) ; XXX ugh
\f
(define (finish-cross-compilation:directory directory #!optional force?)
(let ((force? (if (default-object? force?) #f force?)))
(or (string=? ns ".")
(string=? ns ".."))))
(loop pathname)))
+ ((let ((t (pathname-type pathname)))
+ (and (string? t)
+ (string=? t "fni")))
+ (finish-cross-compilation:info-file pathname force?))
((let ((t (pathname-type pathname)))
(and (string? t)
(string=? t "moc")))
(finish-cross-compilation:file pathname force?))))
(directory-read (pathname-as-directory directory))))))
+(define (finish-cross-compilation:info-file pathname #!optional force?)
+ (let* ((input-file (pathname-default-type pathname "fni"))
+ (output-file (pathname-new-type input-file "bci")))
+ (if (or (if (default-object? force?) #t force?)
+ (file-modification-time<? output-file input-file))
+ (with-notification
+ (lambda (port)
+ (write-string "Compressing info: " port)
+ (write (enough-namestring input-file) port)
+ (write-string " => " port)
+ (write (enough-namestring output-file) port))
+ (lambda ()
+ (let ((inf (fasload input-file #t)))
+ ((access SPLIT-INF-STRUCTURE! ; XXX ugh
+ (->environment '(RUNTIME COMPILER-INFO)))
+ inf
+ #f)
+ (call-with-temporary-filename
+ (lambda (temp)
+ (fasdump inf temp #t)
+ (compress temp output-file)))))))))
+
(define (finish-cross-compilation:file input-file #!optional force?)
(let* ((input-file (pathname-default-type input-file "moc"))
(output-file (pathname-new-type input-file "com")))