MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / size

Method size

crates/cranelift/src/compiler.rs:972–984  ·  view source on GitHub ↗
(&self, func_body: &CompiledFunctionBody)

Source from the content-addressed store, hash-verified

970 }
971
972 fn size(&self, func_body: &CompiledFunctionBody) -> u32 {
973 debug_assert!(!func_body.code.is::<CompiledFunction>());
974 debug_assert!(func_body.code.is::<Option<CompilerContext>>());
975 let cx = func_body
976 .code
977 .downcast_ref::<Option<CompilerContext>>()
978 .unwrap()
979 .as_ref()
980 .unwrap();
981 let func = &cx.codegen_context.func;
982 let size = func.dfg.values().len();
983 u32::try_from(size).unwrap()
984 }
985
986 fn inline<'a>(
987 &self,

Callers

nothing calls this directly

Calls 4

unwrapMethod · 0.45
as_refMethod · 0.45
lenMethod · 0.45
valuesMethod · 0.45

Tested by

no test coverage detected