mkxp-z/binding-sandbox
刘皓 379c22833f
Store coroutine variables in the Ruby stack in libretro builds
To stop Ruby's garbage collector from freeing Ruby `VALUE`s while we're
in the middle of using them in libretro builds, we need to make sure all
the `VALUE`s we use are on the sandbox's stack.

Also, to allow Ruby to recognize `VALUE`s on the sandbox's stack on
big-endian targets, I've changed the serialization of `VALUE`s. Before,
any `VALUE`s returned by a sandbox function were always converted to the
target's endian, and any `VALUE`s passed to sandbox functions as
argument were then converted back to WebAssembly's endianness,
little-endian. Now, `VALUE`s are always little-endian; they are no
longer converted to the target's endianness. That should be fine since
`VALUE`s are supposed to be opaque values.
2025-01-19 19:08:03 -05:00
..
binding-sandbox.h Store coroutine variables in the Ruby stack in libretro builds 2025-01-19 19:08:03 -05:00
core.h Move sandbox files to binding-sandbox directory 2025-01-16 22:16:14 -05:00
sandbox.cpp Use different Ruby command-line arguments in libretro builds 2025-01-19 11:56:47 -05:00
sandbox.h Store coroutine variables in the Ruby stack in libretro builds 2025-01-19 19:08:03 -05:00
types.h Move sandbox files to binding-sandbox directory 2025-01-16 22:16:14 -05:00
wasi.cpp Move sandbox files to binding-sandbox directory 2025-01-16 22:16:14 -05:00
wasi.h Move sandbox files to binding-sandbox directory 2025-01-16 22:16:14 -05:00