3 ms·
Please, does anyone know: - Why the chose stack-based VM, rather than register-based one? - I see the docs mention Float128 type, is this a real possibility?
by pettou 10y ago
Please, does anyone know:
- Why the chose stack-based VM, rather than register-based one?
- I see the docs mention Float128 type, is this a real possibility? What it their opinion on having Float128?
- there doesn't seem to be any support for ADC instruction ("add with carry") which would be very useful for implementing multi-precision numeric types. Are the plans to support ADC and the like or not? How to implement, say BigInt, with WebAssembly?
- maybe I misunderstood but when adding two integers result in an overflow, does it trigger the "trap"? I mean, lot of time (e.g. modular arithmetic) one does what fast "wrap around" (i.e. modulo 2^INT_SIZE) in integer types. Is this behaviour (of C) going to stay in WebAssembly?
- wahern 10y agoSigned integers in C don't wrap around. That's undefined behavior. Unsigned integers behave modulo 2^n, so if you want wrap around in C you should be using unsigned integers. Any C compiler to WebAssembly would have to implement unsigned behavior regardless of the semantics of WebAssembly's native unsigned operations. For information on the semantics of WebAssembly arithmetic, see https://github.com/WebAssembly/design/blob/master/Semantics.md#32-bit-integer-operators https://github.com/WebAssembly/design/blob/master/Semantics.... For other information about WebAssembly start here https://github.com/WebAssembly/design/ https://github.com/WebAssembly/design/