From cabc7f4dcc68b35e26406befd6c3fc308cca779a Mon Sep 17 00:00:00 2001 From: Stephen Adams Date: Wed, 15 Oct 1997 00:52:15 +0000 Subject: [PATCH] Added primitives VECTOR? and %RECORD? --- v7/src/microcode/vector.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/v7/src/microcode/vector.c b/v7/src/microcode/vector.c index 56bdee99f..5ca18360e 100644 --- a/v7/src/microcode/vector.c +++ b/v7/src/microcode/vector.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: vector.c,v 9.37 1996/10/02 18:59:08 cph Exp $ +$Id: vector.c,v 9.38 1997/10/15 00:52:15 adams Exp $ Copyright (c) 1987-96 Massachusetts Institute of Technology @@ -140,6 +140,22 @@ DEFINE_PRIMITIVE ("%RECORD", Prim_record, 0, LEXPR, 0) } } +DEFINE_PRIMITIVE ("VECTOR?", Prim_vector_p, 1, 1, 0) +{ + fast SCHEME_OBJECT object; + PRIMITIVE_HEADER (1); + TOUCH_IN_PRIMITIVE ((ARG_REF (1)), object); + PRIMITIVE_RETURN (BOOLEAN_TO_OBJECT (VECTOR_P (object))); +} + +DEFINE_PRIMITIVE ("%RECORD?", Prim_record_p, 1, 1, 0) +{ + fast SCHEME_OBJECT object; + PRIMITIVE_HEADER (1); + TOUCH_IN_PRIMITIVE ((ARG_REF (1)), object); + PRIMITIVE_RETURN (BOOLEAN_TO_OBJECT (RECORD_P (object))); +} + DEFINE_PRIMITIVE ("SYSTEM-VECTOR?", Prim_sys_vector, 1, 1, 0) { fast SCHEME_OBJECT object; -- 2.25.1