summaryrefslogtreecommitdiff
path: root/src/wasm-type.h
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2024-11-14 21:22:34 -0500
committerGitHub <noreply@github.com>2024-11-14 18:22:34 -0800
commit49c45ac1675d787e7151f9beafcae479936aa9f3 (patch)
tree1abb2ebffdb57d43e92615f4a166dc61532dbeef /src/wasm-type.h
parent6efd41779272d2ac7eb75705c21c9f437a1409c9 (diff)
downloadbinaryen-49c45ac1675d787e7151f9beafcae479936aa9f3.tar.gz
binaryen-49c45ac1675d787e7151f9beafcae479936aa9f3.tar.bz2
binaryen-49c45ac1675d787e7151f9beafcae479936aa9f3.zip
Use empty blocks instead of nops for empty scopes in IRBuilder (#7080)
When IRBuilder builds an empty non-block scope such as a function body, an if arm, a try block, etc, it needs to produce some expression to represent the empty contents. Previously it produced a nop, but change it to produce an empty block instead. The binary writer and printer have special logic to elide empty blocks, so this produces smaller output. Update J2CLOpts to recognize functions containing empty blocks as trivial to avoid regressing one of its tests.
Diffstat (limited to 'src/wasm-type.h')
0 files changed, 0 insertions, 0 deletions