pub struct ChunkStats {
pub total_instructions: usize,
pub branch_count: usize,
pub arith_count: usize,
pub mem_count: usize,
pub call_count: usize,
pub max_stack_depth: usize,
}Expand description
Statistics about a bytecode chunk.
Fields§
§total_instructions: usizeTotal number of instructions.
branch_count: usizeNumber of branch instructions.
arith_count: usizeNumber of arithmetic instructions.
mem_count: usizeNumber of load/store instructions.
call_count: usizeNumber of call/return instructions.
max_stack_depth: usizeEstimated max stack depth.
Implementations§
Source§impl ChunkStats
impl ChunkStats
Sourcepub fn compute(chunk: &BytecodeChunk) -> Self
pub fn compute(chunk: &BytecodeChunk) -> Self
Compute statistics for a chunk.
Trait Implementations§
Source§impl Clone for ChunkStats
impl Clone for ChunkStats
Source§fn clone(&self) -> ChunkStats
fn clone(&self) -> ChunkStats
Returns a duplicate 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 moreSource§impl Debug for ChunkStats
impl Debug for ChunkStats
Source§impl Default for ChunkStats
impl Default for ChunkStats
Source§fn default() -> ChunkStats
fn default() -> ChunkStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ChunkStats
impl RefUnwindSafe for ChunkStats
impl Send for ChunkStats
impl Sync for ChunkStats
impl Unpin for ChunkStats
impl UnsafeUnpin for ChunkStats
impl UnwindSafe for ChunkStats
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