diff options
author | Thomas Lively <tlively@google.com> | 2024-07-16 16:30:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-16 13:30:36 -0700 |
commit | 53b7dd1f0f129f0304a045ea00ce92334c01fb75 (patch) | |
tree | c23e8f057a7863291d897b30b497a18f39ed6b39 /src | |
parent | 9de9d05de2f6780ac6d1394528b7e38223edf22b (diff) | |
download | binaryen-53b7dd1f0f129f0304a045ea00ce92334c01fb75.tar.gz binaryen-53b7dd1f0f129f0304a045ea00ce92334c01fb75.tar.bz2 binaryen-53b7dd1f0f129f0304a045ea00ce92334c01fb75.zip |
[threads] Update TypeSSA for shared types (#6753)
When creating a new subtype, make sure to copy the supertype's
shareability.
Diffstat (limited to 'src')
-rw-r--r-- | src/passes/TypeSSA.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/passes/TypeSSA.cpp b/src/passes/TypeSSA.cpp index 3736f3ccf..dcd56f5d6 100644 --- a/src/passes/TypeSSA.cpp +++ b/src/passes/TypeSSA.cpp @@ -251,10 +251,13 @@ struct TypeSSA : public Pass { auto oldType = curr->type.getHeapType(); if (oldType.isStruct()) { builder[i] = oldType.getStruct(); - } else { + } else if (oldType.isArray()) { builder[i] = oldType.getArray(); + } else { + WASM_UNREACHABLE("unexpected type kind"); } builder[i].subTypeOf(oldType); + builder[i].setShared(oldType.getShared()); builder[i].setOpen(); } builder.createRecGroup(0, num); |