wabt
8c8e8fdf - Align `memory.copy` arg types with `memory64` proposal (#2024)

Commit
3 years ago
Align `memory.copy` arg types with `memory64` proposal (#2024) When both the multi-memory and memory64 features are enabled it's possible for memory.copy to copy between two memories of different types. In this case, the memory64 proposal specifies that the src and dst arguments should correspond to the types of the memory they are accessing, and the size argument should correspond to the "minimum" of the two memory types [1]. That is, the size should be an i32 if either of the memories has type i32 and it should be i64 if both of the memories have type i64. The existing code just expects all three arguments to match the type of the source memory which works whenever the source and destination memories have the same type. This change adjusts that logic to agree with the memory64 proposal in the cases where the two memories have differing types. [1] https://github.com/WebAssembly/memory64/blob/5bfb70d9888b96a2f3d6412ed3599b91364da610/proposals/memory64/Overview.md?plain=1#L211
Parents
Loading