4 /* Generated with PRIMITIVE in primitives.cpp */
6 #define EACH_PRIMITIVE(_) \
10 _(array_to_quotation) \
34 _(byte_array_to_bignum) \
39 _(callstack_to_array) \
45 _(compute_identity_hashcode) \
47 _(context_object_for) \
53 _(disable_gc_events) \
92 _(identity_hashcode) \
93 _(innermost_stack_frame_executing) \
94 _(innermost_stack_frame_scan) \
100 _(modify_code_heap) \
106 _(reset_dispatch_stats) \
108 _(resize_byte_array) \
113 _(save_image_and_exit) \
114 _(set_context_object) \
116 _(set_innermost_stack_frame_quot) \
119 _(set_special_object) \
120 _(set_string_nth_fast) \
125 _(strip_stack_traces) \
129 _(uninitialized_byte_array) \
134 #define EACH_ALIEN_PRIMITIVE(_) \
135 _(signed_cell,fixnum,from_signed_cell,to_fixnum) \
136 _(unsigned_cell,cell,from_unsigned_cell,to_cell) \
137 _(signed_8,s64,from_signed_8,to_signed_8) \
138 _(unsigned_8,u64,from_unsigned_8,to_unsigned_8) \
139 _(signed_4,s32,from_signed_cell,to_fixnum) \
140 _(unsigned_4,u32,from_unsigned_cell,to_cell) \
141 _(signed_2,s16,from_signed_cell,to_fixnum) \
142 _(unsigned_2,u16,from_unsigned_cell,to_cell) \
143 _(signed_1,s8,from_signed_cell,to_fixnum) \
144 _(unsigned_1,u8,from_unsigned_cell,to_cell) \
145 _(float,float,allot_float,to_float) \
146 _(double,double,allot_float,to_double) \
147 _(cell,void *,allot_alien,pinned_alien_offset)
149 #define DECLARE_PRIMITIVE(name) VM_C_API void primitive_##name(factor_vm *parent);
151 #define DECLARE_ALIEN_PRIMITIVE(name, type, from, to) \
152 DECLARE_PRIMITIVE(alien_##name) \
153 DECLARE_PRIMITIVE(set_alien_##name)
155 EACH_PRIMITIVE(DECLARE_PRIMITIVE)
156 EACH_ALIEN_PRIMITIVE(DECLARE_ALIEN_PRIMITIVE)