forked from WebAssembly/binaryen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
instrument-locals_all-features.wast
55 lines (49 loc) · 1.32 KB
/
instrument-locals_all-features.wast
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
(module
(func $test
(local $x i32)
(local $y i64)
(local $z f32)
(local $w f64)
(local $F funcref)
(local $X externref)
(local $N nullref)
(local $E exnref)
(drop (local.get $x))
(drop (local.get $y))
(drop (local.get $z))
(drop (local.get $w))
(drop (local.get $F))
(drop (local.get $X))
(drop (local.get $N))
(drop (local.get $E))
(drop (local.get $x))
(drop (local.get $y))
(drop (local.get $z))
(drop (local.get $w))
(drop (local.get $F))
(drop (local.get $X))
(drop (local.get $N))
(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 $F (ref.func $test))
(local.set $X (local.get $X))
(local.set $N (ref.null))
(local.set $E (local.get $E))
(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 $F (local.get $F))
(local.set $X (local.get $X))
(local.set $N (local.get $N))
(local.set $E (local.get $E))
;; Pop instructions should not be instrumented
(local.set $F (funcref.pop))
(local.set $X (externref.pop))
(local.set $N (nullref.pop))
(local.set $E (exnref.pop))
)
)