fuzzgen: Refactor name and signature generation (#5764)

* fuzzgen: Move cranelift type generation into CraneliftArbitrary

* fuzzgen: Deduplicate DataValue generation

* fuzzgen: Remove unused code

* fuzzgen: Pass allowed function calls into `FunctionGenerator`
This commit is contained in:
Afonso Bordado
2023-02-17 20:48:12 +00:00
committed by GitHub
parent a7bd65d116
commit 853ff787f3
4 changed files with 214 additions and 162 deletions

View File

@@ -30,7 +30,8 @@ pub struct Config {
pub switch_cases: RangeInclusive<usize>,
pub switch_max_range_size: RangeInclusive<usize>,
pub funcrefs_per_function: RangeInclusive<usize>,
/// Number of distinct functions in the same testsuite that we allow calling per function.
pub usercalls: RangeInclusive<usize>,
/// Stack slots.
/// The combination of these two determines stack usage per function
@@ -79,7 +80,7 @@ impl Default for Config {
switch_cases: 0..=64,
// Ranges smaller than 2 don't make sense.
switch_max_range_size: 2..=32,
funcrefs_per_function: 0..=8,
usercalls: 0..=8,
static_stack_slots_per_function: 0..=8,
static_stack_slot_size: 0..=128,
// We need the mix of sizes that allows us to: