diff options
author | Thomas Lively <tlively123@gmail.com> | 2024-12-02 16:03:21 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-03 00:03:21 +0000 |
commit | f331120e4b942a795d4a6b6d0d5a3d781c1e6a4c (patch) | |
tree | bb0a9a5b0d2bb19394d4259aa142796b7dd32461 /test | |
parent | 74782d217ed15dd73b58b1636c563aa51334a576 (diff) | |
download | binaryen-f331120e4b942a795d4a6b6d0d5a3d781c1e6a4c.tar.gz binaryen-f331120e4b942a795d4a6b6d0d5a3d781c1e6a4c.tar.bz2 binaryen-f331120e4b942a795d4a6b6d0d5a3d781c1e6a4c.zip |
Fixup block-nested pops even when EH is not enabled (#7130)
While parsing a binary file, there may be pops that need to be fixed up
even if EH is not (yet) enabled because the target features section has
not been parsed yet. Previously `EHUtils::handleBlockNestedPops` did not
do anything if EH was not enabled, so the binary parser would fail to
fix up pops in that case. Add an optional parameter to override this
behavior so the parser can fix up pops unconditionally.
Fixes #7127.
Diffstat (limited to 'test')
-rw-r--r-- | test/lit/binary/stacky-eh-legacy.test | 4 | ||||
-rw-r--r-- | test/lit/binary/stacky-eh-legacy.test.wasm | bin | 47 -> 86 bytes |
2 files changed, 2 insertions, 2 deletions
diff --git a/test/lit/binary/stacky-eh-legacy.test b/test/lit/binary/stacky-eh-legacy.test index c77435f0b..792c436d5 100644 --- a/test/lit/binary/stacky-eh-legacy.test +++ b/test/lit/binary/stacky-eh-legacy.test @@ -35,7 +35,7 @@ ;; The fixup will hoist the 'pop' and create another local to store it right ;; after 'catch'. -;; RUN: wasm-opt -all %s.wasm -S -o - | filecheck %s +;; RUN: wasm-opt %s.wasm -S -o - | filecheck %s ;; CHECK: (type $0 (func (param i32))) @@ -43,7 +43,7 @@ ;; CHECK: (tag $tag$0 (param i32)) -;; CHECK: (func $0 (type $1) +;; CHECK: (func $0 ;; CHECK-NEXT: (local $0 i32) ;; CHECK-NEXT: (local $1 i32) ;; CHECK-NEXT: (local $2 i32) diff --git a/test/lit/binary/stacky-eh-legacy.test.wasm b/test/lit/binary/stacky-eh-legacy.test.wasm Binary files differindex 992273cae..8da1d0238 100644 --- a/test/lit/binary/stacky-eh-legacy.test.wasm +++ b/test/lit/binary/stacky-eh-legacy.test.wasm |