pub struct FunctionCompiler { /* private fields */ }
Implementations
sourceimpl FunctionCompiler
impl FunctionCompiler
pub fn with_parameters(parameters: &[Identifier]) -> Self
pub fn finish(self) -> Procedure
sourceimpl FunctionCompiler
impl FunctionCompiler
pub fn next_instruction_pointer(&self) -> InstructionPointer
pub fn register_for_return(&self) -> RawRegister
pub fn register_for(&mut self, ident: &Identifier) -> RawRegister
pub fn immediate_or_constant_for(
&mut self,
integer: &IntegerLiteral
) -> WildSource<Either<RawRegister, Temporary>>
pub fn constant_for_string(&mut self, string: &StringLiteral) -> ConstantKey
pub fn constant_for_float(&mut self, float: &FloatLiteral) -> ConstantKey
pub fn constant_for_boolean(&mut self, boolean: &BooleanLiteral) -> ConstantKey
pub fn function_key_for(&mut self, function_name: Identifier) -> FunctionKey
pub fn push(&mut self, instruction: Instruction)
sourceimpl FunctionCompiler
impl FunctionCompiler
pub fn compile_statement(&mut self, statement: &Statement)
pub fn compile_while_statement(
&mut self,
condition: &Expression,
body: &[Statement]
)
pub fn compile_if_statement(
&mut self,
condition: &Expression,
body: &[Statement],
else_body: Option<&[Statement]>
)
sourceimpl FunctionCompiler
impl FunctionCompiler
pub fn compile_expression<D: Into<Either<RawRegister, Temporary>>>(
&mut self,
dest: D,
expression: &Expression
)
sourceimpl FunctionCompiler
impl FunctionCompiler
pub fn needs_wildcard(&self, expression: &Expression) -> bool
pub fn compile_into_register(
&mut self,
expression: &Expression
) -> Either<RawRegister, Temporary>
pub fn compile_into_wildcard(
&mut self,
expression: &Expression
) -> WildSource<Either<RawRegister, Temporary>>
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for FunctionCompiler
impl !Send for FunctionCompiler
impl !Sync for FunctionCompiler
impl Unpin for FunctionCompiler
impl !UnwindSafe for FunctionCompiler
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more