summaryrefslogtreecommitdiff
path: root/src/mods/Parser.zig
AgeCommit message (Collapse)Author
2025-04-04Modified how exports work and fixed memory leaks.Ernesto Lanchares
Now exports are already defined by the mods api (something like preinit, init, preframe, postframe, deinit should be enough functions). At the moment we only support preinit function.
2025-03-29Changed structs in the VMErnesto Lanchares
2025-03-28Added executing of mod IR in the WASM VMluccie-cmd
2025-03-27IR can now parse itself. :)Ernesto Lanchares
Now we have to reimplement the vm. :_)
2025-03-27Removed IR parsing and changed fatal bug of i64s being detected as i32sluccie-cmd
Signed-off-by: luccie-cmd <luccie@sideros.org>
2025-03-24Some progress on IR parsing.Ernesto Lanchares
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-23PROPOSAL: IRErnesto Lanchares
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-23Big rework of the parser!Ernesto Lanchares
It now follows a more functional style but it should be waaay easier to add functionality. Probably the parser is a bit slower than the previous one but the code is much cleaner and a good enough compiler should be able to inline the function calls and make it par with the previous one. As a TODO, runtime structs should not depends on the parser, but I think that is a topic for another commit.