pub struct BlockCnt {Show 13 fields
pub previous: Option<Box<BlockCnt>>,
pub firstlabel: i32,
pub firstgoto: i32,
pub nactvar: u8,
pub scope_level: u8,
pub upval: bool,
pub isloop: bool,
pub insidetbc: bool,
pub saved_global_strict: bool,
pub saved_declared_globals: usize,
pub saved_global_wildcard: bool,
pub saved_global_wildcard_const: bool,
pub saved_scope_barriers: usize,
}Expand description
In C: stack-allocated, chained via raw *previous pointer.
In Rust: heap-allocated in an Option<Box<BlockCnt>> chain on FuncState.
Fields§
§previous: Option<Box<BlockCnt>>§firstlabel: i32§firstgoto: i32§nactvar: u8§scope_level: u8§upval: bool§isloop: bool§insidetbc: bool§saved_global_strict: boolLua 5.5: the global-declaration scope state (LexState global_strict
and the length of declared_globals) saved on block entry and restored
on exit, so a global declaration is scoped to its enclosing block —
e.g. do global x end does not leak strict mode past the block.
saved_declared_globals: usize§saved_global_wildcard: boolLua 5.5: the global * wildcard flag saved on block entry and restored
on exit, so a global * is scoped to its enclosing block.
saved_global_wildcard_const: bool§saved_scope_barriers: usizeTrait Implementations§
Auto Trait Implementations§
impl Forget for BlockCnt
impl Freeze for BlockCnt
impl Move for BlockCnt
impl RefUnwindSafe for BlockCnt
impl Send for BlockCnt
impl Sync for BlockCnt
impl Unpin for BlockCnt
impl UnsafeUnpin for BlockCnt
impl UnwindSafe for BlockCnt
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