summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/passes/instrument-locals_all-features.txt (renamed from test/passes/instrument-locals.txt)84
-rw-r--r--test/passes/instrument-locals_all-features.wast (renamed from test/passes/instrument-locals.wast)10
2 files changed, 84 insertions, 10 deletions
diff --git a/test/passes/instrument-locals.txt b/test/passes/instrument-locals_all-features.txt
index b57fbb9a1..1faef3f14 100644
--- a/test/passes/instrument-locals.txt
+++ b/test/passes/instrument-locals_all-features.txt
@@ -4,19 +4,27 @@
(type $FUNCSIG$jiij (func (param i32 i32 i64) (result i64)))
(type $FUNCSIG$fiif (func (param i32 i32 f32) (result f32)))
(type $FUNCSIG$diid (func (param i32 i32 f64) (result f64)))
+ (type $FUNCSIG$aiia (func (param i32 i32 anyref) (result anyref)))
+ (type $FUNCSIG$eiie (func (param i32 i32 exnref) (result exnref)))
(import "env" "get_i32" (func $get_i32 (param i32 i32 i32) (result i32)))
(import "env" "get_i64" (func $get_i64 (param i32 i32 i64) (result i64)))
(import "env" "get_f32" (func $get_f32 (param i32 i32 f32) (result f32)))
(import "env" "get_f64" (func $get_f64 (param i32 i32 f64) (result f64)))
+ (import "env" "get_anyref" (func $get_anyref (param i32 i32 anyref) (result anyref)))
+ (import "env" "get_exnref" (func $get_exnref (param i32 i32 exnref) (result exnref)))
(import "env" "set_i32" (func $set_i32 (param i32 i32 i32) (result i32)))
(import "env" "set_i64" (func $set_i64 (param i32 i32 i64) (result i64)))
(import "env" "set_f32" (func $set_f32 (param i32 i32 f32) (result f32)))
(import "env" "set_f64" (func $set_f64 (param i32 i32 f64) (result f64)))
- (func $A (; 8 ;) (type $FUNCSIG$v)
+ (import "env" "set_anyref" (func $set_anyref (param i32 i32 anyref) (result anyref)))
+ (import "env" "set_exnref" (func $set_exnref (param i32 i32 exnref) (result exnref)))
+ (func $A (; 12 ;) (type $FUNCSIG$v)
(local $x i32)
(local $y i64)
(local $z f32)
(local $w f64)
+ (local $a anyref)
+ (local $e exnref)
(drop
(call $get_i32
(i32.const 0)
@@ -42,8 +50,22 @@
)
)
(drop
- (call $get_i32
+ (call $get_anyref
(i32.const 3)
+ (i32.const 4)
+ (local.get $a)
+ )
+ )
+ (drop
+ (call $get_exnref
+ (i32.const 4)
+ (i32.const 5)
+ (local.get $e)
+ )
+ )
+ (drop
+ (call $get_i32
+ (i32.const 5)
(i32.const 0)
(local.get $x)
)
@@ -53,21 +75,35 @@
)
(drop
(call $get_f32
- (i32.const 4)
+ (i32.const 6)
(i32.const 2)
(local.get $z)
)
)
(drop
(call $get_f64
- (i32.const 5)
+ (i32.const 7)
(i32.const 3)
(local.get $w)
)
)
+ (drop
+ (call $get_anyref
+ (i32.const 8)
+ (i32.const 4)
+ (local.get $a)
+ )
+ )
+ (drop
+ (call $get_exnref
+ (i32.const 9)
+ (i32.const 5)
+ (local.get $e)
+ )
+ )
(local.set $x
(call $set_i32
- (i32.const 6)
+ (i32.const 10)
(i32.const 0)
(i32.const 1)
)
@@ -77,21 +113,35 @@
)
(local.set $z
(call $set_f32
- (i32.const 7)
+ (i32.const 11)
(i32.const 2)
(f32.const 3.2100000381469727)
)
)
(local.set $w
(call $set_f64
- (i32.const 8)
+ (i32.const 12)
(i32.const 3)
(f64.const 4.321)
)
)
+ (local.set $a
+ (call $set_anyref
+ (i32.const 13)
+ (i32.const 4)
+ (anyref.pop)
+ )
+ )
+ (local.set $e
+ (call $set_exnref
+ (i32.const 14)
+ (i32.const 5)
+ (exnref.pop)
+ )
+ )
(local.set $x
(call $set_i32
- (i32.const 9)
+ (i32.const 15)
(i32.const 0)
(i32.const 11)
)
@@ -101,17 +151,31 @@
)
(local.set $z
(call $set_f32
- (i32.const 10)
+ (i32.const 16)
(i32.const 2)
(f32.const 33.209999084472656)
)
)
(local.set $w
(call $set_f64
- (i32.const 11)
+ (i32.const 17)
(i32.const 3)
(f64.const 44.321)
)
)
+ (local.set $a
+ (call $set_anyref
+ (i32.const 18)
+ (i32.const 4)
+ (anyref.pop)
+ )
+ )
+ (local.set $e
+ (call $set_exnref
+ (i32.const 19)
+ (i32.const 5)
+ (exnref.pop)
+ )
+ )
)
)
diff --git a/test/passes/instrument-locals.wast b/test/passes/instrument-locals_all-features.wast
index f96399d02..ddcec39ea 100644
--- a/test/passes/instrument-locals.wast
+++ b/test/passes/instrument-locals_all-features.wast
@@ -4,26 +4,36 @@
(local $y i64)
(local $z f32)
(local $w f64)
+ (local $a anyref)
+ (local $e exnref)
(drop (local.get $x))
(drop (local.get $y))
(drop (local.get $z))
(drop (local.get $w))
+ (drop (local.get $a))
+ (drop (local.get $e))
(drop (local.get $x))
(drop (local.get $y))
(drop (local.get $z))
(drop (local.get $w))
+ (drop (local.get $a))
+ (drop (local.get $e))
(local.set $x (i32.const 1))
(local.set $y (i64.const 2))
(local.set $z (f32.const 3.21))
(local.set $w (f64.const 4.321))
+ (local.set $a (anyref.pop))
+ (local.set $e (exnref.pop))
(local.set $x (i32.const 11))
(local.set $y (i64.const 22))
(local.set $z (f32.const 33.21))
(local.set $w (f64.const 44.321))
+ (local.set $a (anyref.pop))
+ (local.set $e (exnref.pop))
)
)