compile_state::state

Trait SloshVmTrait

Source
pub trait SloshVmTrait {
    // Required methods
    fn set_line_val(&mut self, state: &mut CompileState, val: Value);
    fn get_reserve_global(&mut self, symbol: Interned) -> u32;
    fn set_named_global(&mut self, string: &str, value: Value) -> u32;
    fn set_global_builtin(
        &mut self,
        string: &str,
        func: CallFuncSig<CompileEnvironment>,
    ) -> u32;
    fn dump_globals(&self);
    fn globals(&self) -> &HashMap<Interned, usize>;
    fn own_line(&self) -> Option<u32>;
    fn set_line_num(&mut self, line_num: u32);
    fn line_num(&self) -> u32;
    fn specials(&self) -> &Specials;
    fn global_intern_slot(&self, symbol: Interned) -> Option<u32>;
}

Required Methods§

Source

fn set_line_val(&mut self, state: &mut CompileState, val: Value)

Source

fn get_reserve_global(&mut self, symbol: Interned) -> u32

Source

fn set_named_global(&mut self, string: &str, value: Value) -> u32

Source

fn set_global_builtin( &mut self, string: &str, func: CallFuncSig<CompileEnvironment>, ) -> u32

Source

fn dump_globals(&self)

Source

fn globals(&self) -> &HashMap<Interned, usize>

Source

fn own_line(&self) -> Option<u32>

Source

fn set_line_num(&mut self, line_num: u32)

Source

fn line_num(&self) -> u32

Source

fn specials(&self) -> &Specials

Source

fn global_intern_slot(&self, symbol: Interned) -> Option<u32>

Implementors§