summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2019-04-09 09:31:26 -0700
committerGitHub <noreply@github.com>2019-04-09 09:31:26 -0700
commitd318b18d8c415357e8ee65dd4ae34ec28dc8f9d0 (patch)
tree5979332c0bdd7d09da3620913f09586641767ef7 /test
parentb56c691ab87c2cd09255b2617213ec5d8e92a748 (diff)
downloadbinaryen-d318b18d8c415357e8ee65dd4ae34ec28dc8f9d0.tar.gz
binaryen-d318b18d8c415357e8ee65dd4ae34ec28dc8f9d0.tar.bz2
binaryen-d318b18d8c415357e8ee65dd4ae34ec28dc8f9d0.zip
Directize: if we change a type to unreachable, we need to propagate that out (#1989)
Diffstat (limited to 'test')
-rw-r--r--test/passes/directize.txt14
-rw-r--r--test/passes/directize.wast13
2 files changed, 26 insertions, 1 deletions
diff --git a/test/passes/directize.txt b/test/passes/directize.txt
index 7f4b1a57c..fb6d94e4c 100644
--- a/test/passes/directize.txt
+++ b/test/passes/directize.txt
@@ -181,3 +181,17 @@
(unreachable)
)
)
+(module
+ (type $0 (func))
+ (table $0 8 8 funcref)
+ (func $0 (; 0 ;) (type $0)
+ (block $block
+ (nop)
+ (block
+ (block
+ )
+ (unreachable)
+ )
+ )
+ )
+)
diff --git a/test/passes/directize.wast b/test/passes/directize.wast
index 8e6839457..7deb2572c 100644
--- a/test/passes/directize.wast
+++ b/test/passes/directize.wast
@@ -179,4 +179,15 @@
(unreachable)
)
)
-
+;; change types
+(module
+ (table $0 8 8 funcref)
+ (func $0
+ (block ;; the type of this block will change
+ (nop)
+ (call_indirect (type $0)
+ (i32.const 15)
+ )
+ )
+ )
+)