From 7071648f613336ef3d34c797e74f00df439bb75a Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 10 Jan 2018 19:37:47 -0800 Subject: [PATCH] Delete some unnecessary procedures. --- src/runtime/record.scm | 29 +++++++++-------------------- src/runtime/runtime.pkg | 3 --- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/src/runtime/record.scm b/src/runtime/record.scm index 0c2d0a8b4..c10f25855 100644 --- a/src/runtime/record.scm +++ b/src/runtime/record.scm @@ -188,10 +188,6 @@ USA. (let ((v (%record-type-field-names record-type))) ((ucode-primitive subvector->list) v 0 (vector-length v)))) -(define (record-type-default-inits record-type) - (guarantee-record-type record-type 'RECORD-TYPE-DEFAULT-INITS) - (vector->list (%record-type-default-inits record-type))) - (define (%valid-default-inits? default-inits n-fields) (fix:= n-fields (length default-inits))) @@ -209,15 +205,12 @@ USA. (define (initialize-record-procedures!) (run-deferred-boot-actions 'record-procedures)) -(define (record-type-default-value record-type field-name) - (record-type-default-value-by-index - record-type - (record-type-field-index record-type field-name #t))) - -(define (record-type-default-value-by-index record-type field-name-index) - (let ((init (vector-ref (%record-type-default-inits record-type) - (fix:- field-name-index 1)))) - (and init (init)))) +(define (record-type-default-value-by-index record-type field-index) + (let ((init + (vector-ref (%record-type-default-inits record-type) + (fix:- field-index 1)))) + (and init + (init)))) (define %record-type-predicate %record-type-tag) @@ -513,10 +506,9 @@ USA. #f)) (define-unparser-method record-type? - (standard-unparser-method 'record-type - (lambda (type port) - (write-char #\space port) - (display (%record-type-name type) port)))) + (simple-unparser-method 'record-type + (lambda (type) + (list (%record-type-name type))))) (define-pp-describer %record? (lambda (record) @@ -655,9 +647,6 @@ USA. (vector->list (structure-type/field-names type)) (vector->list (structure-type/field-indexes type)))))) -(define (define-structure/default-value type field-name) - ((structure-type/default-init type field-name))) - (define (define-structure/default-value-by-index type field-name-index) ((structure-type/default-init-by-index type field-name-index))) diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index 06cedd430..4a590e062 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -3738,7 +3738,6 @@ USA. condition-type:slot-error condition-type:uninitialized-slot copy-record - define-structure/default-value define-structure/default-value-by-index define-structure/keyword-constructor define-structure/list-accessor @@ -3759,8 +3758,6 @@ USA. record-keyword-constructor record-modifier record-predicate - record-type-default-inits - record-type-default-value record-type-default-value-by-index record-type-descriptor record-type-dispatch-tag -- 2.25.1