aboutsummaryrefslogtreecommitdiff
path: root/src/routines
Commit message (Collapse)AuthorAgeFilesLines
* section.c: Remove debug logHEADmasterXavier Del Campo Romero2026-02-161-1/+0
| | | | | This call to nwp_log was only meant for debugging purposes during early versions of the library.
* Add br_tableXavier Del Campo Romero2025-11-151-3/+5
| | | | | | | | | br_table is in fact a generalization of other branch types like br or br_if, since br_table contains several branches for the same pc inside the nw_lo section. Therefore, this kind of branch forced some changes to nwp_break and those relying on it.
* call_import.c: Fix prev_retXavier Del Campo Romero2025-11-121-2/+8
| | | | | | | So far, this variable was only being assigned by unwind.c, which is called only for WebAssembly functions. However, it is still mandatory to report the last returned value from imported functions, too, as prev_ret is relied upon by operators such as `drop`.
* Add if and else operatorsXavier Del Campo Romero2025-11-101-7/+10
|
* call_import.c: Always set ci->pcXavier Del Campo Romero2025-11-091-2/+2
| | | | | | Otherwise, imports without parameters would jump to `call` directly without assigning ci->pc first, so that nwp_interp_resume would read incorrectly from offset 0.
* set_local.c: Fix set_param to valid nextXavier Del Campo Romero2025-11-071-1/+1
| | | | | | | | | | | set_local is meant to write a local variable, while allowing the use of a caller-defined callback when finished. While this was already correctly implemented by set_local, set_param was incorrectly calling nwp_interp_resume instead of the caller-defined callback. This had the side effect of tee_local not being able to push the value into the stack when the local index referred to a parameter, thus causing undefined behaviour.
* First commitXavier Del Campo Romero2025-11-0645-0/+5588