UNPKG
walt-compiler
Version:
canary (0.4.0-alpha.99dcc485)
latest (0.21.0)
0.21.0
0.20.0
0.19.0
0.18.0
0.17.0
0.16.3
0.16.2
0.16.1
0.16.0
0.15.1
0.15.0
0.13.0
0.12.0
0.10.2
0.10.0
0.9.4
0.9.3
0.9.2
0.9.1
0.9.0
0.8.3
0.8.2
0.8.1
0.8.0
0.7.0
0.6.3
0.6.2
0.6.1
0.6.0
0.5.4
0.5.3
0.5.1
0.5.0
0.4.3
0.4.2
0.4.1
0.4.0
0.4.0-alpha.e2c5217b
0.4.0-alpha.99dcc485
0.3.3
0.3.2
0.3.1
0.3.0
0.2.9
0.2.8
0.2.7
0.2.6
0.2.5
0.2.4
0.2.3
Alternative syntax for WebAssembly text format
github.com/ballercat/walt
ballercat/walt
walt-compiler
/
src
/
generator
/
function-pointer.js
15 lines
(12 loc)
•
296 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// @flow
import
opcode
from
'../emitter/opcode'
;
import
type
{
GeneratorType
}
from
'./flow/types'
;
const
generateFunctionPointer
:
GeneratorType
=
node
=>
{
return
[ {
kind
: opcode.
i32Const
,
params
: [
Number
(node.
value
)], }, ]; };
export
default
generateFunctionPointer;