Previously, it was hardcoded at 'compile' time (in as much
Python has that). This would make it more difficult to add
stuff to it. Also, in a lot of places we made assumptions
about prelude instead of checking properly.
Now both dynamic and static arrays can be fully fold'ed.
Also adds support for type classes that have a function
argument.
Also, various usability improvements to WasmGenerator.
Also, integration tests now don't dump their stuff without
VERBOSE=1, this speeds up the tests suite by a factor of 9.
Also, tests can now set with_traces to add a number of
tracing functions for help debugging your code.
bytes continues to be the preferred name for u8[...].
Also, putting bytes values into the VM and taking them
out still uses Python bytes values.
This also lets used use the len function on them, for
whatever that's worth.
By annotating types with the constructor application
that was used to create them.
Later on we can use the router to replace compiler's
INSTANCES or for user defined types.
They look a lot like placeholders, but they exist before
the typing system takes place. And there's a (much smaller)
context to deal with.
For now, removes Placeholders in user function definitions
as they were not implemented.
Adds signature to function to try to get them closer to
type class methods. Already seeing some benefit in the
constraint generator.
Stricter zipping for safety.
Also adds the remaining unexposed WebAssembly opcodes as
comments (eqz, clz, ctz, popcnt, copysign).
This also means that BinaryOp.operator is now always
a type class method.
Prior to this PR, each type would have its own handwritten
test suite. The end result was that not all types were tested
for all situations.
This PR adds a framework based on a Markdown file, which
generates the basic tests for the types defined in json
files. These are auto generated and updated by the Makefile
before the test suite is run.
Also, a number of unsupported type combinations are now
supported.
Also, we now support negative literals.
Also, allocation calculation fixes for nested types.
Also, the test helpers can now properly import and export
typed variables such as bytes, static arrays and tuples. This
may come in handy when it comes to phasm platform wanting to
route data.
Also, adds better support for i8 type.
Also, started on a runtime.py, since there's quite some code
now that deals with compile time handling of WebAssembly stuff.
Also, minor improvement to the type constrains, namely we
better match 'tuple' literals with static array types.
Also, reduced spam when printing the type analysis results;
constraints that go back on the backlog are now no longer
printed one by one. It now also prints the end results of
the typing analysis.
Also, reorganized the big test_primitives test into type
classes.
Also, replaced pylint with ruff.
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.