Ruby: wasm/machine.h Source File

Ruby 3.2.5p208 (2024-07-26 revision 31d0f1a2e7dbfb60731d1f05b868e1d578cda493)

machine.h
1#ifndef RB_WASM_SUPPORT_MACHINE_H
2#define RB_WASM_SUPPORT_MACHINE_H
3
4// Function pointer used as scan callbacks
5typedef void (*rb_wasm_scan_func)(void*, void*);
6
7// Scan WebAssembly locals in the all call stack (like registers) spilled by Asyncify
8// Used by conservative GC
9void rb_wasm_scan_locals(rb_wasm_scan_func scan);
10
11// Get base address of userland C-stack memory space in WebAssembly. Used by conservative GC
12void *rb_wasm_stack_get_base(void);
13
14
15// Get the current stack pointer
16void *rb_wasm_get_stack_pointer(void);
17
18// Set the current stack pointer
19void rb_wasm_set_stack_pointer(void *sp);
20
21// Returns the Asyncify buffer of next rewinding if unwound for spilling locals.
22// Used by the top level Asyncify handling in wasm/runtime.c
23void *rb_wasm_handle_scan_unwind(void);
24
25#endif