summaryrefslogtreecommitdiff
path: root/src/tools/fuzzing/fuzzing.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2024-03-21 10:52:42 -0700
committerGitHub <noreply@github.com>2024-03-21 10:52:42 -0700
commitccfd01e960fad738f0a3151970b7124dcd2b9e32 (patch)
tree5f1f0b2d7f9a47de42b6d58aff5ab552f279c8fe /src/tools/fuzzing/fuzzing.cpp
parent84aed03c452626030156483f5ce6369a4a255491 (diff)
downloadbinaryen-ccfd01e960fad738f0a3151970b7124dcd2b9e32.tar.gz
binaryen-ccfd01e960fad738f0a3151970b7124dcd2b9e32.tar.bz2
binaryen-ccfd01e960fad738f0a3151970b7124dcd2b9e32.zip
[Strings] Implement TODOs in the fuzzer (#6416)
Diffstat (limited to 'src/tools/fuzzing/fuzzing.cpp')
-rw-r--r--src/tools/fuzzing/fuzzing.cpp7
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: