File tree Expand file tree Collapse file tree 3 files changed +3
-16
lines changed Expand file tree Collapse file tree 3 files changed +3
-16
lines changed Original file line number Diff line number Diff line change 16
16
(import " reference-types" " somethingNull" (func $features/reference-types/somethingNull (result externref )))
17
17
(import " reference-types" " external" (func $features/reference-types/external (param externref ) (result externref )))
18
18
(global $features/reference-types/funcGlobal (mut funcref ) (ref.null func ))
19
- (global $features/reference-types/funcGlobalInit (mut funcref ) (ref.null func ))
20
19
(global $features/reference-types/externGlobal (mut externref ) (ref.null extern ))
21
20
(global $features/reference-types/anyGlobal (mut anyref ) (ref.null any))
22
21
(memory $0 1 )
114
113
end
115
114
ref.null func
116
115
global.set $features/reference-types/funcGlobal
117
- ref.null func
118
- global.set $features/reference-types/funcGlobalInit
119
116
global.get $features/reference-types/externGlobal
120
117
ref.is_null
121
118
i32.eqz
144
141
global.set $features/reference-types/anyGlobal
145
142
ref.func $features/reference-types/someFunc
146
143
global.set $features/reference-types/funcGlobal
147
- global.get $features/reference-types/funcGlobalInit
148
- ref.is_null
149
- if
150
- i32.const 0
151
- i32.const 1056
152
- i32.const 108
153
- i32.const 1
154
- call $~lib/builtins/abort
155
- unreachable
156
- end
157
- global.get $features/reference-types/funcGlobal
144
+ ref.func $features/reference-types/someFunc
158
145
global.set $features/reference-types/anyGlobal
159
146
)
160
147
)
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ testLocal<anyref>();
105
105
106
106
function someFunc ( ) : void { }
107
107
funcGlobal = someFunc ;
108
- assert ( funcGlobalInit ) ;
108
+ assert ( funcGlobal ) ;
109
109
var otherFuncGlobal : funcref = someFunc ;
110
110
assert ( otherFuncGlobal ) ;
111
111
{
Original file line number Diff line number Diff line change 404
404
call $features/reference-types/testLocal<anyref>
405
405
ref.func $features/reference-types/someFunc
406
406
global.set $features/reference-types/funcGlobal
407
- global.get $features/reference-types/funcGlobalInit
407
+ global.get $features/reference-types/funcGlobal
408
408
ref.is_null
409
409
if
410
410
i32.const 0
You can’t perform that action at this time.
0 commit comments