pub struct FunctionBuilderContext { /* private fields */ }
Expand description
Structure used for translating a series of functions into Cranelift IR.
In order to reduce memory reallocations when compiling multiple functions,
FunctionBuilderContext
holds various data structures which are cleared between
functions, rather than dropped, preserving the underlying allocations.
Implementations§
source§impl FunctionBuilderContext
impl FunctionBuilderContext
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a FunctionBuilderContext structure. The structure is automatically cleared after
each FunctionBuilder
completes translating a function.
Trait Implementations§
source§impl Default for FunctionBuilderContext
impl Default for FunctionBuilderContext
source§fn default() -> FunctionBuilderContext
fn default() -> FunctionBuilderContext
Returns the “default value” for a type. Read more