Commit c8976f64 authored by Maria Tîmbur's avatar Maria Tîmbur Committed by V8 LUCI CQ

[fuzzer] Add support for immutable arrays

Add support for immutable arrays.

Bug: v8:11954
Change-Id: Ia343247d5fbc960e0e5b1f9b7cb75e734a747d0e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3240827Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
Reviewed-by: 's avatarManos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Maria Tîmbur <mtimbur@google.com>
Cr-Commit-Position: refs/heads/main@{#77541}
parent 2b96af3b
......@@ -2257,7 +2257,7 @@ class WasmCompileFuzzer : public WasmExecutionFuzzer {
StructType::Builder struct_builder(zone, num_fields);
for (int field_index = 0; field_index < num_fields; field_index++) {
ValueType type = GetValueType(&range, true, num_types, true);
bool mutability = range.get<uint8_t>() < 127;
bool mutability = range.get<bool>();
struct_builder.AddField(type, mutability);
}
StructType* struct_fuz = struct_builder.Build();
......@@ -2266,7 +2266,8 @@ class WasmCompileFuzzer : public WasmExecutionFuzzer {
for (int array_index = 0; array_index < num_arrays; array_index++) {
ValueType type = GetValueType(&range, true, num_types, true);
ArrayType* array_fuz = zone->New<ArrayType>(type, true);
bool mutability = range.get<bool>();
ArrayType* array_fuz = zone->New<ArrayType>(type, mutability);
builder.AddArrayType(array_fuz);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment