[fuzzer] Generate gc types only in liftoff mode
Bug: v8:11954 Change-Id: I4886109edf5a732736051205076bed78fe78d5e2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3141582 Commit-Queue: Manos Koukoutos <manoskouk@chromium.org> Reviewed-by: Thibaud Michaud <thibaudm@chromium.org> Cr-Commit-Position: refs/heads/main@{#76676}
This commit is contained in:
parent
787bec0964
commit
f7d65d5069
@ -108,6 +108,7 @@ ValueType GetValueType(uint32_t num_types, DataRange* data,
|
||||
kWasmS128, kWasmExternRef,
|
||||
kWasmFuncRef, kWasmEqRef,
|
||||
kWasmAnyRef, ValueType::Ref(HeapType(HeapType::kData), kNullable)};
|
||||
constexpr int kLiftoffOnlyTypeCount = 3; // at the end of {types}.
|
||||
|
||||
if (liftoff_as_reference) {
|
||||
uint32_t id = data->get<uint8_t>() % (arraysize(types) + num_types);
|
||||
@ -116,7 +117,8 @@ ValueType GetValueType(uint32_t num_types, DataRange* data,
|
||||
}
|
||||
return types[id];
|
||||
}
|
||||
return types[data->get<uint8_t>() % arraysize(types)];
|
||||
return types[data->get<uint8_t>() %
|
||||
(arraysize(types) - kLiftoffOnlyTypeCount)];
|
||||
}
|
||||
|
||||
class WasmGenerator {
|
||||
|
Loading…
Reference in New Issue
Block a user