node/deps/v8/third_party/wasm-api/example/hostref.wat
Myles Borins f7f6c928c1
deps: update V8 to 7.8.279.9
PR-URL: https://github.com/nodejs/node/pull/29694
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2019-10-07 03:19:23 -04:00

25 lines
654 B
Plaintext

(module
(import "" "f" (func $fun (param anyref) (result anyref)))
(global $glob (export "global") (mut anyref) (ref.null))
(table $tab (export "table") 10 anyref)
(func (export "global.set") (param $r anyref)
(global.set $glob (local.get $r))
)
(func (export "global.get") (result anyref)
(global.get $glob)
)
(func (export "table.set") (param $i i32) (param $r anyref)
(table.set $tab (local.get $i) (local.get $r))
)
(func (export "table.get") (param $i i32) (result anyref)
(table.get $tab (local.get $i))
)
(func (export "func.call") (param $r anyref) (result anyref)
(call $fun (local.get $r))
)
)