Struct whitespacers::Interpreter
[−]
[src]
pub struct Interpreter<'a> { /* fields omitted */ }
A whitespace interpreter. This struct provides various strategies for interpreting a whitespace program.
Methods
impl<'a> Interpreter<'a>
[src]
fn new(
program: &'a Program,
options: Options,
input: &'a mut BufRead + 'a,
output: &'a mut Write + 'a
) -> Interpreter<'a>
program: &'a Program,
options: Options,
input: &'a mut BufRead + 'a,
output: &'a mut Write + 'a
) -> Interpreter<'a>
Construct a new whitespace interpreter from a program, input stream and output stream with the specified options.
fn count_with_simple_state(&'a mut self) -> Result<usize, WsError>
Similar to Interpreter::interpret_with_simple_state but does not have bigint fallback and returns the amount of executed instructions on success.
fn interpret_with_simple_state(&'a mut self) -> Result<(), WsError>
The reference interpreter implementation. It uses simple data structures internally, falling back to bignum-based simple datastructures if values become too large.
fn interpret_with_fast_state(&'a mut self) -> Result<(), WsError>
Interprets the program with optimized data structures, falling back to bignum-based simple datastructures if values become too large.
fn interpret_with_bigint_state(&'a mut self) -> Result<(), WsError>
Interpret the program using only bignum-based simple datastructures. This is slow.
fn jit_aot(&mut self) -> Result<(), WsError>
Use a jit compiler that compiles the entire program in advance to execute the program. It is backed by an optimized datastructure, and will fall back to interpretation in unsafe situations. When values become too large it will fall back to bignum-based interpretation.
fn jit_sync(&mut self) -> Result<(), WsError>
Use a jit compiler that compiles code synchronously while executing the program. It is backed by an optimized datastructure, and will fall back to interpretation in unsafe situations. When values become too large it will fall back to bignum-based interpretation.
fn jit_threaded(&mut self) -> Result<(), WsError>
Use a jit compiler that compiles the program in a separate thread while executing the program. It is backed by an optimized datastructure, and will fall back to interpretation in unsafe situations. When values become too large it will fall back to bignum-based interpretation.