blob: 59e303eafae4bba70fac35f698ac57e7bef2bedd (
plain)
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
|
;; NOTE: Assertions have been generated by update_lit_checks.py and should not be edited.
;; RUN: wasm-opt %s -all --roundtrip -S -o - | filecheck %s
(module
;; CHECK: (type $none (func))
(type $none (func))
;; CHECK: (func $foo (type $none)
;; CHECK-NEXT: (local $0 (tuple funcref (ref $none)))
;; CHECK-NEXT: (local $1 funcref)
;; CHECK-NEXT: (local.set $0
;; CHECK-NEXT: (block $label$1 (type $1) (result funcref (ref $none))
;; CHECK-NEXT: (tuple.make 2
;; CHECK-NEXT: (ref.null nofunc)
;; CHECK-NEXT: (ref.func $foo)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (block (result funcref)
;; CHECK-NEXT: (local.set $1
;; CHECK-NEXT: (tuple.extract 2 0
;; CHECK-NEXT: (local.get $0)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (drop
;; CHECK-NEXT: (tuple.extract 2 1
;; CHECK-NEXT: (local.get $0)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (local.get $1)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: )
(func $foo
(tuple.drop 2
;; a tuple type with a non-nullable element, that must be carefully handled
(block $block (result funcref (ref $none))
(tuple.make 2
(ref.null func)
(ref.func $foo)
)
)
)
)
)
|