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

Method stack_slot_with_size

cranelift/fuzzgen/src/function_generator.rs:1286–1295  ·  view source on GitHub ↗

Finds a stack slot with size of at least n bytes

(
        &mut self,
        n: u32,
    )

Source from the content-addressed store, hash-verified

1284
1285 /// Finds a stack slot with size of at least n bytes
1286 fn stack_slot_with_size(
1287 &mut self,
1288 n: u32,
1289 ) -> Result<(StackSlot, StackSize, StackAlignment, AACategory)> {
1290 let first = self
1291 .resources
1292 .stack_slots
1293 .partition_point(|&(_slot, size, _align, _category)| size < n);
1294 Ok(*self.u.choose(&self.resources.stack_slots[first..])?)
1295 }
1296
1297 /// Generates an address that should allow for a store or a load.
1298 ///

Callers 3

insert_stack_loadFunction · 0.80
insert_stack_storeFunction · 0.80

Calls 2

OkFunction · 0.85
partition_pointMethod · 0.80

Tested by

no test coverage detected