diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2019-01-07 13:24:58 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-07 13:24:58 -0800 |
commit | 7d94900ded8e2e5ce8ef8ee2687528531d8f2a97 (patch) | |
tree | d8bba13d306b0c5ecba384384e602e6cccc83015 /test/passes/merge-locals.wast | |
parent | 6f91af190effd7b8a5969314dd4fb3d2ec540524 (diff) | |
download | binaryen-7d94900ded8e2e5ce8ef8ee2687528531d8f2a97.tar.gz binaryen-7d94900ded8e2e5ce8ef8ee2687528531d8f2a97.tar.bz2 binaryen-7d94900ded8e2e5ce8ef8ee2687528531d8f2a97.zip |
Massive renaming (#1855)
Automated renaming according to
https://github.com/WebAssembly/spec/issues/884#issuecomment-426433329.
Diffstat (limited to 'test/passes/merge-locals.wast')
-rw-r--r-- | test/passes/merge-locals.wast | 230 |
1 files changed, 115 insertions, 115 deletions
diff --git a/test/passes/merge-locals.wast b/test/passes/merge-locals.wast index 1eb979c4c..c47dfd125 100644 --- a/test/passes/merge-locals.wast +++ b/test/passes/merge-locals.wast @@ -3,76 +3,76 @@ (func $test (param $x $i32) (param $y i32) (result i32) (drop (if (result i32) - (tee_local $x - (get_local $y) + (local.tee $x + (local.get $y) ) (i32.const 100) - (get_local $x) + (local.get $x) ) ) - (get_local $y) ;; turn this into $x + (local.get $y) ;; turn this into $x ) (func $test2 (param $x $i32) (param $y i32) (result i32) (drop (if (result i32) - (tee_local $x - (get_local $y) + (local.tee $x + (local.get $y) ) (i32.const 100) - (get_local $x) + (local.get $x) ) ) - (get_local $x) + (local.get $x) ) (func $test-multiple (param $x $i32) (param $y i32) (result i32) (drop (if (result i32) - (tee_local $x - (get_local $y) + (local.tee $x + (local.get $y) ) (i32.const 100) - (get_local $x) + (local.get $x) ) ) - (drop (get_local $y)) ;; turn this into $x - (get_local $y) ;; turn this into $x + (drop (local.get $y)) ;; turn this into $x + (local.get $y) ;; turn this into $x ) (func $test-just-some (param $x $i32) (param $y i32) (result i32) (drop (if (result i32) - (tee_local $x - (get_local $y) + (local.tee $x + (local.get $y) ) (i32.const 100) - (get_local $x) + (local.get $x) ) ) - (drop (get_local $y)) ;; turn this into $x - (set_local $y (i32.const 200)) - (get_local $y) ;; but not this one! + (drop (local.get $y)) ;; turn this into $x + (local.set $y (i32.const 200)) + (local.get $y) ;; but not this one! ) (func $test-just-some2 (param $x $i32) (param $y i32) (result i32) (drop (if (result i32) - (tee_local $x - (get_local $y) + (local.tee $x + (local.get $y) ) (i32.const 100) - (get_local $x) + (local.get $x) ) ) (if (i32.const 300) - (set_local $y (i32.const 400)) - (drop (get_local $y)) ;; turn this into $x + (local.set $y (i32.const 400)) + (drop (local.get $y)) ;; turn this into $x ) (i32.const 500) ) (func $test-just-some3 (param $x $i32) (param $y i32) (result i32) (drop (if (result i32) - (tee_local $x - (get_local $y) + (local.tee $x + (local.get $y) ) (i32.const 100) (i32.const 200) @@ -80,211 +80,211 @@ ) (if (i32.const 300) - (set_local $y (i32.const 400)) - (drop (get_local $y)) ;; can turn this into $x, but another exists we can't, so do nothing + (local.set $y (i32.const 400)) + (drop (local.get $y)) ;; can turn this into $x, but another exists we can't, so do nothing ) - (get_local $y) ;; but not this one! + (local.get $y) ;; but not this one! ) (func $silly-self (param $x $i32) (param $y i32) (result i32) (drop (if (result i32) - (tee_local $x - (get_local $x) + (local.tee $x + (local.get $x) ) (i32.const 100) - (get_local $x) + (local.get $x) ) ) - (get_local $y) ;; turn this into $x + (local.get $y) ;; turn this into $x ) (func $silly-multi (param $x $i32) (param $y i32) (result i32) (drop (if (result i32) - (tee_local $x - (tee_local $y - (get_local $x) + (local.tee $x + (local.tee $y + (local.get $x) ) ) (i32.const 100) - (get_local $x) + (local.get $x) ) ) - (get_local $y) ;; turn this into $x + (local.get $y) ;; turn this into $x ) (func $undo-1 (param $var$1 i32) (param $var$2 i32) (local $var$5 i32) - (set_local $var$2 ;; copy 1 to 2 - (get_local $var$1) + (local.set $var$2 ;; copy 1 to 2 + (local.get $var$1) ) - (set_local $var$2 ;; overwrite 2 + (local.set $var$2 ;; overwrite 2 (i32.const 1) ) (drop - (get_local $var$1) ;; can't be changed to $var$2, as it changes + (local.get $var$1) ;; can't be changed to $var$2, as it changes ) ) (func $undo-2 (param $var$1 i32) (param $var$2 i32) (local $var$5 i32) - (set_local $var$2 ;; copy 1 to 2 - (get_local $var$1) + (local.set $var$2 ;; copy 1 to 2 + (local.get $var$1) ) - (if (get_local $var$1) - (set_local $var$2 ;; conditional overwrite 2 + (if (local.get $var$1) + (local.set $var$2 ;; conditional overwrite 2 (i32.const 1) ) ) (drop - (get_local $var$1) ;; can't be changed to $var$2, as it changes + (local.get $var$1) ;; can't be changed to $var$2, as it changes ) ) (func $reverse (param $x $i32) (param $y i32) (drop (if (result i32) - (tee_local $x - (get_local $y) + (local.tee $x + (local.get $y) ) (i32.const 100) - (get_local $x) + (local.get $x) ) ) - (drop (get_local $x)) ;; (read lower down first) but the reverse can work! + (drop (local.get $x)) ;; (read lower down first) but the reverse can work! (if (i32.const 1) - (set_local $y (i32.const 200)) + (local.set $y (i32.const 200)) ) - (drop (get_local $y)) ;; cannot this into $x, since this $y has multiple sources + (drop (local.get $y)) ;; cannot this into $x, since this $y has multiple sources ) (func $reverse-end (param $x $i32) (param $y i32) (drop (if (result i32) - (tee_local $x - (get_local $y) + (local.tee $x + (local.get $y) ) (i32.const 100) - (get_local $x) ;; don't change to $y, as its lifetime ended. leave it ended + (local.get $x) ;; don't change to $y, as its lifetime ended. leave it ended ) ) ) (func $reverse-lone-end-2 (param $x $i32) (param $y i32) (drop (if (result i32) - (tee_local $x - (get_local $y) + (local.tee $x + (local.get $y) ) (i32.const 100) - (get_local $x) ;; don't change to $y, as its lifetime ended. leave it ended + (local.get $x) ;; don't change to $y, as its lifetime ended. leave it ended ) ) - (set_local $y (i32.const 200)) - (drop (get_local $y)) ;; cannot this into $x, since this $y has multiple sources + (local.set $y (i32.const 200)) + (drop (local.get $y)) ;; cannot this into $x, since this $y has multiple sources ) (func $reverse-undo (param $x $i32) (param $y i32) (drop (if (result i32) - (tee_local $x - (get_local $y) + (local.tee $x + (local.get $y) ) (i32.const 100) - (get_local $x) ;; can optimize this ($y lives on) + (local.get $x) ;; can optimize this ($y lives on) ) ) - (set_local $x (i32.const 300)) ;; force an undo - (drop (get_local $x)) ;; (read lower down first) but the reverse can almost work + (local.set $x (i32.const 300)) ;; force an undo + (drop (local.get $x)) ;; (read lower down first) but the reverse can almost work (if (i32.const 1) - (set_local $y (i32.const 200)) + (local.set $y (i32.const 200)) ) - (drop (get_local $y)) ;; cannot this into $x, since this $y has multiple sources + (drop (local.get $y)) ;; cannot this into $x, since this $y has multiple sources ) (func $reverse-undo2 (param $x $i32) (param $y i32) (drop (if (result i32) - (tee_local $x - (get_local $y) + (local.tee $x + (local.get $y) ) (i32.const 100) (i32.const 150) ) ) - (set_local $x (i32.const 300)) ;; force an undo - (drop (get_local $x)) ;; (read lower down first) but the reverse can almost work + (local.set $x (i32.const 300)) ;; force an undo + (drop (local.get $x)) ;; (read lower down first) but the reverse can almost work (if (i32.const 1) - (set_local $y (i32.const 200)) + (local.set $y (i32.const 200)) ) - (drop (get_local $y)) ;; cannot this into $x, since this $y has multiple sources + (drop (local.get $y)) ;; cannot this into $x, since this $y has multiple sources ) (func $reverse-undo3-conditional (param $x $i32) (param $y i32) (drop (if (result i32) - (tee_local $x - (get_local $y) + (local.tee $x + (local.get $y) ) (i32.const 100) (i32.const 150) ) ) (if (i32.const 1) - (set_local $x (i32.const 300)) ;; force an undo + (local.set $x (i32.const 300)) ;; force an undo ) - (drop (get_local $x)) ;; (read lower down first) but the reverse can almost work + (drop (local.get $x)) ;; (read lower down first) but the reverse can almost work (if (i32.const 1) - (set_local $y (i32.const 200)) + (local.set $y (i32.const 200)) ) - (drop (get_local $y)) ;; cannot this into $x, since this $y has multiple sources + (drop (local.get $y)) ;; cannot this into $x, since this $y has multiple sources ) (func $reverse-undo3-conditional-b (param $x $i32) (param $y i32) (drop (if (result i32) - (tee_local $x - (get_local $y) + (local.tee $x + (local.get $y) ) (i32.const 100) - (get_local $x) + (local.get $x) ) ) (if (i32.const 1) - (set_local $x (i32.const 300)) ;; force an undo + (local.set $x (i32.const 300)) ;; force an undo ) - (drop (get_local $x)) ;; (read lower down first) but the reverse can almost work + (drop (local.get $x)) ;; (read lower down first) but the reverse can almost work (if (i32.const 1) - (set_local $y (i32.const 200)) + (local.set $y (i32.const 200)) ) - (drop (get_local $y)) ;; cannot this into $x, since this $y has multiple sources + (drop (local.get $y)) ;; cannot this into $x, since this $y has multiple sources ) (func $reverse-undo3-conditional-c (param $x $i32) (param $y i32) (drop (if (result i32) - (tee_local $x - (get_local $y) + (local.tee $x + (local.get $y) ) (i32.const 100) (i32.const 150) ) ) (if (i32.const 1) - (drop (get_local $x)) + (drop (local.get $x)) (block (if (i32.const 1) - (set_local $x (i32.const 300)) ;; force an undo + (local.set $x (i32.const 300)) ;; force an undo ) - (drop (get_local $x)) ;; (read lower down first) but the reverse can almost work + (drop (local.get $x)) ;; (read lower down first) but the reverse can almost work ) ) (if (i32.const 1) - (set_local $y (i32.const 200)) + (local.set $y (i32.const 200)) ) - (drop (get_local $y)) ;; cannot this into $x, since this $y has multiple sources + (drop (local.get $y)) ;; cannot this into $x, since this $y has multiple sources ) (func $fuzz (param $var$0 i32) (param $var$1 f32) (param $var$2 f32) (result i64) (local $var$3 i32) - (set_global $global$0 + (global.set $global$0 (i32.sub - (get_global $global$0) + (global.get $global$0) (i32.const 1) ) ) (loop $label$1 (result i64) - (set_global $global$0 + (global.set $global$0 (i32.sub - (get_global $global$0) + (global.get $global$0) (i32.const 1) ) ) @@ -293,52 +293,52 @@ (drop (if (result i32) (block $label$3 (result i32) - (set_global $global$0 + (global.set $global$0 (i32.sub - (get_global $global$0) + (global.get $global$0) (i32.const 3) ) ) - (set_local $var$3 + (local.set $var$3 (i32.const 1) ) - (tee_local $var$3 - (get_local $var$0) + (local.tee $var$3 + (local.get $var$0) ) ) (i32.const 0) (block (result i32) - (set_local $var$3 + (local.set $var$3 (if (result i32) (i32.const 0) (block (result i32) (block $label$7 (block $label$8 - (set_local $var$0 + (local.set $var$0 (i32.const 34738786) ) ) ) - (get_local $var$3) + (local.get $var$3) ) (block (result i32) (if (i32.eqz - (get_global $global$0) + (global.get $global$0) ) (return (i64.const 137438953472) ) ) - (set_global $global$0 + (global.set $global$0 (i32.sub - (get_global $global$0) + (global.get $global$0) (i32.const 1) ) ) (br_if $label$1 (i32.eqz - (get_local $var$3) + (local.get $var$3) ) ) (return @@ -362,15 +362,15 @@ (if (i32.const 1) (drop - (get_local $result) + (local.get $result) ) ) - (set_local $result ;; vanishes - (get_local $param) + (local.set $result ;; vanishes + (local.get $param) ) (br_if $label$1 - (tee_local $unused ;; unused, but forms part of a copy, with $result - the trivial tee we add here should not confuse us - (get_local $result) ;; flips + (local.tee $unused ;; unused, but forms part of a copy, with $result - the trivial tee we add here should not confuse us + (local.get $result) ;; flips ) ) ) |