diff options
author | Adam Bratschi-Kaye <adam.bratschikaye@dfinity.org> | 2022-11-01 19:07:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-01 18:07:25 +0000 |
commit | 8c8e8fdfb0911199ded02771629f84229d2e8197 (patch) | |
tree | 39068703e290c80c14337c68921809db9b5fed39 /src/binary-reader-logging.cc | |
parent | bc5bba0ac0a6357a3385d7ce0d950391e7d90f04 (diff) | |
download | wabt-8c8e8fdfb0911199ded02771629f84229d2e8197.tar.gz wabt-8c8e8fdfb0911199ded02771629f84229d2e8197.tar.bz2 wabt-8c8e8fdfb0911199ded02771629f84229d2e8197.zip |
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
Diffstat (limited to 'src/binary-reader-logging.cc')
0 files changed, 0 insertions, 0 deletions