diff options
author | Thomas Lively <tlively@google.com> | 2024-11-14 21:22:34 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-14 18:22:34 -0800 |
commit | 49c45ac1675d787e7151f9beafcae479936aa9f3 (patch) | |
tree | 1abb2ebffdb57d43e92615f4a166dc61532dbeef /test/lit/debug | |
parent | 6efd41779272d2ac7eb75705c21c9f437a1409c9 (diff) | |
download | binaryen-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 'test/lit/debug')
-rw-r--r-- | test/lit/debug/source-map-smearing.wast | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/lit/debug/source-map-smearing.wast b/test/lit/debug/source-map-smearing.wast index 875bec9d3..eeeb49fea 100644 --- a/test/lit/debug/source-map-smearing.wast +++ b/test/lit/debug/source-map-smearing.wast @@ -11,7 +11,7 @@ ;; Check that the debug locations do not smear beyond a function ;; epilogue to the next function. The encoded segment 'C' means that ;; the previous segment is indeed one-byte long. -;; CHECK: {"version":3,"sources":["foo"],"names":[],"mappings":"yBAAC,C,GACC"} +;; CHECK: {"version":3,"sources":["foo"],"names":[],"mappings":"wBAAC,C,EACC"} (module (func $0 ;;@ foo:1:1 |