diff options
author | Alon Zakai <azakai@google.com> | 2024-03-21 10:52:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-21 10:52:42 -0700 |
commit | ccfd01e960fad738f0a3151970b7124dcd2b9e32 (patch) | |
tree | 5f1f0b2d7f9a47de42b6d58aff5ab552f279c8fe /src | |
parent | 84aed03c452626030156483f5ce6369a4a255491 (diff) | |
download | binaryen-ccfd01e960fad738f0a3151970b7124dcd2b9e32.tar.gz binaryen-ccfd01e960fad738f0a3151970b7124dcd2b9e32.tar.bz2 binaryen-ccfd01e960fad738f0a3151970b7124dcd2b9e32.zip |
[Strings] Implement TODOs in the fuzzer (#6416)
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/fuzzing/fuzzing.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tools/fuzzing/fuzzing.cpp b/src/tools/fuzzing/fuzzing.cpp index ed9eb15e2..1c4ee4cc5 100644 --- a/src/tools/fuzzing/fuzzing.cpp +++ b/src/tools/fuzzing/fuzzing.cpp @@ -2468,9 +2468,14 @@ Expression* TranslateToFuzzReader::makeBasicRef(Type type) { case HeapType::string: return builder.makeStringConst(std::to_string(upTo(1024))); case HeapType::stringview_wtf8: + return builder.makeStringAs( + StringAsWTF8, makeBasicRef(Type(HeapType::string, NonNullable))); case HeapType::stringview_wtf16: + return builder.makeStringAs( + StringAsWTF16, makeBasicRef(Type(HeapType::string, NonNullable))); case HeapType::stringview_iter: - WASM_UNREACHABLE("TODO: strings"); + return builder.makeStringAs( + StringAsIter, makeBasicRef(Type(HeapType::string, NonNullable))); case HeapType::none: case HeapType::noext: case HeapType::nofunc: |