4 /* Generated with PRIMITIVE in primitives.cpp */
5 #define EACH_PRIMITIVE(_) \
9 _(array_to_quotation) \
34 _(byte_array_to_bignum) \
38 _(callstack_to_array) \
44 _(compute_identity_hashcode) \
49 _(disable_gc_events) \
89 _(identity_hashcode) \
90 _(innermost_stack_frame_executing) \
91 _(innermost_stack_frame_scan) \
103 _(reset_dispatch_stats) \
105 _(resize_byte_array) \
109 _(save_image_and_exit) \
110 _(set_context_object) \
112 _(set_innermost_stack_frame_quot) \
115 _(set_special_object) \
116 _(set_string_nth_fast) \
117 _(set_string_nth_slow) \
123 _(strip_stack_traces) \
128 _(uninitialized_byte_array) \
133 /* These are generated with macros in alien.cpp, and not with PRIMIIVE in
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,from_float,to_float) \
148 _(double,double,from_double,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)