diff options
author | Thomas Lively <tlively@google.com> | 2024-04-25 14:55:12 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-25 14:55:12 -0700 |
commit | 956d2d89d530012885c1f88c87bf8b872c187b70 (patch) | |
tree | a24095ab6965bbfdfd04afbc02c33a3409d51fd0 /test/passes/remove-unused-brs_enable-multivalue.txt | |
parent | f44dcd4482f5bbb0fb5b567de4a9425ed949c939 (diff) | |
download | binaryen-956d2d89d530012885c1f88c87bf8b872c187b70.tar.gz binaryen-956d2d89d530012885c1f88c87bf8b872c187b70.tar.bz2 binaryen-956d2d89d530012885c1f88c87bf8b872c187b70.zip |
[Parser] Enable the new text parser by default (#6371)
The new text parser is faster and more standards compliant than the old text
parser. Enable it by default in wasm-opt and update the tests to reflect the
slightly different results it produces. Besides following the spec, the new
parser differs from the old parser in that it:
- Does not synthesize `loop` and `try` labels unnecessarily
- Synthesizes different block names in some cases
- Parses exports in a different order
- Parses `nop`s instead of empty blocks for empty control flow arms
- Does not support parsing Poppy IR
- Produces different error messages
- Cannot parse `pop` except as the first instruction inside a `catch`
Diffstat (limited to 'test/passes/remove-unused-brs_enable-multivalue.txt')
-rw-r--r-- | test/passes/remove-unused-brs_enable-multivalue.txt | 168 |
1 files changed, 84 insertions, 84 deletions
diff --git a/test/passes/remove-unused-brs_enable-multivalue.txt b/test/passes/remove-unused-brs_enable-multivalue.txt index 2fd56cb9c..f3c1b7d77 100644 --- a/test/passes/remove-unused-brs_enable-multivalue.txt +++ b/test/passes/remove-unused-brs_enable-multivalue.txt @@ -251,15 +251,15 @@ ) ) ) - (block $a1 - (block $b2 - (block $c3 + (block $a0 + (block $b0 + (block $c0 ) ) ) - (block $a4 - (block $b5 - (block $c6 + (block $a1 + (block $b1 + (block $c1 ) ) ) @@ -281,7 +281,7 @@ (if (i32.const 0) (then - (block $a7 + (block $a0 (drop (i32.const 1) ) @@ -295,7 +295,7 @@ (if (i32.const 0) (then - (block $a9 + (block $a1 (block $block8 ) ) @@ -417,11 +417,11 @@ ) ) (if - (block $a17 (result i32) + (block $a0 (result i32) (i32.const 0) ) (then - (block $a18 + (block $a1 (block (drop (i32.const 1) @@ -430,7 +430,7 @@ ) ) (else - (block $a20 + (block $a2 (block (drop (i32.const 2) @@ -457,41 +457,41 @@ (i32.const 1) ) ) - (block $do-once$022 + (block $do-once$00 (if (call $b13) (then (drop (call $b14) ) - (br $do-once$022) + (br $do-once$00) ) ) (drop (i32.const 1) ) ) - (block $do-once$025 + (block $do-once$01 (if (i32.const 0) (then (drop (call $b14) ) - (br $do-once$025) + (br $do-once$01) ) ) (drop (i32.const 1) ) ) - (block $do-once$028 (result i32) + (block $do-once$02 (result i32) (if (local.tee $x (i32.const 1) ) (then - (br $do-once$028 + (br $do-once$02 (local.tee $x (i32.const 2) ) @@ -511,77 +511,77 @@ ) ) ) - (loop $in30 - (br $in30) + (loop $in0 + (br $in0) ) - (loop $loop-in - (block $out31 - (br_if $out31 + (loop + (block $out0 + (br_if $out0 (i32.const 0) ) ) ) - (loop $in33 - (block $out34 - (br_if $out34 + (loop $in1 + (block $out1 + (br_if $out1 (i32.const 0) ) ) ) - (loop $in36 + (loop $in2 (nop) ) - (loop $in37 - (block $out38 + (loop $in3 + (block $out2 ) ) - (loop $in39 + (loop $in4 (if (i32.eqz (i32.const 0) ) (then - (block $out40 + (block $out3 (nop) - (br_if $in39 + (br_if $in4 (i32.const 1) ) ) ) ) ) - (loop $in42 - (block $out43 - (br_if $in42 + (loop $in5 + (block $out4 + (br_if $in5 (i32.const 0) ) ) ) - (loop $in45 + (loop $in6 (if (i32.const 0) (then - (block $out46 + (block $out5 (unreachable) ) ) (else - (br $in45) + (br $in6) ) ) ) - (loop $in48 + (loop $in7 (if (i32.const 0) (then - (block $out49 + (block $out6 (block (call $loops) ) ) ) (else - (br $in48) + (br $in7) ) ) ) @@ -598,33 +598,33 @@ ) ) ) - (loop $in52 + (loop $in8 (if (i32.const 0) (then - (block $out53 + (block $out7 ) ) (else (call $loops) - (br $in52) + (br $in8) ) ) ) - (loop $in55 + (loop $in9 (if (i32.const 0) (then (call $loops) - (br $in55) + (br $in9) ) (else - (block $out56 + (block $out8 ) ) ) ) - (loop $in58 + (loop $in10 (if (i32.const 0) (then @@ -632,19 +632,19 @@ (i32.const 1) ) (call $loops) - (br $in58) + (br $in10) ) (else - (block $out59 + (block $out9 ) ) ) ) - (loop $in62 + (loop $in11 (if (i32.const 0) (then - (block $out63 + (block $out10 ) ) (else @@ -652,11 +652,11 @@ (drop (i32.const 100) ) - (br $in62) + (br $in11) ) ) ) - (loop $in65 + (loop $in12 (if (i32.const 0) (then @@ -664,15 +664,15 @@ (drop (i32.const 101) ) - (br $in65) + (br $in12) ) (else - (block $out66 + (block $out11 ) ) ) ) - (loop $in68 + (loop $in13 (if (i32.const 0) (then @@ -683,60 +683,60 @@ (drop (i32.const 102) ) - (br $in68) + (br $in13) ) (else - (block $out69 + (block $out12 ) ) ) ) - (loop $in72 + (loop $in14 (if (i32.eqz (i32.const 0) ) (then - (block $out73 + (block $out13 (nop) (call $loops) (return) - (br $in72) + (br $in14) ) ) ) ) - (loop $in75 - (block $out76 - (br_if $out76 + (loop $in15 + (block $out14 + (br_if $out14 (i32.const 0) ) (call $loops) - (br $out76) - (br $in75) + (br $out14) + (br $in15) ) ) - (loop $in78 + (loop $in16 (if (i32.const 0) (then - (block $out79 + (block $out15 ) ) (else (call $loops) (drop - (block $out2 (result i32) + (block $out20 (result i32) (i32.const 1) ) ) - (br $in78) + (br $in16) ) ) ) - (loop $in81 - (block $out82 - (br_if $in81 + (loop $in17 + (block $out16 + (br_if $in17 (i32.eqz (i32.const 0) ) @@ -756,18 +756,18 @@ ) ) ) - (loop $in83 - (block $out84 - (br $out84) - (br $in83) + (loop $in18 + (block $out17 + (br $out17) + (br $in18) ) ) - (loop $in85 - (block $out86 + (loop $in19 + (block $out18 (drop (i32.const 0) ) - (br $in85) + (br $in19) ) ) (loop $in-not @@ -782,11 +782,11 @@ (br $in-not) ) ) - (loop $in-todo287 + (loop $in-todo20 (if (i32.const 0) (then - (block $out-todo288 + (block $out-todo20 ) ) (else @@ -794,7 +794,7 @@ (drop (i32.const 1) ) - (br $in-todo287) + (br $in-todo20) ) ) ) @@ -2843,7 +2843,7 @@ ) ) (func $do-not-flow-values-through-unreachable-code-b (result i32) - (loop $loop-in + (loop (unreachable) (if (i32.const 0) |