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

Method reset

cranelift/codegen/src/inline.rs:295–316  ·  view source on GitHub ↗
(&mut self, callee: &ir::Function)

Source from the content-addressed store, hash-verified

293
294impl InliningAllocs {
295 fn reset(&mut self, callee: &ir::Function) {
296 let InliningAllocs {
297 values,
298 constants,
299 user_external_name_refs,
300 calls_needing_exception_table_fixup,
301 } = self;
302
303 values.clear();
304 values.resize(callee.dfg.len_values());
305
306 constants.clear();
307 constants.resize(callee.dfg.constants.len());
308
309 user_external_name_refs.clear();
310 user_external_name_refs.resize(callee.params.user_named_funcs().len());
311
312 // Note: We do not reserve capacity for
313 // `calls_needing_exception_table_fixup` because it is a sparse set and
314 // we don't know how large it needs to be ahead of time.
315 calls_needing_exception_table_fixup.clear();
316 }
317
318 fn set_inlined_value(
319 &mut self,

Callers 1

inline_oneFunction · 0.45

Calls 5

len_valuesMethod · 0.80
user_named_funcsMethod · 0.80
clearMethod · 0.45
resizeMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected