From 60575153d4b43017cdee795870e4caec23c0aaa0 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 7 Oct 2019 00:34:26 -0400 Subject: [PATCH] Fix cold-load problems when cross-compiling from 10.1.10. --- src/runtime/record.scm | 17 ++++++++++------- src/runtime/runtime.pkg | 1 + 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/runtime/record.scm b/src/runtime/record.scm index bf679b3e8..8e14d58cc 100644 --- a/src/runtime/record.scm +++ b/src/runtime/record.scm @@ -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) diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index b5395fac2..b51baf1c7 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -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!) -- 2.25.1