LibWasm: Try really hard to avoid touching the value stack

This commit adds a register allocator, with 8 available "register"
slots.
In testing with various random blobs, this moves anywhere from 30% to
74% of value accesses into predefined slots, and is about a ~20% perf
increase end-to-end.

To actually make this usable, a few structural changes were also made:
- we no longer do one instruction per interpret call
- trapping is an (unlikely) exit condition
- the label and frame stacks are replaced with linked lists with a huge
  node cache size, as we only need to touch the last element and
  push/pop is very frequent.
This commit is contained in:
Ali Mohammad Pur 2025-08-02 20:30:44 +02:00 committed by Ali Mohammad Pur
parent 998454028c
commit 0e5ecef848
Notes: github-actions[bot] 2025-08-08 10:55:57 +00:00
9 changed files with 3217 additions and 1824 deletions

File diff suppressed because it is too large Load diff