Skip to main content

Module host_fns

Module host_fns 

Source

Enums§

RuntimeError
Runtime errors raised by JIT code via host functions.

Functions§

clear_gc_test_hook
Clear the GC test hook.
clear_stack_map_registry
Clear the stack map registry for the current thread.
gc_trigger
GC trigger: called by JIT code when alloc_ptr exceeds alloc_limit.
gc_trigger_call_count
Get gc_trigger call count. Only call from tests.
gc_trigger_last_vmctx
Get last vmctx passed to gc_trigger. Only call from tests.
heap_alloc
Heap allocation: called by JIT code for large or slow-path allocations.
heap_force
Force a thunk to WHNF.
host_fn_symbols
Return the list of host function symbols for JIT registration.
last_gc_roots
Get collected roots from the last gc_trigger call.
reset_test_counters
Reset test counters. Only call from tests.
runtime_error
Called by JIT code for runtime errors (divZeroError, overflowError). Sets a thread-local error flag and returns null. The effect machine checks this after JIT returns and converts to Yield::Error. kind: 0 = divZeroError, 1 = overflowError
set_gc_test_hook
Set a hook to be called during gc_trigger with the collected roots.
set_stack_map_registry
Set the stack map registry for the current thread.
take_runtime_error
Check and take any pending runtime error from JIT code.
unresolved_var_trap
Called by JIT code when an unresolved external variable is forced. Returns null to allow execution to continue (will likely segfault later). In debug mode (TIDEPOOL_TRACE), logs and returns null.