pub struct FuncState {Show 18 fields
pub f: Box<LuaProto>,
pub prev: Option<Box<FuncState>>,
pub bl: Option<Box<BlockCnt>>,
pub pc: i32,
pub lasttarget: i32,
pub previousline: i32,
pub nk: i32,
pub np: i32,
pub nabslineinfo: i32,
pub firstlocal: i32,
pub firstlabel: i32,
pub ndebugvars: i16,
pub nactvar: u8,
pub nups: u8,
pub freereg: u8,
pub iwthabs: u8,
pub needclose: bool,
pub last_token_line: i32,
}Expand description
In C: stack-allocated in body(), chained via raw *prev pointer.
In Rust: heap-allocated via Option<Box<FuncState>> in LexState.
Fields§
§f: Box<LuaProto>PORT NOTE: types.tsv maps this to GcRef
prev: Option<Box<FuncState>>§bl: Option<Box<BlockCnt>>§pc: i32§lasttarget: i32§previousline: i32§nk: i32§np: i32§nabslineinfo: i32§firstlocal: i32§firstlabel: i32§ndebugvars: i16§nactvar: u8§nups: u8§freereg: u8§iwthabs: u8§needclose: bool§last_token_line: i32Current ls.lastline value, mirrored on every sync_from_lex.
Used by emit_inst to attribute the line to the just-consumed token
(matching lua-c’s savelineinfo(fs, f, fs->ls->lastline)), instead
of whatever line the caller threaded down. The threaded line
param is preserved only for explicit overrides (luaK_fixline-style).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FuncState
impl !RefUnwindSafe for FuncState
impl !Send for FuncState
impl !Sync for FuncState
impl Unpin for FuncState
impl UnsafeUnpin for FuncState
impl !UnwindSafe for FuncState
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