skully: fix various bugs - #173
Conversation
Both embedded unions and records had incorrect sizes and alignments computed for them. None of the current passes cared, hence this causing no problems, but the LLVM code generator does care. The size and alignment for embedded records/union is now computed correctly.
Pointer-like variables were initialized with integer values.
It was treated as a no-op, while it's actually a numeric conversion.
There were various places missed when adjusting skully to the new pointer types.
* properly handle imported types * consider float types (which also cannot be truncated/extended)
|
Most of these problems were found as part of #146, thanks to the stronger type system (when compared to the VM) of LLVM. Most of the issues would have also been caught by a type checking pass that Testing Ultimately, |
Summary
Fix various bugs with
skully. For the most part, they were aboutincorrect code being emitted, resulting in misbehaving programs.
Details
compilation, at the moment)
nilnot being handled in constants, causing a crashNilin various placesordnot being translated to a conversionmDestroyaccessing the wrong fieldcastwhere at least one operand isa float or imported type