summaryrefslogtreecommitdiff
path: root/scripts/auto_update_tests.py
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2024-11-21 15:55:52 -0800
committerGitHub <noreply@github.com>2024-11-21 15:55:52 -0800
commit7b12353fb2ef0240dd8bb3e6aaa764bc8408f9ad (patch)
treee2232de255f94ba6b1710f3e8ea6ee80b2c21b9e /scripts/auto_update_tests.py
parent4488a3e351214e038600f58e5806c31ad0bfae46 (diff)
downloadbinaryen-7b12353fb2ef0240dd8bb3e6aaa764bc8408f9ad.tar.gz
binaryen-7b12353fb2ef0240dd8bb3e6aaa764bc8408f9ad.tar.bz2
binaryen-7b12353fb2ef0240dd8bb3e6aaa764bc8408f9ad.zip
Fix printing of unreachable br_on_cast{_fail} (#7102)
br_on_cast and br_on_cast_fail have two type annotations: one for their input type and one for their cast type. In cases where their operands were unreachable, we were previously printing "unreachable" for the input type annotation. This is not valid wat because "unreachable" is not a reference type. To fix the problem, print the bottom type of the cast type's hierarchy as the input type for br_on_cast and br_on_cast_fail when the operand is unreachable. This ensures that the instructions have the most precise possible output type according to Wasm typing rules, so it maximizes the number of contexts in which the printed instructions are valid.
Diffstat (limited to 'scripts/auto_update_tests.py')
0 files changed, 0 insertions, 0 deletions