diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-08-22 12:05:20 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-09-07 09:55:04 -0700 |
commit | db5ee8d83eb32fc7fd007f9e3d9b46d748161ae7 (patch) | |
tree | d2a38a4e49d84a1721420cf3b1f2973f368604dc /test/unit.fromasm.imprecise | |
parent | 266e922cddf0a5c78ed22f046eeebc053a9305c0 (diff) | |
download | binaryen-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.imprecise')
-rw-r--r-- | test/unit.fromasm.imprecise | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise index a18e1f436..b2c79ff79 100644 --- a/test/unit.fromasm.imprecise +++ b/test/unit.fromasm.imprecise @@ -3,11 +3,13 @@ (type $FUNCSIG$ddd (func (param f64 f64) (result f64))) (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)) @@ -478,4 +480,25 @@ ) ) ) + (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) + ) + ) + ) + ) + (call $phi) + ) ) |