Ruby 3.5.0dev (2025-01-10 revision 5fab31b15e32622c4b71d1d347a41937e9f9c212)
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