Struct cretonne_frontend::FunctionBuilderContext
[−]
[src]
pub struct FunctionBuilderContext<Variable> where
Variable: EntityRef, { /* fields omitted */ }
Structure used for translating a series of functions into Cretonne 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.
The Variable
parameter can be any index-like type that can be made to
implement EntityRef
. For frontends that don't have an obvious type to
use here, variable::Variable
can be used.
Methods
impl<Variable> FunctionBuilderContext<Variable> where
Variable: EntityRef,
[src]
Variable: EntityRef,
pub fn new() -> Self
[src]
Creates a FunctionBuilderContext structure. The structure is automatically cleared after
each FunctionBuilder
completes translating a function.
Trait Implementations
Auto Trait Implementations
impl<Variable> Send for FunctionBuilderContext<Variable> where
Variable: Send,
Variable: Send,
impl<Variable> Sync for FunctionBuilderContext<Variable> where
Variable: Sync,
Variable: Sync,