previous discussion: #85
Looking at the atomics proposal, there are a lot of operators that are only necessary because WASM doesn't have i8 and i16 value types. e.g. here are the operators for atomic adds:
i32.atomic.rmw8_s.add
i32.atomic.rmw8_u.add
i32.atomic.rmw16_s.add
i32.atomic.rmw16_u.add
i32.atomic.rmw.add
i64.atomic.rmw8_s.add
i64.atomic.rmw8_u.add
i64.atomic.rmw16_s.add
i64.atomic.rmw16_u.add
i64.atomic.rmw32_s.add
i64.atomic.rmw32_u.add
i64.atomic.rmw.add
If there were i8 and i16 value types, those could be simplified to:
i8.atomic.rmw.add
i16.atomic.rmw.add
i32.atomic.rmw.add
i64.atomic.rmw.add
The same applies to the atomic xchg, cmpxchg, load, sub, and, or, and xor operators.
Would folks consider adding i8 and i16 types that have a limited set of conversion operators meant for composition with the memory loads/stores? e.g. for i8:
i8.wrap/i32 / i8.wrap/i64
i32.extend_s/i8 / i64.extend_s/i8
i32.extend_u/i8 / i64.extend_u/i8
previous discussion: #85
Looking at the atomics proposal, there are a lot of operators that are only necessary because WASM doesn't have
i8andi16value types. e.g. here are the operators for atomic adds:i32.atomic.rmw8_s.addi32.atomic.rmw8_u.addi32.atomic.rmw16_s.addi32.atomic.rmw16_u.addi32.atomic.rmw.addi64.atomic.rmw8_s.addi64.atomic.rmw8_u.addi64.atomic.rmw16_s.addi64.atomic.rmw16_u.addi64.atomic.rmw32_s.addi64.atomic.rmw32_u.addi64.atomic.rmw.addIf there were
i8andi16value types, those could be simplified to:i8.atomic.rmw.addi16.atomic.rmw.addi32.atomic.rmw.addi64.atomic.rmw.addThe same applies to the atomic
xchg,cmpxchg,load,sub,and,or, andxoroperators.Would folks consider adding
i8andi16types that have a limited set of conversion operators meant for composition with the memory loads/stores? e.g. fori8:i8.wrap/i32/i8.wrap/i64i32.extend_s/i8/i64.extend_s/i8i32.extend_u/i8/i64.extend_u/i8