grain-lang / grain

The Grain compiler toolchain and CLI. Home of the modern web staple. 🌾
https://grain-lang.org/
GNU Lesser General Public License v3.0
3.26k stars 113 forks source link

Add tagging functions for `Int32`, `Int64`, `Uint32`, `Uint64`, `WasmF32`, `WasmF64` #2157

Open spotandjake opened 2 weeks ago

spotandjake commented 2 weeks ago

We currently have tagging and untagging functions for the various stack allocated number types in DataStructures it would probably be beneificial if we added functions for the heap allocated ones as well. As we are not really tagging here it might make more sense to use something like loadInt32, loadInt64. These functions currently do exist in runtime/unsafe/conv it might make sense to re-export these from DataStructures so we have a single file giving us all of our primitive conversion functions.