MCPcopy Index your code
hub / github.com/cretz/stackparam / len

Method len

src/bytecode/classfile.rs:366–377  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

364
365impl StackMapFrame {
366 pub fn len(&self) -> usize {
367 match self {
368 &StackMapFrame::SameFrame { tag: _ } => 1,
369 &StackMapFrame::SameLocals1StackItemFrame{ tag: _, ref stack } => 1 + stack.len(),
370 &StackMapFrame::SameLocals1StackItemFrameExtended { offset_delta: _, ref stack } => 3 + stack.len(),
371 &StackMapFrame::ChopFrame { tag: _, offset_delta: _ } => 3,
372 &StackMapFrame::SameFrameExtended { offset_delta: _ } => 3,
373 &StackMapFrame::AppendFrame { tag: _, offset_delta: _, ref locals } => 3 + locals.iter().fold(0, |acc, x| acc + x.len()),
374 &StackMapFrame::FullFrame { offset_delta: _, ref locals, ref stack } => 7 + locals.iter().fold(0, |acc, x| acc + x.len()) + stack.iter().fold(0, |acc, x| acc + x.len()),
375 &StackMapFrame::FutureUse { tag: _ } => 0
376 }
377 }
378}
379
380#[derive(Debug)]

Callers 15

populate_stack_paramsFunction · 0.80
params_to_object_arrayFunction · 0.80
define_manip_classFunction · 0.80
write_classFunction · 0.80
utf8_constFunction · 0.80
str_constFunction · 0.80
class_constFunction · 0.80
name_and_type_constFunction · 0.80
field_ref_constFunction · 0.80
method_ref_constFunction · 0.80
find_ut8_indexMethod · 0.80
cp_lenMethod · 0.80

Calls

no outgoing calls

Tested by 1

bytecode_testsFunction · 0.64