4 /* Generated with PRIMITIVE in primitives.cpp */
6 #define EACH_PRIMITIVE(_) \
10 _(array_to_quotation) \
35 _(byte_array_to_bignum) \
40 _(callstack_to_array) \
46 _(compute_identity_hashcode) \
48 _(context_object_for) \
54 _(disable_gc_events) \
94 _(identity_hashcode) \
95 _(innermost_stack_frame_executing) \
96 _(innermost_stack_frame_scan) \
102 _(modify_code_heap) \
108 _(reset_dispatch_stats) \
110 _(resize_byte_array) \
115 _(save_image_and_exit) \
116 _(set_context_object) \
118 _(set_innermost_stack_frame_quot) \
121 _(set_special_object) \
122 _(set_string_nth_fast) \
127 _(strip_stack_traces) \
131 _(uninitialized_byte_array) \
136 #define EACH_ALIEN_PRIMITIVE(_) \
137 _(signed_cell,fixnum,from_signed_cell,to_fixnum) \
138 _(unsigned_cell,cell,from_unsigned_cell,to_cell) \
139 _(signed_8,s64,from_signed_8,to_signed_8) \
140 _(unsigned_8,u64,from_unsigned_8,to_unsigned_8) \
141 _(signed_4,s32,from_signed_4,to_fixnum) \
142 _(unsigned_4,u32,from_unsigned_4,to_cell) \
143 _(signed_2,s16,from_signed_2,to_fixnum) \
144 _(unsigned_2,u16,from_unsigned_2,to_cell) \
145 _(signed_1,s8,from_signed_1,to_fixnum) \
146 _(unsigned_1,u8,from_unsigned_1,to_cell) \
147 _(float,float,allot_float,to_float) \
148 _(double,double,allot_float,to_double) \
149 _(cell,void *,allot_alien,pinned_alien_offset)
151 #define DECLARE_PRIMITIVE(name) VM_C_API void primitive_##name(factor_vm *parent);
153 #define DECLARE_ALIEN_PRIMITIVE(name, type, from, to) \
154 DECLARE_PRIMITIVE(alien_##name) \
155 DECLARE_PRIMITIVE(set_alien_##name)
157 EACH_PRIMITIVE(DECLARE_PRIMITIVE)
158 EACH_ALIEN_PRIMITIVE(DECLARE_ALIEN_PRIMITIVE)