From 1b1849435663237ba28576199b56e9ec1005e354 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 11 Apr 2017 21:46:38 -0700 Subject: [PATCH] Implement allocate-nm-vector. --- src/microcode/vector.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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); -- 2.25.1