projects
/
mit-scheme.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
24ceffe
)
Implement allocate-nm-vector.
author
Chris Hanson
<org/chris-hanson/cph>
Wed, 12 Apr 2017 04:46:38 +0000
(21:46 -0700)
committer
Chris Hanson
<org/chris-hanson/cph>
Wed, 12 Apr 2017 04:46:38 +0000
(21:46 -0700)
src/microcode/vector.c
patch
|
blob
|
history
diff --git
a/src/microcode/vector.c
b/src/microcode/vector.c
index ccb99d3a5ce52c391a955f7d12ce0037ed9684e8..b2ad7f2cf2b6323427cedaa7c2c801ca09079dc2 100644
(file)
--- 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)
}
}
\f
+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);