]> gitweb.factorcode.org Git - factor.git/blob - vm/primitives.hpp
vm: replace block comments /**/ with line comments //
[factor.git] / vm / primitives.hpp
1 namespace factor {
2
3 // Generated with PRIMITIVE in primitives.cpp
4
5 #define EACH_PRIMITIVE(_)                                                      \
6   _(alien_address) _(all_instances) _(array) _(array_to_quotation) _(become)   \
7       _(bignum_add) _(bignum_and) _(bignum_bitp) _(bignum_divint)              \
8       _(bignum_divmod) _(bignum_eq) _(bignum_greater) _(bignum_greatereq)      \
9       _(bignum_less) _(bignum_lesseq) _(bignum_log2) _(bignum_mod)             \
10       _(bignum_gcd) _(bignum_multiply) _(bignum_not) _(bignum_or)              \
11       _(bignum_shift) _(bignum_subtract) _(bignum_to_fixnum)                   \
12       _(bignum_to_fixnum_strict) _(bignum_xor) _(bits_double) _(bits_float)    \
13       _(byte_array) _(callback) _(callback_room)                               \
14       _(callstack_bounds) _(callstack_for) _(callstack_to_array)               \
15       _(check_datastack) _(clone) _(code_blocks) _(code_room)                  \
16       _(compact_gc) _(compute_identity_hashcode) _(context_object)             \
17       _(context_object_for) _(current_callback) _(data_room)                   \
18       _(datastack_for) _(die) _(disable_gc_events) _(dispatch_stats)           \
19       _(displaced_alien) _(dlclose) _(dll_validp) _(dlopen) _(dlsym)           \
20       _(dlsym_raw) _(double_bits) _(enable_gc_events) _(existsp) _(exit)       \
21       _(fclose) _(fflush) _(fgetc) _(fixnum_divint) _(fixnum_divmod)           \
22       _(fixnum_shift) _(fixnum_to_bignum) _(fixnum_to_float) _(float_add)      \
23       _(float_bits) _(float_divfloat) _(float_eq) _(float_greater)             \
24       _(float_greatereq) _(float_less) _(float_lesseq) _(float_multiply)       \
25       _(float_subtract) _(float_to_bignum) _(float_to_fixnum) _(fopen)         \
26       _(format_float) _(fputc) _(fread) _(free_callback) _(fseek) _(ftell)     \
27       _(full_gc) _(fwrite) _(get_samples) _(identity_hashcode)                 \
28       _(innermost_stack_frame_executing) _(innermost_stack_frame_scan)         \
29       _(jit_compile) _(load_locals) _(lookup_method) _(mega_cache_miss)        \
30       _(minor_gc) _(modify_code_heap) _(nano_count) _(quotation_code)          \
31       _(quotation_compiled_p) _(reset_dispatch_stats) _(resize_array)          \
32       _(resize_byte_array) _(resize_string) _(retainstack_for)                 \
33       _(sampling_profiler) _(save_image) _(set_context_object)                 \
34       _(set_datastack) _(set_innermost_stack_frame_quotation)                  \
35       _(set_retainstack) _(set_slot) _(set_special_object)                     \
36       _(set_string_nth_fast) _(size) _(sleep) _(special_object) _(string)      \
37       _(strip_stack_traces) _(tuple) _(tuple_boa) _(unimplemented)             \
38       _(uninitialized_byte_array) _(word) _(word_code) _(word_optimized_p)     \
39       _(wrapper)
40
41 #define EACH_ALIEN_PRIMITIVE(_)                               \
42       _(signed_cell, fixnum, from_signed_cell, to_fixnum)     \
43       _(unsigned_cell, cell, from_unsigned_cell, to_cell)     \
44       _(signed_8, int64_t, from_signed_8, to_signed_8)        \
45       _(unsigned_8, uint64_t, from_unsigned_8, to_unsigned_8) \
46       _(signed_4, int32_t, from_signed_cell, to_fixnum)       \
47       _(unsigned_4, uint32_t, from_unsigned_cell, to_cell)    \
48       _(signed_2, int16_t, from_signed_cell, to_fixnum)       \
49       _(unsigned_2, uint16_t, from_unsigned_cell, to_cell)    \
50       _(signed_1, int8_t, from_signed_cell, to_fixnum)        \
51       _(unsigned_1, uint8_t, from_unsigned_cell, to_cell)     \
52       _(float, float, allot_float, to_float)                  \
53       _(double, double, allot_float, to_double)               \
54       _(cell, cell, allot_alien, pinned_alien_offset)
55
56 #define DECLARE_PRIMITIVE(name) \
57   VM_C_API void primitive_##name(factor_vm * parent);
58
59 #define DECLARE_ALIEN_PRIMITIVE(name, type, from, to) \
60   DECLARE_PRIMITIVE(alien_##name)                     \
61   DECLARE_PRIMITIVE(set_alien_##name)
62
63 EACH_PRIMITIVE(DECLARE_PRIMITIVE)
64 EACH_ALIEN_PRIMITIVE(DECLARE_ALIEN_PRIMITIVE)
65 }