summaryrefslogtreecommitdiff
path: root/test/unit.wast.fromBinary
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-05-17 18:22:00 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-05-17 18:22:00 -0700
commit9700fca02229f4c3e15425a2396740384f7736cb (patch)
treeede0efefc90364ca3c6c56cbb43aeb40ae7f8c4d /test/unit.wast.fromBinary
parent3f137abe061fd060b2c9bbffcb8796144ecbada9 (diff)
downloadbinaryen-9700fca02229f4c3e15425a2396740384f7736cb.tar.gz
binaryen-9700fca02229f4c3e15425a2396740384f7736cb.tar.bz2
binaryen-9700fca02229f4c3e15425a2396740384f7736cb.zip
don't emit extra unnecessary blocks for loops in binary format (#523)
Diffstat (limited to 'test/unit.wast.fromBinary')
-rw-r--r--test/unit.wast.fromBinary23
1 files changed, 13 insertions, 10 deletions
diff --git a/test/unit.wast.fromBinary b/test/unit.wast.fromBinary
index e80ba999e..c9ba4528b 100644
--- a/test/unit.wast.fromBinary
+++ b/test/unit.wast.fromBinary
@@ -9,6 +9,7 @@
(type $4 (func (result f64)))
(type $5 (func (result i32)))
(type $6 (func (param i32) (result i32)))
+ (type $7 (func (param f64) (result f64)))
(import $import$0 "env" "_emscripten_asm_const_vi")
(import $import$1 "asm2wasm" "f64-to-int" (param f64) (result i32))
(import $import$2 "asm2wasm" "f64-rem" (param f64 f64) (result f64))
@@ -260,20 +261,16 @@
)
(block $label$15
(loop $label$16 $label$17
- (block $label$18
- (br $label$16)
- (br $label$17)
- )
+ (br $label$16)
+ (br $label$17)
)
(br $label$9)
)
)
- (block $label$19
- (loop $label$20 $label$21
- (block $label$22
- (br $label$9)
- (br $label$21)
- )
+ (block $label$18
+ (loop $label$19 $label$20
+ (br $label$9)
+ (br $label$20)
)
(br $label$9)
)
@@ -419,5 +416,11 @@
(i32.const 0)
)
)
+ (func $loop-roundtrip (type $7) (param $var$0 f64) (result f64)
+ (loop $label$0 $label$1
+ (get_local $var$0)
+ (get_local $var$0)
+ )
+ )
)