| Age | Commit message (Collapse) | Author |
|
Fixed an issue whereby an option constructor that was never
constructed, but only matched on, would cause compilation to
fail. Temporarily fixed an issue where union types that can be
entirely stack-allocated were not being treated as such, by simply
heap-allocating all unions. Need to adapt the code generator to handle
this case properly. Fixed a further small issue whereby multiple union
types would confuse the type specialisation pass.
Added a test case for compiling option types.
RISCV now generates C code, but there are still some bugs that need to
be squashed before it compile and work.
|
|
Also work on making C backend compile RISC-V
|
|
Can now handle when an instantiation introduces more polymorphism. We
can now deal with the case where, for example, a type variable gets
specialised in two two steps, e.g. 'a => list('a) => list(int). Also
handle the case where a Type-kinded type variable gets substituted
with an Int-polymorphic type, e.g. 'a => atom('n).
This also fixes an issue where specialisation would loop due to
generated type variable names. This was fixed by ensuring that when we
convert an instantiation to a string to name the newly specialised
definition, we ensure that any alpha-equivalent instantiations map to
the same name.
|
|
|
|
|
|
|
|
Also updated some of the documentation in the sail source code
|
|
This removes all type polymorphism, so we can generate optimized
bitvector code and compile to languages without parametric
polymorphism.
|
|
This change allows the AST to be type-checked after sizeof
re-writing. It modifies the unification algorithm to better support
checking multiplication in constraints, by using division and modulus
SMT operators if they are defined.
Also made sure the typechecker doesn't re-introduce E_constraint
nodes, otherwise re-checking after sizeof-rewriting will re-introduce
constraint nodes.
|