Upgrade simdjson from 1.0.2 to latest version 3.0.1 to avoid -mlzcnt compiler flag causing BE UT(macOS) failure. simdjson is now only used by VJsonScanner and disabled by default. So the impact of upgrade is limited.
100 lines
4.5 KiB
Diff
100 lines
4.5 KiB
Diff
diff -Naur a/fuzz/fuzz_dump.cpp b/fuzz/fuzz_dump.cpp
|
|
--- a/fuzz/fuzz_dump.cpp 2022-11-23 23:59:48.000000000 +0800
|
|
+++ b/fuzz/fuzz_dump.cpp 2022-12-27 17:59:16.614067037 +0800
|
|
@@ -48,7 +48,7 @@
|
|
case simdjson::dom::element_type::STRING:
|
|
os << element.get_string().value_unsafe() << endl;
|
|
break;
|
|
- case simdjson::dom::element_type::BOOL:
|
|
+ case simdjson::dom::element_type::BOOLEAN:
|
|
os << element.get_bool().value_unsafe() << endl;
|
|
break;
|
|
case simdjson::dom::element_type::NULL_VALUE:
|
|
diff -Naur a/include/simdjson/dom/element.h b/include/simdjson/dom/element.h
|
|
--- a/include/simdjson/dom/element.h 2022-11-23 23:59:48.000000000 +0800
|
|
+++ b/include/simdjson/dom/element.h 2022-12-27 17:59:16.614067037 +0800
|
|
@@ -27,7 +27,7 @@
|
|
UINT64 = 'u', ///< uint64_t: any integer that fits in uint64_t but *not* int64_t
|
|
DOUBLE = 'd', ///< double: Any number with a "." or "e" that fits in double.
|
|
STRING = '"', ///< std::string_view
|
|
- BOOL = 't', ///< bool
|
|
+ BOOLEAN = 't', ///< bool
|
|
NULL_VALUE = 'n' ///< null
|
|
};
|
|
|
|
diff -Naur a/include/simdjson/dom/element-inl.h b/include/simdjson/dom/element-inl.h
|
|
--- a/include/simdjson/dom/element-inl.h 2022-11-23 23:59:48.000000000 +0800
|
|
+++ b/include/simdjson/dom/element-inl.h 2022-12-27 17:59:16.615067032 +0800
|
|
@@ -188,7 +188,7 @@
|
|
inline element_type element::type() const noexcept {
|
|
SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
|
|
auto tape_type = tape.tape_ref_type();
|
|
- return tape_type == internal::tape_type::FALSE_VALUE ? element_type::BOOL : static_cast<element_type>(tape_type);
|
|
+ return tape_type == internal::tape_type::FALSE_VALUE ? element_type::BOOLEAN : static_cast<element_type>(tape_type);
|
|
}
|
|
|
|
inline simdjson_result<bool> element::get_bool() const noexcept {
|
|
@@ -425,7 +425,7 @@
|
|
return out << "double";
|
|
case element_type::STRING:
|
|
return out << "string";
|
|
- case element_type::BOOL:
|
|
+ case element_type::BOOLEAN:
|
|
return out << "bool";
|
|
case element_type::NULL_VALUE:
|
|
return out << "null";
|
|
diff -Naur a/singleheader/simdjson.h b/singleheader/simdjson.h
|
|
--- a/singleheader/simdjson.h 2022-11-23 23:59:48.000000000 +0800
|
|
+++ b/singleheader/simdjson.h 2022-12-27 17:59:16.619067010 +0800
|
|
@@ -5301,7 +5301,7 @@
|
|
UINT64 = 'u', ///< uint64_t: any integer that fits in uint64_t but *not* int64_t
|
|
DOUBLE = 'd', ///< double: Any number with a "." or "e" that fits in double.
|
|
STRING = '"', ///< std::string_view
|
|
- BOOL = 't', ///< bool
|
|
+ BOOLEAN = 't', ///< bool
|
|
NULL_VALUE = 'n' ///< null
|
|
};
|
|
|
|
@@ -7149,7 +7149,7 @@
|
|
inline element_type element::type() const noexcept {
|
|
SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
|
|
auto tape_type = tape.tape_ref_type();
|
|
- return tape_type == internal::tape_type::FALSE_VALUE ? element_type::BOOL : static_cast<element_type>(tape_type);
|
|
+ return tape_type == internal::tape_type::FALSE_VALUE ? element_type::BOOLEAN : static_cast<element_type>(tape_type);
|
|
}
|
|
|
|
inline simdjson_result<bool> element::get_bool() const noexcept {
|
|
@@ -7386,7 +7386,7 @@
|
|
return out << "double";
|
|
case element_type::STRING:
|
|
return out << "string";
|
|
- case element_type::BOOL:
|
|
+ case element_type::BOOLEAN:
|
|
return out << "bool";
|
|
case element_type::NULL_VALUE:
|
|
return out << "null";
|
|
diff -Naur a/tests/dom/basictests.cpp b/tests/dom/basictests.cpp
|
|
--- a/tests/dom/basictests.cpp 2022-11-23 23:59:48.000000000 +0800
|
|
+++ b/tests/dom/basictests.cpp 2022-12-27 17:59:16.619067010 +0800
|
|
@@ -1567,7 +1567,7 @@
|
|
simdjson_result<dom::element> result = parser.parse(ALL_TYPES_JSON)[key];
|
|
|
|
return true
|
|
- && test_type(result, dom::element_type::BOOL)
|
|
+ && test_type(result, dom::element_type::BOOLEAN)
|
|
&& test_cast_error<dom::array>(result, INCORRECT_TYPE)
|
|
&& test_cast_error<dom::object>(result, INCORRECT_TYPE)
|
|
&& test_cast_error<std::string_view>(result, INCORRECT_TYPE)
|
|
diff -Naur a/tests/dom/readme_examples.cpp b/tests/dom/readme_examples.cpp
|
|
--- a/tests/dom/readme_examples.cpp 2022-11-23 23:59:48.000000000 +0800
|
|
+++ b/tests/dom/readme_examples.cpp 2022-12-27 17:59:16.619067010 +0800
|
|
@@ -208,7 +208,7 @@
|
|
case dom::element_type::STRING:
|
|
cout << std::string_view(element) << endl;
|
|
break;
|
|
- case dom::element_type::BOOL:
|
|
+ case dom::element_type::BOOLEAN:
|
|
cout << bool(element) << endl;
|
|
break;
|
|
case dom::element_type::NULL_VALUE:
|