wasm: `ptr_elem_val` use pointer type for local

When storing the address after calculating the element's address,
ensure it's stored in a local with the correct type. Previously it
would incorrectly use the element's type, which could be a float for
example and therefore generate invalid WebAssembly code.

This change also introduces a more robust `store` function.
969f921162Luuk de Gram committed on 5/31/2023, 4:04:32 PMparentffa89d3
1 file changedLine totals unavailable