Struct hexodsp::wblockdsp::Block2JITCompiler
source · [−]pub struct Block2JITCompiler {
idout_var_map: HashMap<String, String>,
lang: Rc<RefCell<BlockLanguage>>,
tmpvar_counter: usize,
}
Fields
idout_var_map: HashMap<String, String>
lang: Rc<RefCell<BlockLanguage>>
tmpvar_counter: usize
Implementations
sourceimpl Block2JITCompiler
impl Block2JITCompiler
pub fn new(lang: Rc<RefCell<BlockLanguage>>) -> Self
pub fn next_tmpvar_name(&mut self, extra: &str) -> String
pub fn store_idout_var(&mut self, id: usize, out: &str, v: &str)
pub fn get_var_for_idout(&self, id: usize, out: &str) -> Option<&str>
fn trans2bjit(
&mut self,
node: &ASTNodeRef,
my_out: Option<String>
) -> Result<Rc<BlkASTNode>, BlkJITCompileError>
fn bjit2jit(
&mut self,
ast: &Rc<BlkASTNode>
) -> Result<Box<ASTNode>, BlkJITCompileError>
pub fn compile(
&mut self,
fun: &BlockFun
) -> Result<Box<ASTNode>, BlkJITCompileError>
Auto Trait Implementations
impl !RefUnwindSafe for Block2JITCompiler
impl !Send for Block2JITCompiler
impl !Sync for Block2JITCompiler
impl Unpin for Block2JITCompiler
impl !UnwindSafe for Block2JITCompiler
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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