Rename fasdump-format -> fasl-format.
authorTaylor R Campbell <campbell@mumble.net>
Sun, 9 Dec 2018 00:06:10 +0000 (00:06 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Sun, 9 Dec 2018 00:12:14 +0000 (00:12 +0000)
Only the fasdump side is implemented portably, but no reason the
concept need be different.

Fix up compiler package exports while here.

src/compiler/base/asstop.scm
src/compiler/base/fasdump.scm
src/compiler/machines/C/compiler.pkg
src/compiler/machines/C/machin.scm
src/compiler/machines/i386/compiler.pkg
src/compiler/machines/i386/machin.scm
src/compiler/machines/svm/compiler.pkg
src/compiler/machines/svm/machine.scm
src/compiler/machines/x86-64/compiler.pkg
src/compiler/machines/x86-64/machin.scm
tests/compiler/test-fasdump.scm

index cfb5f1cd9eed76c0e23d173499e50e86625a8956..2aa6da19baaeed7fdf0e14f9fa119b8dbe367d53 100644 (file)
@@ -36,7 +36,7 @@ USA.
 
 (define (compiler-file-output object pathname)
   (if compiler:cross-compiling?
-      (portable-fasdump object pathname (target-fasdump-format))
+      (portable-fasdump object pathname (target-fasl-format))
       (fasdump object pathname #t)))
 
 (define (compiler-output->procedure scode environment)
index 9354f5bb5fe0be20d4dc498afe2e1c429eb1c1e7..a2f07c5aae89210b0bcee1cceb73647373bc893a 100644 (file)
@@ -28,10 +28,10 @@ USA.
 \f
 ;;;; Fasdump formats
 
-(define-structure (fasdump-format
+(define-structure (fasl-format
                    (safe-accessors)
                    (conc-name format.)
-                   (keyword-constructor make-fasdump-format))
+                   (keyword-constructor make-fasl-format))
   (version #f read-only #t)
   (architecture #f read-only #t)
   (marker #f read-only #t)
@@ -50,9 +50,9 @@ USA.
   (write-bignum-digit #f read-only #t)
   (write-float #f read-only #t))
 
-(define (make-std-fasdump-format architecture bytes-per-word
+(define (make-std-fasl-format architecture bytes-per-word
           write-word write-untagged-word write-bignum-digit write-float)
-  (make-fasdump-format
+  (make-fasl-format
    'VERSION             10              ;FASL_VERSION_C_CODE
    'ARCHITECTURE        architecture
    'MARKER              (do ((i 0 (+ i 1)) ;#xfafafa...
@@ -73,33 +73,33 @@ USA.
    'WRITE-BIGNUM-DIGIT  write-bignum-digit
    'WRITE-FLOAT         write-float))
 
-(define (make-std32be-fasdump-format architecture)
-  (make-std-fasdump-format architecture 4
-                           write-std32be-word
-                           write-std32be-untagged-word
-                           write-std32be-bignum-digit
-                           write-ieee754-binary64-be))
-
-(define (make-std32le-fasdump-format architecture)
-  (make-std-fasdump-format architecture 4
-                           write-std32le-word
-                           write-std32le-untagged-word
-                           write-std32le-bignum-digit
-                           write-ieee754-binary64-le))
-
-(define (make-std64be-fasdump-format architecture)
-  (make-std-fasdump-format architecture 8
-                           write-std64be-word
-                           write-std64be-untagged-word
-                           write-std64be-bignum-digit
-                           write-ieee754-binary64-be))
-
-(define (make-std64le-fasdump-format architecture)
-  (make-std-fasdump-format architecture 8
-                           write-std64le-word
-                           write-std64le-untagged-word
-                           write-std64le-bignum-digit
-                           write-ieee754-binary64-le))
+(define (make-std32be-fasl-format architecture)
+  (make-std-fasl-format architecture 4
+                        write-std32be-word
+                        write-std32be-untagged-word
+                        write-std32be-bignum-digit
+                        write-ieee754-binary64-be))
+
+(define (make-std32le-fasl-format architecture)
+  (make-std-fasl-format architecture 4
+                        write-std32le-word
+                        write-std32le-untagged-word
+                        write-std32le-bignum-digit
+                        write-ieee754-binary64-le))
+
+(define (make-std64be-fasl-format architecture)
+  (make-std-fasl-format architecture 8
+                        write-std64be-word
+                        write-std64be-untagged-word
+                        write-std64be-bignum-digit
+                        write-ieee754-binary64-be))
+
+(define (make-std64le-fasl-format architecture)
+  (make-std-fasl-format architecture 8
+                        write-std64le-word
+                        write-std64le-untagged-word
+                        write-std64le-bignum-digit
+                        write-ieee754-binary64-le))
 \f
 ;;;; Bits
 
@@ -211,21 +211,21 @@ USA.
 \f
 ;;;;; Known formats
 
-(define fasdump-format:i386     (make-std32le-fasdump-format  6))
-(define fasdump-format:sparc32  (make-std32le-fasdump-format 14))
-(define fasdump-format:mips32be (make-std32be-fasdump-format 15))
-(define fasdump-format:mips32le (make-std32le-fasdump-format 15))
-(define fasdump-format:alpha    (make-std64le-fasdump-format 18))
-(define fasdump-format:ppc32    (make-std32be-fasdump-format 20))
-(define fasdump-format:amd64    (make-std64le-fasdump-format 21))
-(define fasdump-format:arm32le  (make-std32le-fasdump-format 24))
-(define fasdump-format:arm32be  (make-std32le-fasdump-format 24))
-(define fasdump-format:aarch64le (make-std64le-fasdump-format 25))
-(define fasdump-format:aarch64be (make-std64be-fasdump-format 25))
+(define fasl-format:i386     (make-std32le-fasl-format  6))
+(define fasl-format:sparc32  (make-std32le-fasl-format 14))
+(define fasl-format:mips32be (make-std32be-fasl-format 15))
+(define fasl-format:mips32le (make-std32le-fasl-format 15))
+(define fasl-format:alpha    (make-std64le-fasl-format 18))
+(define fasl-format:ppc32    (make-std32be-fasl-format 20))
+(define fasl-format:amd64    (make-std64le-fasl-format 21))
+(define fasl-format:arm32le  (make-std32le-fasl-format 24))
+(define fasl-format:arm32be  (make-std32le-fasl-format 24))
+(define fasl-format:aarch64le (make-std64le-fasl-format 25))
+(define fasl-format:aarch64be (make-std64be-fasl-format 25))
 
 #;
-(define fasdump-format:pdp10
-  (make-fasdump-format
+(define fasl-format:pdp10
+  (make-fasl-format
    'VERSION             10              ;FASL_VERSION_C_CODE
    'ARCHITECTURE        1
    'BITS-PER-TYPE       6
index 379405d3b23c4d9f15a93b15e0c9a35f8eb5028e..a77dd7baa4397411819c7852b807bb64998460af 100644 (file)
@@ -397,14 +397,17 @@ USA.
   (files "base/fasdump")
   (parent ())                          ;** This code should be portable.
   (export (compiler)
-         fasdump-format:alpha
-         fasdump-format:amd64
-         fasdump-format:arm32
-         fasdump-format:i386
-         fasdump-format:mips32be
-         fasdump-format:mips32le
-         fasdump-format:ppc32
-         fasdump-format:sparc32
+         fasl-format:aarch64be
+         fasl-format:aarch64le
+         fasl-format:alpha
+         fasl-format:amd64
+         fasl-format:arm32be
+         fasl-format:arm32le
+         fasl-format:i386
+         fasl-format:mips32be
+         fasl-format:mips32le
+         fasl-format:ppc32
+         fasl-format:sparc32
          portable-fasdump))
 
 (define-package (compiler constraints)
index 4dd5dc960775cac482bda9db318f75199372eb1c..142dbf11abf5e30bef274fd47a4ab4e291959400 100644 (file)
@@ -31,7 +31,7 @@ USA.
 \f
 ;;;; Architecture Parameters
 
-(define (target-fasdump-format) (error "I should not be fasdumping crap!"))
+(define (target-fasl-format) (error "I should not be fasdumping crap!"))
 
 (define use-pre/post-increment? true)
 (define endianness 'DONT-KNOW)
index 3313b20a94679f7aa7c839804d04d55dd79edb9d..f1fd35bcdf8a4a7d9f1a86969d4ca2384ff85ff9 100644 (file)
@@ -383,14 +383,17 @@ USA.
   (files "base/fasdump")
   (parent ())                          ;** This code should be portable.
   (export (compiler)
-         fasdump-format:alpha
-         fasdump-format:amd64
-         fasdump-format:arm32
-         fasdump-format:i386
-         fasdump-format:mips32be
-         fasdump-format:mips32le
-         fasdump-format:ppc32
-         fasdump-format:sparc32
+         fasl-format:aarch64be
+         fasl-format:aarch64le
+         fasl-format:alpha
+         fasl-format:amd64
+         fasl-format:arm32be
+         fasl-format:arm32le
+         fasl-format:i386
+         fasl-format:mips32be
+         fasl-format:mips32le
+         fasl-format:ppc32
+         fasl-format:sparc32
          portable-fasdump))
 
 (define-package (compiler constraints)
index dac9dd4036a75ba84dcdd40b6aded33a5c632eb1..5de18a51949e0de4faad54bdf3147185cc567638 100644 (file)
@@ -31,7 +31,7 @@ USA.
 \f
 ;;;; Architecture Parameters
 
-(define (target-fasdump-format) fasdump-format:i386)
+(define (target-fasl-format) fasl-format:i386)
 
 (define use-pre/post-increment? false)
 (define-integrable endianness 'LITTLE)
index d2968576120b60330782789aac8b37aca924816f..939e5b5bb883fd37d25a70fe7a4411a3dc403381 100644 (file)
@@ -383,14 +383,17 @@ USA.
   (files "base/fasdump")
   (parent ())                          ;** This code should be portable.
   (export (compiler)
-         fasdump-format:alpha
-         fasdump-format:amd64
-         fasdump-format:arm32
-         fasdump-format:i386
-         fasdump-format:mips32be
-         fasdump-format:mips32le
-         fasdump-format:ppc32
-         fasdump-format:sparc32
+         fasl-format:aarch64be
+         fasl-format:aarch64le
+         fasl-format:alpha
+         fasl-format:amd64
+         fasl-format:arm32be
+         fasl-format:arm32le
+         fasl-format:i386
+         fasl-format:mips32be
+         fasl-format:mips32le
+         fasl-format:ppc32
+         fasl-format:sparc32
          portable-fasdump))
 
 (define-package (compiler constraints)
index b6f05f54f92fed1f841a833623252fbed74dae85..83fe59022f59c577b381465d83955f0eb3ad3e8d 100644 (file)
@@ -32,7 +32,7 @@ USA.
 ;;;; Architecture Parameters
 
 ;; XXX Invent an svm1 fasdump format.
-(define (target-fasdump-format) fasdump-format:amd64) ;XXX
+(define (target-fasl-format) fasl-format:amd64) ;XXX
 
 (define use-pre/post-increment? #t)
 (define-integrable endianness 'LITTLE)
index 7ba0e980d7641f2b373d4d8a4575afc39e0bbf6b..c06a21a579aa8b66143b38663602e9b70f16282d 100644 (file)
@@ -383,14 +383,17 @@ USA.
   (files "base/fasdump")
   (parent ())                          ;** This code should be portable.
   (export (compiler)
-         fasdump-format:alpha
-         fasdump-format:amd64
-         fasdump-format:arm32
-         fasdump-format:i386
-         fasdump-format:mips32be
-         fasdump-format:mips32le
-         fasdump-format:ppc32
-         fasdump-format:sparc32
+         fasl-format:aarch64be
+         fasl-format:aarch64le
+         fasl-format:alpha
+         fasl-format:amd64
+         fasl-format:arm32be
+         fasl-format:arm32le
+         fasl-format:i386
+         fasl-format:mips32be
+         fasl-format:mips32le
+         fasl-format:ppc32
+         fasl-format:sparc32
          portable-fasdump))
 
 (define-package (compiler constraints)
index f69f0882b328ccd6a3eda4967d44f42b0d9feffd..5639974c6235b34091d225e94d45f159e4fc5b90 100644 (file)
@@ -31,7 +31,7 @@ USA.
 \f
 ;;;; Architecture Parameters
 
-(define (target-fasdump-format) fasdump-format:amd64)
+(define (target-fasl-format) fasl-format:amd64)
 
 (define use-pre/post-increment? false)
 (define-integrable endianness 'LITTLE)
index d7b92d82f7e66275bdf244d338806da4aa132000..5ee1938297c48ed0cdb2623330220c9fb5aee307 100644 (file)
@@ -138,24 +138,24 @@ USA.
 (define assert-equal-nan-scode
   (simple-binary-assertion equal-nan-scode? #f))
 
-(define fasdump-formats
-  `(("aarch64le" ,fasdump-format:aarch64le)
-    ("aarch64be" ,fasdump-format:aarch64be)
-    ("alpha" ,fasdump-format:alpha)
-    ("armbe" ,fasdump-format:arm32be)
-    ("armle" ,fasdump-format:arm32le)
-    ("ia-32" ,fasdump-format:i386)
-    ("mipsbe" ,fasdump-format:mips32be)
-    ("mipsle" ,fasdump-format:mips32le)
-    ("ppc32" ,fasdump-format:ppc32)
-    ("x86-64" ,fasdump-format:amd64)))
+(define fasl-formats
+  `(("aarch64le" ,fasl-format:aarch64le)
+    ("aarch64be" ,fasl-format:aarch64be)
+    ("alpha" ,fasl-format:alpha)
+    ("armbe" ,fasl-format:arm32be)
+    ("armle" ,fasl-format:arm32le)
+    ("ia-32" ,fasl-format:i386)
+    ("mipsbe" ,fasl-format:mips32be)
+    ("mipsle" ,fasl-format:mips32le)
+    ("ppc32" ,fasl-format:ppc32)
+    ("x86-64" ,fasl-format:amd64)))
 
-(define (host-fasdump-format)
+(define (host-fasl-format)
   (define (try key)
     (any (lambda (format)
            (and (string-ci=? (car format) key)
                 (cadr format)))
-         fasdump-formats))
+         fasl-formats))
   (or (try microcode-id/machine-type)
       (try
        (string-append microcode-id/machine-type
@@ -298,7 +298,7 @@ USA.
     (,(make-scode-the-environment))
     (,(make-scode-variable 'foo)))
   (lambda (object)
-    (let ((format (host-fasdump-format)))
+    (let ((format (host-fasl-format)))
       (assert format '(unknown host fasdump format))
       (with-test-properties
           (lambda ()