RoyalIcing / Orb

Write WebAssembly with Elixir
https://useorb.dev
BSD 3-Clause "New" or "Revised" License
174 stars 1 forks source link

Detect type of input for numbers operators instead of defaulting to i32 #15

Closed RoyalIcing closed 4 months ago

RoyalIcing commented 5 months ago

Currently integers default to I32. We should either default to I64 or add some smart inference so the correct one is automatically used.

RoyalIcing commented 4 months ago

I intend to detect the type passed into the operands to avoid this issue: https://github.com/RoyalIcing/Orb/issues/17

wasm_mode should be removed. We might still want a way to opt into a signed or unsigned integer mode somehow, since WebAssembly has both flavors.

RoyalIcing commented 4 months ago

With Orb v0.0.34 this has been fixed, by using the types of the passed values to determine what instructions to use.