summaryrefslogtreecommitdiff
path: root/test/polymorphic_stack.wast.fromBinary.noDebugInfo
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2017-08-22 09:47:50 -0700
committerGitHub <noreply@github.com>2017-08-22 09:47:50 -0700
commitad8bc65685b19c0c3323dbb0a5cf2b6f709c7b92 (patch)
treefa8fd2da45450d75d5043f99baa09aa6af7f9b5f /test/polymorphic_stack.wast.fromBinary.noDebugInfo
parente5e77281ca516b7b802eb6c9b4bc3b39e2a8201e (diff)
downloadbinaryen-ad8bc65685b19c0c3323dbb0a5cf2b6f709c7b92.tar.gz
binaryen-ad8bc65685b19c0c3323dbb0a5cf2b6f709c7b92.tar.bz2
binaryen-ad8bc65685b19c0c3323dbb0a5cf2b6f709c7b92.zip
Ignore unreachable code in wasm binaries (#1122)
Ignoring unreachable code in wasm binaries lets us avoid corner cases with unstructured code in wasm binaries that is a poor fit for Binaryen's structured IR.
Diffstat (limited to 'test/polymorphic_stack.wast.fromBinary.noDebugInfo')
-rw-r--r--test/polymorphic_stack.wast.fromBinary.noDebugInfo106
1 files changed, 18 insertions, 88 deletions
diff --git a/test/polymorphic_stack.wast.fromBinary.noDebugInfo b/test/polymorphic_stack.wast.fromBinary.noDebugInfo
index e707d5046..69292952e 100644
--- a/test/polymorphic_stack.wast.fromBinary.noDebugInfo
+++ b/test/polymorphic_stack.wast.fromBinary.noDebugInfo
@@ -8,81 +8,18 @@
(func $0 (type $1) (result i32)
(block $label$0 (result i32)
(unreachable)
- (i32.trunc_u/f64
- (unreachable)
- )
- (unreachable)
- (br_if $label$0
- (i32.trunc_u/f64
- (unreachable)
- )
- (unreachable)
- )
- (f32.add
- (unreachable)
- (f32.const 1)
- )
- (unreachable)
)
)
(func $1 (type $0) (param $var$0 i32) (result i32)
(block $label$0 (result i32)
(unreachable)
- (call $1
- (unreachable)
- )
- (i64.eqz
- (unreachable)
- )
- (drop
- (unreachable)
- )
- (i32.eqz
- (unreachable)
- )
- (i64.eqz
- (unreachable)
- )
- (drop
- (unreachable)
- )
- (call_indirect $0
- (unreachable)
- (unreachable)
- )
- (i64.eqz
- (unreachable)
- )
- (drop
- (unreachable)
- )
)
)
(func $2 (type $2) (param $var$0 i32)
(local $var$1 f32)
(block $label$0
(unreachable)
- (tee_local $var$0
- (unreachable)
- )
- (i64.eqz
- (unreachable)
- )
- (drop
- (unreachable)
- )
- (i64.eqz
- (unreachable)
- )
- (tee_local $var$1
- (unreachable)
- )
- (drop
- (unreachable)
- )
- (unreachable)
)
- (unreachable)
)
(func $3 (type $3)
(local $var$0 f32)
@@ -90,48 +27,41 @@
(i32.const 259)
(block $label$0
(unreachable)
- (tee_local $var$0
- (unreachable)
- )
- (unreachable)
)
)
)
(func $4 (type $3)
(unreachable)
- (select
- (unreachable)
- (i32.const 1)
- (i32.const 2)
- )
- (i64.eqz
- (unreachable)
- )
- (drop
- (unreachable)
- )
)
(func $5 (type $1) (result i32)
(block $label$0 (result i32)
(block $label$1
(unreachable)
- (br_if $label$0
- (unreachable)
- (unreachable)
- )
- (unreachable)
- (unreachable)
)
(unreachable)
)
)
- (func $6 (type $1) (result i32)
+ (func $6 (type $0) (param $var$0 i32) (result i32)
+ (block $label$0 (result i32)
+ (if
+ (get_local $var$0)
+ (block $label$1
+ (return
+ (i32.const 127)
+ )
+ )
+ )
+ (block $label$2 (result i32)
+ (return
+ (i32.const -32)
+ )
+ )
+ )
+ )
+ (func $7 (type $1) (result i32)
(block $label$0 (result i32)
(block $label$1
(unreachable)
- (unreachable)
- (unreachable)
- (unreachable)
)
(unreachable)
)