Module code_server

Code server.

Behaviours: gen_server.

Description

This module is responsible for performing JIT compilation of module

Function Index

atom_resolver/2Get the atom from the atom module index.
code_chunk/1Get the bytecode of a given module.
is_loaded/1Determine if a given module is loaded.
literal_resolver/2Get a module literal from its index.
resume/2Resume a process that was trapped waiting for module to be loaded.
set_native_code/3Associate a native code stream with a module.
start_link/0Start code server.
type_resolver/2Get a type from its index.

Function Details

atom_resolver/2


atom_resolver(Module::module(), Index::non_neg_integer()) -> atom()

Module: module get the atom of
Index: 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 from
Index: 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 resume
LoadResult: 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 of
LabelsCount: number of labels in the module
Stream: resource describing the stream containing native code

returns: ok

Associate a native code stream with a module

type_resolver/2


type_resolver(Module::module(), Index::non_neg_integer()) -> any()

Module: module get a type from
Index: type index in the module

returns: The type information

Get a type from its index