RoyalIcing / Orb

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

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

Closed RoyalIcing closed 8 months ago

RoyalIcing commented 10 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 8 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 8 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.