Commit graph

41 commits

Author SHA1 Message Date
Lorenzo Torres
330d9b7711 Migrated to the new std.ArrayList implementation 2025-08-18 23:43:10 +02:00
luccie
f2fd7a3f1b [MODS/VM]: Explain magic values in f32_abs and f64_abs 2025-08-12 14:34:51 +02:00
luccie
20ee18b85e [MODS/VM]: Implement full support for FP by implementing casts and store 2025-08-12 14:31:33 +02:00
luccie
b6d95bc217 [MODS/VM]: Added floating point operators 2025-08-12 13:52:58 +02:00
luccie
1478c9c5d3 [MODS/VM]: Fixed issues between @bitcast and @intcast 2025-08-12 13:12:54 +02:00
luccie
4cf7faa307 [MODS/VM]: Make sure i*.store* truncate the value 2025-08-12 01:34:27 +02:00
luccie
32fcc30608 [MODS/VM]: Make sure that operators return i32 instead of i64 2025-08-12 01:26:05 +02:00
luccie
e7ab854262 [MODS/VM]: Added i64 math instructions and extending/wrap instructions 2025-08-12 01:11:39 +02:00
luccie
4383c0e13e [MODS/VM]: Add all i32 and i64 comparators 2025-08-12 00:49:28 +02:00
luccie
6e3bc89fcc [MODS/VM]: More load and store instructions 2025-08-12 00:24:08 +02:00
luccie
efbe4d8320 [MODS/VM]: Added ref instructions 2025-08-12 00:16:52 +02:00
luccie
799e07e0fd [MODS/VM]: Changed calls to external functions to also be in Runtime.call 2025-08-11 23:52:27 +02:00
luccie
3b8ea60141 [MODS/VM]: Get calls to deinit working and call deinit on sideros_cleanup 2025-08-11 23:07:52 +02:00
luccie
120da3e3cd [MAIN]: Rewrote init_mods to load tar archives and run main.wasm 2025-08-11 18:36:00 +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
e0fe639f0e [MODS/VM]: Remove debugging message 2025-08-10 22:53:01 +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
luccie-cmd
473c4aeffb [MODS/VM]: Actually respect the difference between signed and unsigned 2025-08-06 18:55:34 +02:00
luccie-cmd
8282a299b1 Rename preinit to init and add more instructions 2025-08-06 18:51:48 +02:00
luccie-cmd
98cbb47031 [MODS/WASM] Add some more instructions 2025-08-06 11:40:32 +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
83d91cfffe Fixed the functions 2025-08-04 20:48:35 +02:00
luccie-cmd
6f942fe9c2 Add full support for globals 2025-08-04 19:33:05 +02:00
luccie-cmd
94195fc774 Added support for global variables 2025-08-04 19:21:12 +02:00
luccie-cmd
e0d44a5f84 Added support for importing functions and begin working on a modding tools 2025-08-04 16:03:06 +02:00
luccie-cmd
139e5aacbc Add parameter handling and remove redundant comments 2025-08-03 16:14:50 +02:00
Lorenzo Torres
e7e0927a83 Updated the source for master 2025-08-01 21:38:27 +02:00
Ernesto Lanchares
25e51f9aea Modified how exports work and fixed memory leaks.
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-04-04 18:34:58 +02:00
luccie-cmd
28420f53b0 Added executing of and 2025-03-30 15:00:17 +02:00
luccie-cmd
2dc07080dd Add every single instruction prototype for WASM VM 2025-03-29 20:17:52 +01:00
Ernesto Lanchares
16343878cd Started adding all of IR opcodes 2025-03-29 19:31:08 +01:00
Ernesto Lanchares
7023261320 Changed structs in the VM 2025-03-29 19:16:17 +01:00
luccie-cmd
8d39d3d4d0 Added executing of mod IR in the WASM VM 2025-03-28 19:48:15 +01:00
Ernesto Lanchares
dd3dc54b05 Fixing format.
Should we run zig fmt as a prehook? or maybe after
pushing?
2025-03-27 17:04:49 +01:00
luccie-cmd
1db7f9e506 Fix branching and VM
Signed-off-by: luccie-cmd <luccie@sideros.org>
2025-03-27 13:57:37 +01:00
Lorenzo Torres
7660bc09bc fixed leb128 integer decoding 2025-03-23 22:40:03 +01:00
Ernesto Lanchares
b7854d7325 Big rework of the parser!
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.
2025-03-23 14:39:49 +01:00
luccie-cmd
94a4dc16c6 Fix formatting
Signed-off-by: luccie-cmd <luccie@sideros.org>
2025-03-21 22:49:43 +01:00
luccie-cmd
bbe9213573 Added block instruction in WASM VM
Signed-off-by: luccie-cmd <luccie@sideros.org>
2025-03-21 22:49:37 +01:00
Lorenzo Torres
1d64275dee Refactored source code structure. 2025-03-17 19:44:08 +01:00
Renamed from src/vm/vm.zig (Browse further)