summaryrefslogtreecommitdiff
path: root/test/unit.fromasm.no-opts
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-08-22 12:05:20 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-09-07 09:55:04 -0700
commitdb5ee8d83eb32fc7fd007f9e3d9b46d748161ae7 (patch)
treed2a38a4e49d84a1721420cf3b1f2973f368604dc /test/unit.fromasm.no-opts
parent266e922cddf0a5c78ed22f046eeebc053a9305c0 (diff)
downloadbinaryen-db5ee8d83eb32fc7fd007f9e3d9b46d748161ae7.tar.gz
binaryen-db5ee8d83eb32fc7fd007f9e3d9b46d748161ae7.tar.bz2
binaryen-db5ee8d83eb32fc7fd007f9e3d9b46d748161ae7.zip
set type of calls to their target, instead of the previous behavior where the asm.js context informed us. this lets us add drops where necessary
Diffstat (limited to 'test/unit.fromasm.no-opts')
-rw-r--r--test/unit.fromasm.no-opts25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/unit.fromasm.no-opts b/test/unit.fromasm.no-opts
index 56a1d4085..169d4fe5b 100644
--- a/test/unit.fromasm.no-opts
+++ b/test/unit.fromasm.no-opts
@@ -5,11 +5,13 @@
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
(type $FUNCSIG$vf (func (param f32)))
(type $FUNCSIG$vi (func (param i32)))
+ (type $FUNCSIG$ii (func (param i32) (result i32)))
(type $FUNCSIG$vd (func (param f64)))
(import $t global "global" "NaN" f64)
(import $u global "global" "Infinity" f64)
(import $tempDoublePtr global "env" "tempDoublePtr" i32)
(import $n global "env" "gb" i32)
+ (import $setTempRet0 "env" "setTempRet0" (param i32) (result i32))
(import $abort "env" "abort" (param f64))
(import $print "env" "print" (param i32))
(import $h "env" "h" (param i32))
@@ -867,6 +869,29 @@
(nop)
)
)
+ (func $dropCall (result i32)
+ (if
+ (i32.const 0)
+ (block
+ (drop
+ (call $phi)
+ )
+ (drop
+ (call_import $setTempRet0
+ (i32.const 10)
+ )
+ )
+ (call $zeroInit
+ (call_import $setTempRet0
+ (i32.const 10)
+ )
+ )
+ )
+ )
+ (return
+ (call $phi)
+ )
+ )
(func $z
(nop)
)