From: Stephen Adams Date: Wed, 15 Oct 1997 00:52:15 +0000 (+0000) Subject: Added primitives VECTOR? and %RECORD? X-Git-Tag: 20090517-FFI~4997 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=cabc7f4dcc68b35e26406befd6c3fc308cca779a;p=mit-scheme.git Added primitives VECTOR? and %RECORD? --- 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;