summaryrefslogtreecommitdiff
path: root/test/passes/reorder-locals.wast
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-08-07 10:38:34 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-09-07 09:54:51 -0700
commit9d27d6818f83308c4853e3d8870d5b88a374453f (patch)
tree50c25e5177efb7a8e910e586398aab3cfd1522c7 /test/passes/reorder-locals.wast
parent0783d60d9490666ab4b365e738b0132b378c6018 (diff)
downloadbinaryen-9d27d6818f83308c4853e3d8870d5b88a374453f.tar.gz
binaryen-9d27d6818f83308c4853e3d8870d5b88a374453f.tar.bz2
binaryen-9d27d6818f83308c4853e3d8870d5b88a374453f.zip
add drop and tee expressions
Diffstat (limited to 'test/passes/reorder-locals.wast')
-rw-r--r--test/passes/reorder-locals.wast60
1 files changed, 45 insertions, 15 deletions
diff --git a/test/passes/reorder-locals.wast b/test/passes/reorder-locals.wast
index 832889a78..872d352ee 100644
--- a/test/passes/reorder-locals.wast
+++ b/test/passes/reorder-locals.wast
@@ -1,29 +1,59 @@
(module
(memory 256 256)
- (func $b0-yes (param $a i32) (param $b i32)
+ (type $0 (func (param i32 i32)))
+ (type $1 (func))
+ (func $b0-yes (type $0) (param $a i32) (param $b i32)
(local $x i32)
(local $y i32)
(local $z i32)
-
- ;; Should reverse the order of the locals.
- (set_local $x (get_local $x))
- (set_local $y (get_local $y)) (set_local $y (get_local $y))
- (set_local $z (get_local $z)) (set_local $z (get_local $z)) (set_local $z (get_local $z))
-
- ;; Should not touch the args.
- (set_local $b (get_local $b)) (set_local $b (get_local $b)) (set_local $b (get_local $b))
- (set_local $b (get_local $b)) (set_local $b (get_local $b)) (set_local $b (get_local $b))
+ (set_local $x
+ (get_local $x)
+ )
+ (set_local $y
+ (get_local $y)
+ )
+ (set_local $y
+ (get_local $y)
+ )
+ (set_local $z
+ (get_local $z)
+ )
+ (set_local $z
+ (get_local $z)
+ )
+ (set_local $z
+ (get_local $z)
+ )
+ (set_local $b
+ (get_local $b)
+ )
+ (set_local $b
+ (get_local $b)
+ )
+ (set_local $b
+ (get_local $b)
+ )
+ (set_local $b
+ (get_local $b)
+ )
+ (set_local $b
+ (get_local $b)
+ )
+ (set_local $b
+ (get_local $b)
+ )
)
- (func $zero
+ (func $zero (type $1)
(local $a i32)
(local $b i32)
(local $c i32)
- (get_local $b) ;; a and c are untouched
+ (drop
+ (get_local $b)
+ )
)
- (func $null
+ (func $null (type $1)
(local $a i32)
(local $c i32)
- (nop) ;; a and c are untouched
+ (nop)
)
)
-