summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorClemens Backes <post@clemens-backes.de>2022-03-17 17:03:32 +0100
committerGitHub <noreply@github.com>2022-03-17 16:03:32 +0000
commit86acb00c7095017f8bded15def3c928909099731 (patch)
tree9ca997fdd792f556404065c76185973b57f6b066 /src
parente8cc7965ffdc8926734079f8188408140a04fe7a (diff)
downloadbinaryen-86acb00c7095017f8bded15def3c928909099731.tar.gz
binaryen-86acb00c7095017f8bded15def3c928909099731.tar.bz2
binaryen-86acb00c7095017f8bded15def3c928909099731.zip
[memory64] Keep type of memory.size and memory.grow on copy (#4531)
When copying a MemorySize or MemoryGrow instruction (e.g. for inlining), transfer the memory type also to the copy. Otherwise it will always be i32, even if memory64 should be used. This fixes issue #4530.
Diffstat (limited to 'src')
-rw-r--r--src/wasm-delegations-fields.def2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wasm-delegations-fields.def b/src/wasm-delegations-fields.def
index 3d7504c60..68e23fdd0 100644
--- a/src/wasm-delegations-fields.def
+++ b/src/wasm-delegations-fields.def
@@ -461,11 +461,13 @@ switch (DELEGATE_ID) {
}
case Expression::Id::MemorySizeId: {
DELEGATE_START(MemorySize);
+ DELEGATE_FIELD_TYPE(MemorySize, ptrType);
DELEGATE_END(MemorySize);
break;
}
case Expression::Id::MemoryGrowId: {
DELEGATE_START(MemoryGrow);
+ DELEGATE_FIELD_TYPE(MemoryGrow, ptrType);
DELEGATE_FIELD_CHILD(MemoryGrow, delta);
DELEGATE_END(MemoryGrow);
break;