Commit graph

16 commits

Author SHA1 Message Date
Ernesto Lanchares
939cdb5f09 Fixed macOS compilation and refactored mods/ir to use std.Io.Reader.
Signed-off-by: Lorenzo Torres <lorenzotorres@outlook.it>
2025-08-30 15:31:44 +02:00
luccie
c12e5ef485 [MODS/PARSING]: Moved over to std.Io.Reader interface for upcoming zig update 2025-08-26 01:15:06 +02:00
luccie
7836ebfcd3 [MODS]: Make sure only runtime and parser need to be defer freed 2025-08-10 23:28:57 +02:00
luccie
d8642bfe0a [MODS/IR]: Fix a bug in fix_branches_for_block 2025-08-10 22:52:04 +02:00
luccie
b39fb34942 Added support for parsing tables 2025-08-10 22:10:23 +02:00
Lorenzo Torres
162800ac83 fixed formatting in mods/ir.zig 2025-08-07 04:08:45 +02:00
luccie-cmd
a295365993 [MODS/WASM]: Get tables, elems, data and more VM instructions working 2025-08-05 22:59:41 +02:00
luccie-cmd
94195fc774 Added support for global variables 2025-08-04 19:21:12 +02:00
luccie-cmd
916115c7cd Added parsing of and 2025-03-30 15:00:17 +02:00
Ernesto Lanchares
237ead3921 Fixed an error during ir parsing. 2025-03-30 14:36:51 +02:00
Ernesto Lanchares
7023261320 Changed structs in the VM 2025-03-29 19:16:17 +01:00
Ernesto Lanchares
6fe4855a67 IR can now parse itself. :)
Now we have to reimplement the vm. :_)
2025-03-27 17:05:50 +01:00
Ernesto Lanchares
09691ec4d9 Some progress on IR parsing.
Alhtough IR parsing is technically called while
parsing, since we lack the hability to parse
blocks or labels or if or any hard stuff really,
it does not affect code parsing. However it is
nice to have it there as zig compiles it :)
2025-03-24 22:38:12 +01:00
Ernesto Lanchares
942bb3525d Proposal for vector instructions IR
This proposal drops the memory alignment from u32
that is required by spec to a u16. But I think
u16 should be more than enough to represent any
real alignment.

Also this is closer to a custom asm than a IR but
whatever...
2025-03-24 19:41:17 +01:00
Lorenzo Torres
7660bc09bc fixed leb128 integer decoding 2025-03-23 22:40:03 +01:00
Ernesto Lanchares
874134f3ff PROPOSAL: IR
This is a proposal of a custom IR to run wasm.
At the moment only `ir.zig` has some parts related
to this IR. The idea of the IR is to be a subset
of the one defined in wasm. There are some gaps
(mostly in wasm instructions that have opcode
0xFC) but in wasm they don't use all of the
opcodes for some reason so maybe we could try to
utilize them and be a superset of wasm.
2025-03-23 19:32:10 +01:00