Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Now we have to reimplement the vm. :_)
|
|
Should we run zig fmt as a prehook? or maybe after
pushing?
|
|
Signed-off-by: luccie-cmd <luccie@sideros.org>
|
|
Signed-off-by: luccie-cmd <luccie@sideros.org>
|
|
Signed-off-by: luccie-cmd <luccie@sideros.org>
|
|
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 :)
|
|
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...
|
|
|
|
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.
|
|
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.
|
|
Signed-off-by: luccie-cmd <luccie@sideros.org>
|
|
Signed-off-by: luccie-cmd <luccie@sideros.org>
|
|
|
|
|