diff options
Diffstat (limited to 'src/wasm/wasm-s-parser.cpp')
-rw-r--r-- | src/wasm/wasm-s-parser.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp index 03dba223b..1087eedc6 100644 --- a/src/wasm/wasm-s-parser.cpp +++ b/src/wasm/wasm-s-parser.cpp @@ -1190,9 +1190,8 @@ Type SExpressionWasmBuilder::stringToType(std::string_view str, if (str.substr(0, 6) == "i31ref" && (prefix || str.size() == 6)) { return Type(HeapType::i31, Nullable); } - if ((str.substr(0, 7) == "dataref" && (prefix || str.size() == 7)) || - (str.substr(0, 9) == "structref" && (prefix || str.size() == 9))) { - return Type(HeapType::data, Nullable); + if (str.substr(0, 9) == "structref" && (prefix || str.size() == 9)) { + return Type(HeapType::struct_, Nullable); } if (str.substr(0, 8) == "arrayref" && (prefix || str.size() == 8)) { return Type(HeapType::array, Nullable); @@ -1242,9 +1241,8 @@ HeapType SExpressionWasmBuilder::stringToHeapType(std::string_view str, if (str.substr(0, 3) == "i31" && (prefix || str.size() == 3)) { return HeapType::i31; } - if ((str.substr(0, 4) == "data" && (prefix || str.size() == 4)) || - (str.substr(0, 6) == "struct" && (prefix || str.size() == 6))) { - return HeapType::data; + if (str.substr(0, 6) == "struct" && (prefix || str.size() == 6)) { + return HeapType::struct_; } if (str.substr(0, 5) == "array" && (prefix || str.size() == 5)) { return HeapType::array; |