Struct cranelift_jit::JITBuilder [−][src]
pub struct JITBuilder { /* fields omitted */ }
Expand description
A builder for JITModule
.
Implementations
Create a new JITBuilder
.
The libcall_names
function provides a way to translate cranelift_codegen
’s ir::LibCall
enum to symbols. LibCalls are inserted in the IR as part of the legalization for certain
floating point instructions, and for stack probes. If you don’t know what to use for this
argument, use cranelift_module::default_libcall_names()
.
Create a new JITBuilder
with an arbitrary target. This is mainly
useful for testing.
To create a JITBuilder
for native use, use the new
constructor
instead.
The libcall_names
function provides a way to translate cranelift_codegen
’s ir::LibCall
enum to symbols. LibCalls are inserted in the IR as part of the legalization for certain
floating point instructions, and for stack probes. If you don’t know what to use for this
argument, use cranelift_module::default_libcall_names()
.
Define a symbol in the internal symbol table.
The JIT will use the symbol table to resolve names that are declared, but not defined, in the module being compiled. A common example is external functions. With this method, functions and data can be exposed to the code being compiled which are defined by the host.
If a symbol is defined more than once, the most recent definition will be retained.
If the JIT fails to find a symbol in its internal table, it will fall back to a platform-specific search (this typically involves searching the current process for public symbols, followed by searching the platform’s C runtime).
Define multiple symbols in the internal symbol table.
Using this is equivalent to calling symbol
on each element.
Enable or disable hotswap support. See JITModule::prepare_for_function_redefine
for more information.
Enabling hotswap support requires PIC code.