From 328647ff47c30f2940335ea49e2483d9907de85b Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 2 Dec 1992 20:21:45 +0000 Subject: [PATCH] Add support for RECORD objects. --- v7/src/runtime/record.scm | 5 ++++- v7/src/runtime/runtime.pkg | 3 ++- v7/src/sf/usiexp.scm | 5 ++++- v8/src/runtime/runtime.pkg | 3 ++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/v7/src/runtime/record.scm b/v7/src/runtime/record.scm index 55fbf847c..d4c3bbcd8 100644 --- a/v7/src/runtime/record.scm +++ b/v7/src/runtime/record.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: record.scm,v 1.14 1992/12/02 19:43:32 cph Exp $ +$Id: record.scm,v 1.15 1992/12/02 20:21:17 cph Exp $ Copyright (c) 1989-1992 Massachusetts Institute of Technology @@ -46,6 +46,9 @@ MIT in each case. |# (%record-ref 2) (%record-set! 3)) +(define-integrable (%vector? object) + (object-type? (ucode-type record) object)) + (define (initialize-package!) (set! record-type-marker ((ucode-primitive string->symbol) diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index 8fb4665c3..0f2a77529 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.164 1992/12/02 19:44:11 cph Exp $ +$Id: runtime.pkg,v 14.165 1992/12/02 20:21:45 cph Exp $ Copyright (c) 1988-1992 Massachusetts Institute of Technology @@ -1693,6 +1693,7 @@ MIT in each case. |# %record-length %record-ref %record-set! + %record? make-record-type record-accessor record-constructor diff --git a/v7/src/sf/usiexp.scm b/v7/src/sf/usiexp.scm index 556c3c3f3..4c8236059 100644 --- a/v7/src/sf/usiexp.scm +++ b/v7/src/sf/usiexp.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: usiexp.scm,v 4.10 1992/11/04 10:17:40 jinx Exp $ +$Id: usiexp.scm,v 4.11 1992/12/02 20:20:38 cph Exp $ Copyright (c) 1988-1992 Massachusetts Institute of Technology @@ -392,6 +392,7 @@ MIT in each case. |# (define char?-expansion (type-test-expansion (ucode-type character))) (define vector?-expansion (type-test-expansion (ucode-type vector))) +(define %record?-expansion (type-test-expansion (ucode-type record))) (define weak-pair?-expansion (type-test-expansion (ucode-type weak-cons))) (define flo:flonum?-expansion (type-test-expansion (ucode-type big-flonum))) (define fix:fixnum?-expansion (type-test-expansion (ucode-type fixnum))) @@ -445,6 +446,7 @@ MIT in each case. |# (define usual-integrations/expansion-names '( + %record? * + - @@ -522,6 +524,7 @@ MIT in each case. |# (define usual-integrations/expansion-values (list + %record?-expansion *-expansion +-expansion --expansion diff --git a/v8/src/runtime/runtime.pkg b/v8/src/runtime/runtime.pkg index 8fb4665c3..0f2a77529 100644 --- a/v8/src/runtime/runtime.pkg +++ b/v8/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.164 1992/12/02 19:44:11 cph Exp $ +$Id: runtime.pkg,v 14.165 1992/12/02 20:21:45 cph Exp $ Copyright (c) 1988-1992 Massachusetts Institute of Technology @@ -1693,6 +1693,7 @@ MIT in each case. |# %record-length %record-ref %record-set! + %record? make-record-type record-accessor record-constructor -- 2.25.1