Module code_server
Code server.
Behaviours: gen_server
.
Description
This module is responsible for performing JIT compilation of module
Function Index
atom_resolver/2 | Get the atom from the atom module index. |
code_chunk/1 | Get the bytecode of a given module. |
is_loaded/1 | Determine if a given module is loaded. |
literal_resolver/2 | Get a module literal from its index. |
resume/2 | Resume a process that was trapped waiting for module to be loaded. |
set_native_code/3 | Associate a native code stream with a module. |
start_link/0 | Start code server. |
type_resolver/2 | Get a type from its index. |
Function Details
atom_resolver/2
atom_resolver(Module::module(), Index::non_neg_integer()) -> atom()
Module
: module get the atom ofIndex
: atom index in the module
returns: The atom
Get the atom from the atom module index
code_chunk/1
code_chunk(Module::module()) -> binary()
Module
: module to get the bytecode of
returns: Bytecode of the module, as a binary
Get the bytecode of a given module
is_loaded/1
is_loaded(Module::atom()) -> boolean()
Module
: module to test
returns: true if the module is loaded
Determine if a given module is loaded
literal_resolver/2
literal_resolver(Module::module(), Index::non_neg_integer()) -> any()
Module
: module get a literal fromIndex
: literal index in the module
returns: The module literal
Get a module literal from its index
resume/2
resume(Pid::pid(), LoadResult::ok | undef) -> true
Pid
: process id to resumeLoadResult
: result of the load operation
returns: ok
Resume a process that was trapped waiting for module to be loaded
set_native_code/3
set_native_code(Module::module(), LabelsCount::pos_integer(), Stream::jit:stream()) -> ok
Module
: module to set the native code ofLabelsCount
: number of labels in the moduleStream
: resource describing the stream containing native code
returns: ok
Associate a native code stream with a module
start_link/0
start_link() -> {ok, pid()}
Start code server
type_resolver/2
type_resolver(Module::module(), Index::non_neg_integer()) -> any()
Module
: module get a type fromIndex
: type index in the module
returns: The type information
Get a type from its index