Struct CompileState
pub struct CompileState {
pub symbols: Rc<RefCell<Symbols>>,
pub constants: HashMap<Value, usize>,
pub lets: Option<HashMap<Interned, usize>>,
pub chunk: Chunk,
pub max_regs: usize,
pub tail: bool,
pub defers: usize,
pub doc_string: Option<Value>,
}
Fields§
§symbols: Rc<RefCell<Symbols>>
§constants: HashMap<Value, usize>
§lets: Option<HashMap<Interned, usize>>
§chunk: Chunk
§max_regs: usize
§tail: bool
§defers: usize
§doc_string: Option<Value>
Implementations§
§impl CompileState
impl CompileState
pub fn new() -> CompileState
pub fn new_state( file_name: &'static str, first_line: u32, outer: Option<Rc<RefCell<Symbols>>>, ) -> CompileState
pub fn reserved_regs(&self) -> usize
pub fn get_symbol(&self, sym: Interned) -> Option<usize>
pub fn add_constant(&mut self, exp: Value) -> usize
Trait Implementations§
§impl Default for CompileState
impl Default for CompileState
§fn default() -> CompileState
fn default() -> CompileState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CompileState
impl !RefUnwindSafe for CompileState
impl !Send for CompileState
impl !Sync for CompileState
impl Unpin for CompileState
impl !UnwindSafe for CompileState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more