jit.h
Include dependency graph for jit.h:
This graph shows which files directly or indirectly include jit.h:
Defines
-
TYPEDEF_MODULE
-
JIT_FORMAT_VERSION 1
-
JIT_ARCH_X86_64 1
-
JIT_ARCH_AARCH64 2
-
JIT_VARIANT_PIC 1
Typedefs
-
typedef Context *(*ModuleNativeEntryPoint)(Context *ctx, JITState *jit_state, const ModuleNativeInterface *p)
Enums
Functions
-
ModuleNativeEntryPoint jit_stream_entry_point(Context *ctx, term jit_stream)
Return the entry point from a given jit stream.
Platform implementing JIT must provide this function which is called by code_server:set_native_code/2
- Parameters:
ctx – the current context (code_server)
jit_stream – the jit stream term
- Returns:
the pointer to the first function
-
enum TrapAndLoadResult jit_trap_and_load(Context *ctx, Module *mod, uint32_t label)
Trap a process and load module, process shall be resumed at given label.
- Parameters:
ctx – the process to trap
mod – the module to load
label – the label to resume the process to
Variables
-
const ModuleNativeInterface module_native_interface
-
struct JITState
- #include <jit.h>
Collaboration diagram for JITState:
-
struct ModuleNativeInterface
- #include <jit.h>
Collaboration diagram for ModuleNativeInterface:
Public Members
-
Context *(*call_ext)(Context *ctx, JITState *jit_state, int offset, int arity, int index, int n_words)
-
bool (*allocate)(Context *ctx, JITState *jit_state, uint32_t stack_need, uint32_t heap_need, uint32_t live)
-
TermCompareResult (*term_compare)(Context *ctx, JITState *jit_state, term t, term other, TermCompareOpts opts)
-
Context *(*raise_error_tuple)(Context *ctx, JITState *jit_state, int offset, term error_atom, term arg1)
-
Context *(*call_fun)(Context *ctx, JITState *jit_state, int offset, term fun, unsigned int args_count)
-
bool (*term_is_number)(term t)
-
bool (*memory_ensure_free_with_roots)(Context *ctx, JITState *jit_state, int sz, int live, int flags)
-
term (*bitstring_extract_integer)(Context *ctx, JITState *jit_state, term *bin_ptr, size_t offset, int n, int bs_flags)
-
size_t (*term_sub_binary_heap_size)(term *bin_ptr, size_t size)
-
int (*bitstring_utf8_size)(int c)
-
int (*bitstring_utf16_size)(int c)
-
int (*bitstring_insert_utf8)(term bin, size_t offset, int c)
-
int (*bitstring_insert_utf16)(term bin, size_t offset, int c, enum BitstringFlags flags)
-
bool (*bitstring_insert_utf32)(term bin, size_t offset, uint32_t c, enum BitstringFlags flags)
-
bool (*bitstring_insert_integer)(term bin, size_t offset, avm_int64_t value, size_t n, enum BitstringFlags flags)
-
avm_int64_t (*term_maybe_unbox_int64)(term i)
-
void (*bitstring_copy_module_str)(Context *ctx, JITState *jit_state, term bin, size_t offset, int str_id, size_t len)
-
int (*bitstring_copy_binary)(Context *ctx, JITState *jit_state, term t, size_t offset, term src, term size)
-
Context *(*apply)(Context *ctx, JITState *jit_state, int offset, term module, term function, unsigned int arity)
-
void (*free)(void *ptr)
-
term (*put_map_assoc)(Context *ctx, JITState *jit_state, term src, size_t new_entries, size_t num_elements, term *kv)
-
bool (*bitstring_match_module_str)(Context *ctx, JITState *jit_state, term bin, size_t offset, int str_id, size_t len)
-
term (*bitstring_get_utf8)(term src)
-
term (*bitstring_get_utf16)(term src, int flags_value)
-
term (*bitstring_get_utf32)(term src, int flags_value)
-
Context *(*call_ext)(Context *ctx, JITState *jit_state, int offset, int arity, int index, int n_words)