| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
This call to nwp_log was only meant for debugging purposes during
early versions of the library.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
WebAssembly defines how many pages of linear memory are owned by the
instance on startup. This limit can then be bumped via the grow_memory
operator.
Therefore, accesses outside the defined bounds are considered an
exception.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
This private function allows to decode an enum nw_type to a
human-readable string.
|
| | |
|
| |
|
|
|
|
|
| |
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`.
|
| |
|
|
|
|
| |
So far, exceptions coming from the pc callback were only being reported
on its first call. However, pc callbacks might assign a continuation
callback if the operation cannot be completed on a single call.
|
| |
|
|
|
|
|
|
| |
Assigning prev_op inside nwp_execute defeated the purpose because this
function is meant to start the state machine for the given instruction.
In other words, inspecting prev_op would in fact return the current
opcode, instead of the previous opcode.
|
| | |
|
| |
|
|
| |
This is redundant according to the C standard.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
| |
Otherwise, values such as 0x100000000 (i.e., the 32th-bit is set) would
not cause a branch because only the lower 32 bits would be tested.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|