Constructor
new FunctionRegistry(memoryManager)
Construct a function registry
Parameters:
Name | Type | Description |
---|---|---|
memoryManager |
MemoryManager | The memory manager |
- Source:
Classes
Methods
findExplicit(name, mangledValues) → {wasmCallback|null}
Find a function that matches the value mangle
Parameters:
Name | Type | Description |
---|---|---|
name |
string | symbol | The common name |
mangledValues |
string | The value mangle |
- Source:
Returns:
- Type
- wasmCallback | null
findImplied(name, values, options) → {wasmCallback|null}
Find a function which matches the arguments
Parameters:
Name | Type | Description |
---|---|---|
name |
string | symbol | The common name of the function |
values |
Array.<any> | The arguments that will be applied to the function |
options |
object | Options for the mangler |
- Source:
Returns:
The wasm callback or null
- Type
- wasmCallback | null
registerExplicit(name, mangledArgs, prototype, callback)
Register a function with an explicit mangle.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | symbol | The function name |
mangledArgs |
string | An explicit mangling of the function prototype |
prototype |
FunctionPrototype | The function prototype |
callback |
wasmCallback | The function to call |
- Source:
registerImplied(name, prototype, callback)
Register a function implied by the arguments.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | symbol | The name of the function |
prototype |
FunctionPrototype | The function prototype |
callback |
wasmCallback | The wasm callback |
- Source: