75 Commits

Author SHA1 Message Date
Johan B.W. de Vries
9f21d0fd1d More work on type3 2022-11-24 15:43:23 +01:00
Johan B.W. de Vries
b5a28daebf Ripping out Type2 (type_var) system 2022-11-24 14:49:17 +01:00
Johan B.W. de Vries
79ff11f622 Started on attempt3 of the type system 2022-11-17 13:31:10 +01:00
Johan B.W. de Vries
55a45ff17c Trying out some things regarding StaticArray 2022-11-16 13:50:03 +01:00
Johan B.W. de Vries
312f7949bd Add mathematic edge case tests 2022-09-22 11:58:18 +02:00
Johan B.W. de Vries
bce3ed7ba1 Implements division
Division by zero is a trap on most runtimes, following
the Let it Crash philosophy
2022-09-22 11:50:38 +02:00
Johan B.W. de Vries
977c449c3f Removed redundant file 2022-09-19 14:55:05 +02:00
Johan B.W. de Vries
2a6da91eb9 Simplified locations, adds typing tests 2022-09-19 14:53:22 +02:00
Johan B.W. de Vries
4d3c0c6c3c StaticArray with constant index works again
Also, fix issue with f64 being parsed as f32
2022-09-19 14:43:15 +02:00
Johan B.W. de Vries
5da45e78c2 More work on StaticArray
Also naming fix, buildin => builtin.

Removes the use of ConstantStaticArray, as this was context dependent
2022-09-19 13:50:20 +02:00
Johan B.W. de Vries
4f7608a601 Fix: ModuleConstantDef type annotation was ignored 2022-09-19 12:29:48 +02:00
Johan B.W. de Vries
0097ce782d First work on restoring StaticArray
Removed the separate ModuleConstantRef since you can tell by the variable
property of VariableReference. We'll also add local variables there later
on.
2022-09-19 12:15:03 +02:00
Johan B.W. de Vries
299551db1b All primitive tests work again 2022-09-19 11:49:10 +02:00
Johan B.W. de Vries
906b15c93c Large cleanup to the tests
They are now better organized and easier to extend, I hope.
2022-09-19 11:16:34 +02:00
Johan B.W. de Vries
58f74d3e1d Restored function calling 2022-09-17 19:37:49 +02:00
Johan B.W. de Vries
4b46483895 Worked on floats 2022-09-17 19:21:56 +02:00
Johan B.W. de Vries
b2816164f9 Improved unification 2022-09-17 17:14:17 +02:00
Johan B.W. de Vries
2d0daf4b90 Fixes 2022-09-16 17:04:13 +02:00
Johan B.W. de Vries
7669f3cbca More framework stuff 2022-09-16 17:01:23 +02:00
Johan B.W. de Vries
48e16c38b9 FunctionParam is a class, more framework stuff 2022-09-16 16:43:40 +02:00
Johan B.W. de Vries
7acb2bd8e6 Framework sketch 2022-09-16 15:54:24 +02:00
Johan B.W. de Vries
7a8b1baa25 Some repo cleanup 2022-08-20 18:21:23 +02:00
Johan B.W. de Vries
e589223dbb Static Arrays. CRC32 compiles \o/
Doesn't give right answer yet and out of bound check fails.
No constructor yet for static arrays, but module constants
work. Which don't work yet for tuples and structs.

Also, u32 for indexing please.

Also, more module constant types.
2022-08-18 20:53:21 +02:00
Johan B.W. de Vries
c4ee2ab3dc Memory initialization is now done during compilation
Also, the user can now define tuple module constants
2022-08-17 21:07:33 +02:00
Johan B.W. de Vries
bac17f47eb ModuleConstant definitions and references 2022-08-16 21:25:03 +02:00
Johan B.W. de Vries
d051160244 Bit shifting 2022-08-16 20:55:20 +02:00
Johan B.W. de Vries
75d7e05519 First uint cast, more options for folding 2022-08-16 20:38:41 +02:00
Johan B.W. de Vries
ad6ca71c53 More bitwise ops. Steps towards CRC32 2022-08-12 21:50:42 +02:00
Johan B.W. de Vries
b6fb0d45b6 Implements foldl 2022-08-11 19:56:47 +02:00
Johan B.W. de Vries
0cf8a246fe Reworked compiler so it uses WasmGenerator
Also, started work on foldl

Also, added a missing FIXME
2022-08-10 20:51:01 +02:00
Johan B.W. de Vries
451a8e9158 Removes the old ___new_reference___ allocator 2022-08-09 20:42:02 +02:00
Johan B.W. de Vries
a13713d709 Cleanup to helpers, making use of runners 2022-08-09 19:04:40 +02:00
Johan B.W. de Vries
41b47e43d6 Implements RunnerWasmer, makes uses of its wat2wasm 2022-08-07 14:46:20 +02:00
Johan B.W. de Vries
0edd04c207 Adds RunnerWasmtime 2022-08-07 14:12:37 +02:00
Johan B.W. de Vries
58424cf2a0 Adds runner for pywasm 2022-08-06 20:50:43 +02:00
Johan B.W. de Vries
253974df24 Adds runner classes to tests, implements xor for u8, u32, u64 2022-08-06 20:11:39 +02:00
Johan B.W. de Vries
fea817ca00 Added more robust and easy way to generate WASM 2022-08-06 12:43:46 +02:00
Johan B.W. de Vries
e03f038cf9 More work on allocator 2022-08-04 20:51:59 +02:00
Johan B.W. de Vries
b42ae275b9 Start on new allocator 2022-08-04 20:09:01 +02:00
Johan B.W. de Vries
a83858aca7 Adds u32 and u64
Also, adds some range checks to constants.
2022-07-09 14:22:38 +02:00
Johan B.W. de Vries
89ad648f34 Moved rendering to codestyle, parsing to parser
Also, removed name argument when parsing, wasn't used.
2022-07-09 14:04:40 +02:00
Johan B.W. de Vries
d32613d9b8 We have a name \o/ 2022-07-09 12:35:32 +02:00
Johan B.W. de Vries
14eede6b06 Cleanup to wasm.py 2022-07-09 12:30:28 +02:00
Johan B.W. de Vries
c181c61040 Extended the import example a bit for sanity's sake 2022-07-09 11:34:20 +02:00
Johan B.W. de Vries
76d80f57cb Imports 2022-07-08 21:06:13 +02:00
Johan B.W. de Vries
374231d206 bytes, u8 types 2022-06-25 20:45:33 +02:00
Johan B.W. de Vries
467d409d80 Add tests for static checks 2022-06-24 21:53:18 +02:00
Johan B.W. de Vries
0da309a280 Remove old code 2022-06-19 17:04:20 +02:00
Johan B.W. de Vries
ac0c49a92c Now runs on new code 2022-06-19 16:54:14 +02:00
Johan B.W. de Vries
9dbdb11732 Simple calls 2022-06-19 15:25:58 +02:00