From: Chris Hanson Date: Wed, 12 Apr 2017 04:46:38 +0000 (-0700) Subject: Implement allocate-nm-vector. X-Git-Tag: mit-scheme-pucked-9.2.12~158^2~55 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=1b1849435663237ba28576199b56e9ec1005e354;p=mit-scheme.git Implement allocate-nm-vector. --- diff --git a/src/microcode/vector.c b/src/microcode/vector.c index ccb99d3a5..b2ad7f2cf 100644 --- a/src/microcode/vector.c +++ b/src/microcode/vector.c @@ -93,6 +93,15 @@ make_vector (unsigned long length, SCHEME_OBJECT contents, bool gc_check_p) } } +DEFINE_PRIMITIVE ("ALLOCATE-NM-VECTOR", Prim_allocate_nm_vector, 2, 2, 0) +{ + PRIMITIVE_HEADER (2); + PRIMITIVE_RETURN + (allocate_non_marked_vector ((arg_ulong_index_integer (1, N_TYPE_CODES)), + (arg_ulong_index_integer (2, (1UL << DATUM_LENGTH))), + true)); +} + DEFINE_PRIMITIVE ("VECTOR-CONS", Prim_vector_cons, 2, 2, 0) { PRIMITIVE_HEADER (2);