Type Definition bf::peephole::Program [−][src]
type Program = [Statement];
At this level, a program is a rose tree of statements.
All instructions are leaves except for the Loop
instruction, which contains a boxed Program
.
Trait Implementations
impl BytecodeCompilable for Program
[src]
impl BytecodeCompilable for Program
fn with_peephole<F, R>(&self, k: F) -> R where
F: FnOnce(&Program) -> R,
[src]
fn with_peephole<F, R>(&self, k: F) -> R where
F: FnOnce(&Program) -> R,
Compile the given program into the peephole AST to prepare for bytecode compilation.
ⓘImportant traits for Box<R>fn bytecode_compile(&self) -> Box<Program>
[src]
ⓘImportant traits for Box<R>
fn bytecode_compile(&self) -> Box<Program>
Compile the given program to bytecode.
impl Interpretable for Program
[src]
impl Interpretable for Program
fn interpret_state<R: Read, W: Write>(
&self,
state: State,
input: R,
output: W
) -> BfResult<()>
[src]
fn interpret_state<R: Read, W: Write>(
&self,
state: State,
input: R,
output: W
) -> BfResult<()>
Interprets a program against the given state.
fn interpret<R: Read, W: Write>(
&self,
size: Option<usize>,
input: R,
output: W
) -> BfResult<()>
[src]
fn interpret<R: Read, W: Write>(
&self,
size: Option<usize>,
input: R,
output: W
) -> BfResult<()>
Interprets a program. If the given size
is None
, the default memory size.
fn interpret_stdin(&self, size: Option<usize>) -> BfResult<()>
[src]
fn interpret_stdin(&self, size: Option<usize>) -> BfResult<()>
Interprets a program using stdin and stdout for input and output.
fn interpret_memory(
&self,
size: Option<usize>,
input: &[u8]
) -> BfResult<Vec<u8>>
[src]
fn interpret_memory(
&self,
size: Option<usize>,
input: &[u8]
) -> BfResult<Vec<u8>>
Interprets a program from memory, returning a vector of its output.
impl JitCompilable for Program
[src]
impl JitCompilable for Program
fn with_peephole<F, R>(&self, k: F) -> R where
F: FnOnce(&Program) -> R,
[src]
fn with_peephole<F, R>(&self, k: F) -> R where
F: FnOnce(&Program) -> R,
Compile the given program into the peephole AST to prepare for JIT compilation.
fn jit_compile(&self, checked: bool) -> Program
[src]
fn jit_compile(&self, checked: bool) -> Program
JIT compile the given program.
impl LlvmCompilable for Program
[src]
impl LlvmCompilable for Program