Fix cold-load problems when cross-compiling from 10.1.10.
authorChris Hanson <org/chris-hanson/cph>
Mon, 7 Oct 2019 04:34:26 +0000 (00:34 -0400)
committerChris Hanson <org/chris-hanson/cph>
Mon, 7 Oct 2019 04:34:26 +0000 (00:34 -0400)
src/runtime/record.scm
src/runtime/runtime.pkg

index bf679b3e84d9155d22472d9d07527c10c659bfe0..8e14d58cc56877efdbf29e35979d9609a8133e22 100644 (file)
@@ -139,13 +139,16 @@ USA.
 
 (define (generate-fields-by-index field-specs parent-type start-index)
   (let ((partial-fields
-        (list->vector
-         (map (lambda (spec index)
-                (make-field (field-spec-name spec)
-                            (field-spec-init spec)
-                            index))
-              field-specs
-              (iota (length field-specs) (+ start-index 1))))))
+        (let ((v (make-vector (length field-specs)))
+              (offset (fix:+ start-index 1)))
+          (do ((specs field-specs (cdr specs))
+               (index 0 (fix:+ index 1)))
+              ((not (pair? specs)) v)
+            (vector-set! v
+                         index
+                         (make-field (field-spec-name (car specs))
+                                     (field-spec-init (car specs))
+                                     (fix:+ offset index)))))))
     (if parent-type
        (vector-append (%record-type-fields-by-index parent-type)
                       partial-fields)
index b5395fac2a865b8d000ed503d24f11f89e64c021..b51baf1c7f557a6f5c0e12de5fc9f5b9f4b018b7 100644 (file)
@@ -3925,6 +3925,7 @@ USA.
   (files "record")
   (parent (runtime))
   (export deprecated ()
+         (new-make-record-type make-record-type) ;RELNOTE: delete
          (record-copy copy-record)
          (record-updater record-modifier)
          set-record-type-unparser-method!)