diff options
| author | Nicholas Rodrigues Lordello <[email protected]> | 2026-10-30 13:16:18 +0100 |
|---|---|---|
| committer | Nicholas Rodrigues Lordello <[email protected]> | 2026-10-30 13:16:18 +0100 |
| commit | a64aa9dfa8abd7934f7969eaa2ee1086d4189eeb (patch) | |
| tree | 213a19870aa851510efd0349298d825f6bb6efa0 /src/wasmrt.h | |
| parent | 4bfe4900b80c17702d9e2c02b1740c790537d5bd (diff) | |
Fix Build for PS Vita Port
I forgot to commit the makefile configuration, and also added some
other small improvements to help with the poor performance (still
only around 20 FPS).
Diffstat (limited to 'src/wasmrt.h')
| -rw-r--r-- | src/wasmrt.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/wasmrt.h b/src/wasmrt.h index e56d17e..543a029 100644 --- a/src/wasmrt.h +++ b/src/wasmrt.h @@ -32,12 +32,20 @@ * overflows on systems with a small stack space. We should consider turning * this on in case we ever observe this issue. That being said, if we do get * into a situation where we observe a stack overflow, the game crashed anyway. + * + * We also set `WASM_RT_USE_MMAP`, even though we don't `mmap` anything: the + * generated code only uses it to decide whether it may cache the memory base + * pointer and size in local variables instead of reloading them after every + * store. This is safe as long as the memory never moves while an instance is + * running (there is no `memory.grow` and we refuse `emscripten_resize_heap`). + * Caching makes the PICO-8 run noticeably faster. */ #define WASM_RT_MEMCHECK_GUARD_PAGES 0 #define WASM_RT_MEMCHECK_BOUNDS_CHECK 1 #define WASM_RT_STACK_DEPTH_COUNT 0 #define WASM_RT_USE_SEGUE 0 +#define WASM_RT_USE_MMAP 1 #if SDL_BYTEORDER == SDL_LIL_ENDIAN #define WABT_BIG_ENDIAN 0 |
