pub struct FunctionObj {
pub package: PackageKey,
pub meta: Meta,
pub flag: FuncFlag,
pub param_count: i32,
pub max_write_index: i32,
pub ret_zeros: Vec<GosValue>,
pub code: Vec<Instruction>,
pub pos: Vec<Option<u32>>,
pub up_ptrs: Vec<ValueDesc>,
pub local_zeros: Vec<GosValue>,
}
Expand description
FunctionObj is the direct container of the Opcode.
Fields§
§package: PackageKey
§meta: Meta
§flag: FuncFlag
§param_count: i32
§max_write_index: i32
§ret_zeros: Vec<GosValue>
§code: Vec<Instruction>
§pos: Vec<Option<u32>>
§up_ptrs: Vec<ValueDesc>
§local_zeros: Vec<GosValue>
Implementations§
Source§impl FunctionObj
impl FunctionObj
pub fn new( package: PackageKey, meta: Meta, metas: &PiggyVec<MetadataKey, MetadataType>, gcc: &GcContainer, flag: FuncFlag, ) -> FunctionObj
pub fn param_count(&self) -> i32
pub fn local_count(&self) -> i32
pub fn ret_count(&self) -> i32
pub fn is_ctor(&self) -> bool
Trait Implementations§
Source§impl Clone for FunctionObj
impl Clone for FunctionObj
Source§fn clone(&self) -> FunctionObj
fn clone(&self) -> FunctionObj
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for FunctionObj
impl !RefUnwindSafe for FunctionObj
impl !Send for FunctionObj
impl !Sync for FunctionObj
impl Unpin for FunctionObj
impl !UnwindSafe for FunctionObj
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