More numeric types
Right now, HVM only supports U32. The numeric types above should be supported too. I32 and F32 should be easy to add, since they are unboxed, like U32. I64, U64 and F64 require implementing boxed numbers, since they don't fit inside a 64-bit Lnk (due to the 4-bit pointer), but shouldn't be hard. Discussion on whether we should have unboxed 60-bit variants is valid.
I'd be interested in adding support for at least the unboxed numeric types as this seems like a low hanging fruit. I just wanted to check what the concensus was between implicit/explicit casting and how operators should function in regards to mixed input types. My instinct would just be to cast up to the 'bigger' type but maybe operators should only operate on the same type - combined with explicit casts. @VictorTaelin what do you think?
Originally posted by @samtoth in https://github.com/Kindelia/HVM/issues/38#issuecomment-1037127813
- [ ] unboxed
- [ ] integer:
I32 - [ ] float:
F32
- [ ] integer:
- [ ] boxed
- [ ] integer:
U64,I64 - [ ] float:
F64
- [ ] integer: