Files
wasmtime/cranelift/wasmtests/ref-func-0.wat
Nick Fitzgerald ce1ee2d2f5 Enable ref.func global initializers (#1380)
* Fix comment referencing an outdated instruction name

* cranelift-wasm: Enable `ref.func` global initializers
2020-02-07 11:44:07 -08:00

13 lines
452 B
Plaintext

(module
(func $imported (import "env" "f") (param i32) (result i32))
(func $local (result anyref anyref funcref funcref)
global.get 0
global.get 1
global.get 2
global.get 3)
(global (export "anyref-imported") anyref (ref.func $imported))
(global (export "anyref-local") anyref (ref.func $local))
(global (export "funcref-imported") funcref (ref.func $imported))
(global (export "funcref-local") funcref (ref.func $local)))