From ccfd01e960fad738f0a3151970b7124dcd2b9e32 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 21 Mar 2024 10:52:42 -0700 Subject: [Strings] Implement TODOs in the fuzzer (#6416) --- src/tools/fuzzing/fuzzing.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/tools/fuzzing/fuzzing.cpp') 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: -- cgit v1.2.3