From d40069a018ccd5bfb6fc1b19d2252abb64c074dc Mon Sep 17 00:00:00 2001 From: Pavel P Date: Sun, 26 Apr 2020 03:53:00 +0600 Subject: [PATCH 1/6] Disable deprecation warnings for VS builds fopen/getenv are standard c++ that are not deprecated. --- include/simdjson.h | 1 + include/simdjson/inline/parsedjson_iterator.h | 8 -------- src/simdjson.cpp | 5 ++++- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/include/simdjson.h b/include/simdjson.h index 2dc55de00..6b2db98d3 100644 --- a/include/simdjson.h +++ b/include/simdjson.h @@ -14,6 +14,7 @@ SIMDJSON_PUSH_DISABLE_WARNINGS #if defined(_MSC_VER) && defined(__clang__) SIMDJSON_DISABLE_GCC_WARNING(-Wmicrosoft-include) #endif +SIMDJSON_DISABLE_DEPRECATED_WARNING // Public API #include "simdjson/simdjson_version.h" diff --git a/include/simdjson/inline/parsedjson_iterator.h b/include/simdjson/inline/parsedjson_iterator.h index dad892187..5e8c70d2f 100644 --- a/include/simdjson/inline/parsedjson_iterator.h +++ b/include/simdjson/inline/parsedjson_iterator.h @@ -5,12 +5,6 @@ namespace simdjson { -// VS2017 reports deprecated warnings when you define a deprecated class's methods. -SIMDJSON_PUSH_DISABLE_WARNINGS -SIMDJSON_DISABLE_DEPRECATED_WARNING - -// Because of template weirdness, the actual class definition is inline in the document class - WARN_UNUSED bool dom::parser::Iterator::is_ok() const { return location < tape_length; } @@ -477,8 +471,6 @@ bool dom::parser::Iterator::relative_move_to(const char *pointer, return found; } -SIMDJSON_POP_DISABLE_WARNINGS - } // namespace simdjson #endif // SIMDJSON_INLINE_PARSEDJSON_ITERATOR_H diff --git a/src/simdjson.cpp b/src/simdjson.cpp index 3218ca283..686e1acfe 100644 --- a/src/simdjson.cpp +++ b/src/simdjson.cpp @@ -1,11 +1,14 @@ #include "simdjson.h" +SIMDJSON_PUSH_DISABLE_WARNINGS #if defined(SIMDJSON_CLANG_VISUAL_STUDIO) SIMDJSON_DISABLE_GCC_WARNING(-Wmicrosoft-include) #endif - +SIMDJSON_DISABLE_DEPRECATED_WARNING #include "error.cpp" #include "implementation.cpp" #include "stage1_find_marks.cpp" #include "stage2_build_tape.cpp" + +SIMDJSON_POP_DISABLE_WARNINGS From 1d06624d385c31089f474f14dff642dfa5c30916 Mon Sep 17 00:00:00 2001 From: John Keiser Date: Fri, 1 May 2020 12:10:50 -0700 Subject: [PATCH 2/6] Unset /D_CRT_SECURE_NO_WARNINGS - Also localize DISABLE_DEPRECATED_WARNING so that we catch other deprecations --- include/simdjson.h | 1 - include/simdjson/inline/document.h | 4 ++++ include/simdjson/inline/padded_string.h | 4 ++++ include/simdjson/inline/parsedjson_iterator.h | 8 ++++++++ simdjson-flags.cmake | 2 +- src/implementation.cpp | 4 ++++ src/simdjson.cpp | 1 - tests/jsoncheck.cpp | 14 +++++--------- tests/parse_many_test.cpp | 14 ++++---------- 9 files changed, 30 insertions(+), 22 deletions(-) diff --git a/include/simdjson.h b/include/simdjson.h index 6b2db98d3..2dc55de00 100644 --- a/include/simdjson.h +++ b/include/simdjson.h @@ -14,7 +14,6 @@ SIMDJSON_PUSH_DISABLE_WARNINGS #if defined(_MSC_VER) && defined(__clang__) SIMDJSON_DISABLE_GCC_WARNING(-Wmicrosoft-include) #endif -SIMDJSON_DISABLE_DEPRECATED_WARNING // Public API #include "simdjson/simdjson_version.h" diff --git a/include/simdjson/inline/document.h b/include/simdjson/inline/document.h index 2a4f46c39..19655e7f7 100644 --- a/include/simdjson/inline/document.h +++ b/include/simdjson/inline/document.h @@ -339,7 +339,11 @@ inline bool parser::dump_raw_tape(std::ostream &os) const noexcept { inline simdjson_result parser::read_file(const std::string &path) noexcept { // Open the file + SIMDJSON_PUSH_DISABLE_WARNINGS + SIMDJSON_DISABLE_DEPRECATED_WARNING // Disable CRT_SECURE warning on MSVC: manually verified this is safe std::FILE *fp = std::fopen(path.c_str(), "rb"); + SIMDJSON_POP_DISABLE_WARNINGS + if (fp == nullptr) { return IO_ERROR; } diff --git a/include/simdjson/inline/padded_string.h b/include/simdjson/inline/padded_string.h index 0624194bb..f705d131f 100644 --- a/include/simdjson/inline/padded_string.h +++ b/include/simdjson/inline/padded_string.h @@ -102,7 +102,11 @@ inline padded_string::operator std::string_view() const { return std::string_vie inline simdjson_result padded_string::load(const std::string &filename) noexcept { // Open the file + SIMDJSON_PUSH_DISABLE_WARNINGS + SIMDJSON_DISABLE_DEPRECATED_WARNING // Disable CRT_SECURE warning on MSVC: manually verified this is safe std::FILE *fp = std::fopen(filename.c_str(), "rb"); + SIMDJSON_POP_DISABLE_WARNINGS + if (fp == nullptr) { return IO_ERROR; } diff --git a/include/simdjson/inline/parsedjson_iterator.h b/include/simdjson/inline/parsedjson_iterator.h index 5e8c70d2f..dad892187 100644 --- a/include/simdjson/inline/parsedjson_iterator.h +++ b/include/simdjson/inline/parsedjson_iterator.h @@ -5,6 +5,12 @@ namespace simdjson { +// VS2017 reports deprecated warnings when you define a deprecated class's methods. +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_DEPRECATED_WARNING + +// Because of template weirdness, the actual class definition is inline in the document class + WARN_UNUSED bool dom::parser::Iterator::is_ok() const { return location < tape_length; } @@ -471,6 +477,8 @@ bool dom::parser::Iterator::relative_move_to(const char *pointer, return found; } +SIMDJSON_POP_DISABLE_WARNINGS + } // namespace simdjson #endif // SIMDJSON_INLINE_PARSEDJSON_ITERATOR_H diff --git a/simdjson-flags.cmake b/simdjson-flags.cmake index 3845e0653..96c9c8846 100644 --- a/simdjson-flags.cmake +++ b/simdjson-flags.cmake @@ -39,7 +39,7 @@ add_library(simdjson-internal-flags INTERFACE) target_link_libraries(simdjson-internal-flags INTERFACE simdjson-flags) if(MSVC) - target_compile_options(simdjson-internal-flags INTERFACE /nologo /D_CRT_SECURE_NO_WARNINGS) + target_compile_options(simdjson-internal-flags INTERFACE /nologo) target_compile_options(simdjson-internal-flags INTERFACE /WX /W3 /sdl) else() target_compile_options(simdjson-internal-flags INTERFACE -fPIC) diff --git a/src/implementation.cpp b/src/implementation.cpp index bd2885ad8..0e72d0a6a 100644 --- a/src/implementation.cpp +++ b/src/implementation.cpp @@ -122,7 +122,11 @@ const implementation *available_implementation_list::detect_best_supported() con } const implementation *detect_best_supported_implementation_on_first_use::set_best() const noexcept { + SIMDJSON_PUSH_DISABLE_WARNINGS + SIMDJSON_DISABLE_DEPRECATED_WARNING // Disable CRT_SECURE warning on MSVC: manually verified this is safe char *force_implementation_name = getenv("SIMDJSON_FORCE_IMPLEMENTATION"); + SIMDJSON_POP_DISABLE_WARNINGS + if (force_implementation_name) { auto force_implementation = available_implementations[force_implementation_name]; if (!force_implementation) { diff --git a/src/simdjson.cpp b/src/simdjson.cpp index 686e1acfe..517a19842 100644 --- a/src/simdjson.cpp +++ b/src/simdjson.cpp @@ -4,7 +4,6 @@ SIMDJSON_PUSH_DISABLE_WARNINGS #if defined(SIMDJSON_CLANG_VISUAL_STUDIO) SIMDJSON_DISABLE_GCC_WARNING(-Wmicrosoft-include) #endif -SIMDJSON_DISABLE_DEPRECATED_WARNING #include "error.cpp" #include "implementation.cpp" diff --git a/tests/jsoncheck.cpp b/tests/jsoncheck.cpp index 235b365ac..55c734e69 100644 --- a/tests/jsoncheck.cpp +++ b/tests/jsoncheck.cpp @@ -55,15 +55,11 @@ bool validate(const char *dirname) { if (has_extension(name, extension)) { printf("validating: file %s ", name); fflush(nullptr); - size_t filelen = strlen(name); - char *fullpath = static_cast(malloc(dirlen + filelen + 1 + 1)); - strcpy(fullpath, dirname); - if (needsep) { - fullpath[dirlen] = '/'; - strcpy(fullpath + dirlen + 1, name); - } else { - strcpy(fullpath + dirlen, name); - } + size_t namelen = strlen(name); + size_t fullpathlen = dirlen + 1 + namelen + 1; + char *fullpath = static_cast(malloc(fullpathlen)); + snprintf(fullpath, fullpathlen, "%s%s%s", dirname, needsep ? "/" : "", name); + auto [p, error] = simdjson::padded_string::load(fullpath); if (error) { std::cerr << "Could not load the file " << fullpath << std::endl; diff --git a/tests/parse_many_test.cpp b/tests/parse_many_test.cpp index 2ba08c68c..2353eb04f 100644 --- a/tests/parse_many_test.cpp +++ b/tests/parse_many_test.cpp @@ -63,16 +63,10 @@ bool validate(const char *dirname) { /* Finding the file path */ printf("validating: file %s ", name); fflush(nullptr); - size_t filelen = strlen(name); - char *fullpath = static_cast(malloc(dirlen + filelen + 1 + 1)); - strcpy(fullpath, dirname); - if (needsep) { - fullpath[dirlen] = '/'; - strcpy(fullpath + dirlen + 1, name); - } else { - strcpy(fullpath + dirlen, name); - } - + size_t namelen = strlen(name); + size_t fullpathlen = dirlen + 1 + namelen + 1; + char *fullpath = static_cast(malloc(fullpathlen)); + snprintf(fullpath, fullpathlen, "%s%s%s", dirname, needsep ? "/" : "", name); /* The actual test*/ auto [json, error] = simdjson::padded_string::load(fullpath); From 23dd0bdaa1339618ed32a9cb6bb71370504703b8 Mon Sep 17 00:00:00 2001 From: John Keiser Date: Sat, 2 May 2020 08:54:17 -0700 Subject: [PATCH 3/6] Remove /nologo MSVC flag --- simdjson-flags.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/simdjson-flags.cmake b/simdjson-flags.cmake index 96c9c8846..89b1121d6 100644 --- a/simdjson-flags.cmake +++ b/simdjson-flags.cmake @@ -39,7 +39,6 @@ add_library(simdjson-internal-flags INTERFACE) target_link_libraries(simdjson-internal-flags INTERFACE simdjson-flags) if(MSVC) - target_compile_options(simdjson-internal-flags INTERFACE /nologo) target_compile_options(simdjson-internal-flags INTERFACE /WX /W3 /sdl) else() target_compile_options(simdjson-internal-flags INTERFACE -fPIC) From 5312fd30e569376d9e1970b123ec55abd1c4c6f7 Mon Sep 17 00:00:00 2001 From: John Keiser Date: Fri, 1 May 2020 13:53:23 -0700 Subject: [PATCH 4/6] Fix CRT_SECURE warnings in clang --- benchmark/benchmarker.h | 5 +++++ tests/basictests.cpp | 27 +++++++++++++++++---------- windows/CMakeLists.txt | 2 ++ 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/benchmark/benchmarker.h b/benchmark/benchmarker.h index 56ed56a6c..f87f9e3b7 100644 --- a/benchmark/benchmarker.h +++ b/benchmark/benchmarker.h @@ -2,6 +2,7 @@ #define __BENCHMARKER_H #include "event_counter.h" +#include "simdjson.h" // For SIMDJSON_DISABLE_DEPRECATED_WARNINGS #include #include @@ -435,7 +436,11 @@ struct benchmarker { void print(bool tabbed_output) const { if (tabbed_output) { char* filename_copy = (char*)malloc(strlen(filename)+1); + SIMDJSON_PUSH_DISABLE_WARNINGS + SIMDJSON_DISABLE_DEPRECATED_WARNING // Validated CRT_SECURE safe here strcpy(filename_copy, filename); + SIMDJSON_POP_DISABLE_WARNINGS + #if defined(__linux__) char* base = ::basename(filename_copy); #else diff --git a/tests/basictests.cpp b/tests/basictests.cpp index c233a0e2a..de4632760 100644 --- a/tests/basictests.cpp +++ b/tests/basictests.cpp @@ -74,8 +74,8 @@ namespace number_tests { uint64_t maxulp = 0; for (int i = -1075; i < 1024; ++i) {// large negative values should be zero. double expected = pow(2, i); - auto n = sprintf(buf, "%.*e", std::numeric_limits::max_digits10 - 1, expected); - buf[n] = '\0'; + size_t n = snprintf(buf, sizeof(buf), "%.*e", std::numeric_limits::max_digits10 - 1, expected); + if (n >= sizeof(buf)) { abort(); } fflush(NULL); auto [actual, error] = parser.parse(buf, n).get(); if (error) { std::cerr << error << std::endl; return false; } @@ -167,8 +167,8 @@ namespace number_tests { char buf[1024]; simdjson::dom::parser parser; for (int i = -1000000; i <= 308; ++i) {// large negative values should be zero. - auto n = sprintf(buf,"1e%d", i); - buf[n] = '\0'; + size_t n = snprintf(buf, sizeof(buf), "1e%d", i); + if (n >= sizeof(buf)) { abort(); } fflush(NULL); auto [actual, error] = parser.parse(buf, n).get(); @@ -275,19 +275,22 @@ namespace document_tests { std::vector data; char buf[1024]; for (size_t i = 0; i < n_records; ++i) { - auto n = sprintf(buf, + size_t n = snprintf(buf, sizeof(buf), "{\"id\": %zu, \"name\": \"name%zu\", \"gender\": \"%s\", " "\"school\": {\"id\": %zu, \"name\": \"school%zu\"}}", i, i, (i % 2) ? "male" : "female", i % 10, i % 10); + if (n >= sizeof(buf)) { abort(); } data.emplace_back(std::string(buf, n)); } for (size_t i = 0; i < n_records; ++i) { - auto n = sprintf(buf, "{\"counter\": %f, \"array\": [%s]}", static_cast(i) * 3.1416, - (i % 2) ? "true" : "false"); + size_t n = snprintf(buf, sizeof(buf), "{\"counter\": %f, \"array\": [%s]}", static_cast(i) * 3.1416, + (i % 2) ? "true" : "false"); + if (n >= sizeof(buf)) { abort(); } data.emplace_back(std::string(buf, n)); } for (size_t i = 0; i < n_records; ++i) { - auto n = sprintf(buf, "{\"number\": %e}", static_cast(i) * 10000.31321321); + size_t n = snprintf(buf, sizeof(buf), "{\"number\": %e}", static_cast(i) * 10000.31321321); + if (n >= sizeof(buf)) { abort(); } data.emplace_back(std::string(buf, n)); } data.emplace_back(std::string("true")); @@ -396,10 +399,12 @@ namespace document_stream_tests { std::string data; char buf[1024]; for (size_t i = 0; i < n_records; ++i) { - auto n = sprintf(buf, + size_t n = snprintf(buf, + sizeof(buf), "{\"id\": %zu, \"name\": \"name%zu\", \"gender\": \"%s\", " "\"ete\": {\"id\": %zu, \"name\": \"eventail%zu\"}}", i, i, (i % 2) ? "homme" : "femme", i % 10, i % 10); + if (n >= sizeof(buf)) { abort(); } data += std::string(buf, n); } for(size_t batch_size = 1000; batch_size < 2000; batch_size += (batch_size>1050?10:1)) { @@ -444,10 +449,12 @@ namespace document_stream_tests { std::string data; char buf[1024]; for (size_t i = 0; i < n_records; ++i) { - auto n = sprintf(buf, + size_t n = snprintf(buf, + sizeof(buf), "{\"id\": %zu, \"name\": \"name%zu\", \"gender\": \"%s\", " "\"été\": {\"id\": %zu, \"name\": \"éventail%zu\"}}", i, i, (i % 2) ? "⺃" : "⺕", i % 10, i % 10); + if (n >= sizeof(buf)) { abort(); } data += std::string(buf, n); } for(size_t batch_size = 1000; batch_size < 2000; batch_size += (batch_size>1050?10:1)) { diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt index 464d2e528..7bbb91222 100644 --- a/windows/CMakeLists.txt +++ b/windows/CMakeLists.txt @@ -1,4 +1,6 @@ add_library(simdjson-windows-headers INTERFACE) if(MSVC) target_include_directories(simdjson-windows-headers INTERFACE .) + # getopt.h triggers bogus CRT_SECURE warnings. If you include them, you need this. + target_compile_definitions(simdjson-windows-headers INTERFACE _CRT_SECURE_NO_WARNINGS) endif() From d7f133c24c106b89219a2e59753695d8c9594cc1 Mon Sep 17 00:00:00 2001 From: John Keiser Date: Sat, 2 May 2020 14:49:15 -0700 Subject: [PATCH 5/6] Reamalgamate --- singleheader/simdjson.cpp | 1648 +++++++++++++++++++------------------ singleheader/simdjson.h | 112 +-- 2 files changed, 892 insertions(+), 868 deletions(-) diff --git a/singleheader/simdjson.cpp b/singleheader/simdjson.cpp index e017eeeb8..c9e0d71e7 100644 --- a/singleheader/simdjson.cpp +++ b/singleheader/simdjson.cpp @@ -1,13 +1,13 @@ -/* auto-generated on Mon 27 Apr 2020 21:20:37 EDT. Do not edit! */ -/* begin file simdjson.cpp */ +/* auto-generated on Sat May 2 15:01:27 PDT 2020. Do not edit! */ +/* begin file src/simdjson.cpp */ #include "simdjson.h" +SIMDJSON_PUSH_DISABLE_WARNINGS #if defined(SIMDJSON_CLANG_VISUAL_STUDIO) SIMDJSON_DISABLE_GCC_WARNING(-Wmicrosoft-include) #endif - -/* begin file error.cpp */ +/* begin file src/error.cpp */ namespace simdjson { namespace internal { @@ -42,9 +42,9 @@ namespace internal { } // namespace internal } // namespace simdjson -/* end file */ -/* begin file implementation.cpp */ -/* begin file isadetection.h */ +/* end file src/error.cpp */ +/* begin file src/implementation.cpp */ +/* begin file src/isadetection.h */ /* From https://github.com/endorno/pytorch/blob/master/torch/lib/TH/generic/simd/simd.h Highly modified. @@ -103,12 +103,6 @@ POSSIBILITY OF SUCH DAMAGE. namespace simdjson { -// Can be found on Intel ISA Reference for CPUID -constexpr uint32_t cpuid_avx2_bit = 1 << 5; ///< @private Bit 5 of EBX for EAX=0x7 -constexpr uint32_t cpuid_bmi1_bit = 1 << 3; ///< @private bit 3 of EBX for EAX=0x7 -constexpr uint32_t cpuid_bmi2_bit = 1 << 8; ///< @private bit 8 of EBX for EAX=0x7 -constexpr uint32_t cpuid_sse42_bit = 1 << 20; ///< @private bit 20 of ECX for EAX=0x1 -constexpr uint32_t cpuid_pclmulqdq_bit = 1 << 1; ///< @private bit 1 of ECX for EAX=0x1 enum instruction_set { DEFAULT = 0x0, @@ -136,7 +130,20 @@ static inline uint32_t detect_supported_architectures() { #endif -#else // x86 +#elif defined(__x86_64__) || defined(_M_AMD64) // x64 + + +namespace { +// Can be found on Intel ISA Reference for CPUID +constexpr uint32_t cpuid_avx2_bit = 1 << 5; ///< @private Bit 5 of EBX for EAX=0x7 +constexpr uint32_t cpuid_bmi1_bit = 1 << 3; ///< @private bit 3 of EBX for EAX=0x7 +constexpr uint32_t cpuid_bmi2_bit = 1 << 8; ///< @private bit 8 of EBX for EAX=0x7 +constexpr uint32_t cpuid_sse42_bit = 1 << 20; ///< @private bit 20 of ECX for EAX=0x1 +constexpr uint32_t cpuid_pclmulqdq_bit = 1 << 1; ///< @private bit 1 of ECX for EAX=0x1 +} + + + static inline void cpuid(uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx) { #if defined(_MSC_VER) @@ -192,14 +199,21 @@ static inline uint32_t detect_supported_architectures() { return host_isa; } +#else // fallback + + +static inline uint32_t detect_supported_architectures() { + return instruction_set::DEFAULT; +} + #endif // end SIMD extension detection code } // namespace simdjson #endif // SIMDJSON_ISADETECTION_H -/* end file */ -/* begin file simdprune_tables.h */ +/* end file src/isadetection.h */ +/* begin file src/simdprune_tables.h */ #ifndef SIMDJSON_SIMDPRUNE_TABLES_H #define SIMDJSON_SIMDPRUNE_TABLES_H #include @@ -330,7 +344,7 @@ static const uint64_t thintable_epi8[256] = { } // namespace simdjson #endif // SIMDJSON_SIMDPRUNE_TABLES_H -/* end file */ +/* end file src/simdprune_tables.h */ #include @@ -338,7 +352,7 @@ static const uint64_t thintable_epi8[256] = { // without requiring a static initializer. #if SIMDJSON_IMPLEMENTATION_HASWELL -/* begin file haswell/implementation.h */ +/* begin file src/haswell/implementation.h */ #ifndef SIMDJSON_HASWELL_IMPLEMENTATION_H #define SIMDJSON_HASWELL_IMPLEMENTATION_H @@ -367,12 +381,12 @@ public: } // namespace simdjson #endif // SIMDJSON_HASWELL_IMPLEMENTATION_H -/* end file */ +/* end file src/haswell/implementation.h */ namespace simdjson { namespace internal { const haswell::implementation haswell_singleton{}; } } #endif // SIMDJSON_IMPLEMENTATION_HASWELL #if SIMDJSON_IMPLEMENTATION_WESTMERE -/* begin file westmere/implementation.h */ +/* begin file src/westmere/implementation.h */ #ifndef SIMDJSON_WESTMERE_IMPLEMENTATION_H #define SIMDJSON_WESTMERE_IMPLEMENTATION_H @@ -397,12 +411,12 @@ public: } // namespace simdjson #endif // SIMDJSON_WESTMERE_IMPLEMENTATION_H -/* end file */ +/* end file src/westmere/implementation.h */ namespace simdjson { namespace internal { const westmere::implementation westmere_singleton{}; } } #endif // SIMDJSON_IMPLEMENTATION_WESTMERE #if SIMDJSON_IMPLEMENTATION_ARM64 -/* begin file arm64/implementation.h */ +/* begin file src/arm64/implementation.h */ #ifndef SIMDJSON_ARM64_IMPLEMENTATION_H #define SIMDJSON_ARM64_IMPLEMENTATION_H @@ -427,12 +441,12 @@ public: } // namespace simdjson #endif // SIMDJSON_ARM64_IMPLEMENTATION_H -/* end file */ +/* end file src/arm64/implementation.h */ namespace simdjson { namespace internal { const arm64::implementation arm64_singleton{}; } } #endif // SIMDJSON_IMPLEMENTATION_ARM64 #if SIMDJSON_IMPLEMENTATION_FALLBACK -/* begin file fallback/implementation.h */ +/* begin file src/fallback/implementation.h */ #ifndef SIMDJSON_FALLBACK_IMPLEMENTATION_H #define SIMDJSON_FALLBACK_IMPLEMENTATION_H @@ -462,7 +476,7 @@ public: } // namespace simdjson #endif // SIMDJSON_FALLBACK_IMPLEMENTATION_H -/* end file */ +/* end file src/fallback/implementation.h */ namespace simdjson { namespace internal { const fallback::implementation fallback_singleton{}; } } #endif // SIMDJSON_IMPLEMENTATION_FALLBACK @@ -561,7 +575,11 @@ const implementation *available_implementation_list::detect_best_supported() con } const implementation *detect_best_supported_implementation_on_first_use::set_best() const noexcept { + SIMDJSON_PUSH_DISABLE_WARNINGS + SIMDJSON_DISABLE_DEPRECATED_WARNING // Disable CRT_SECURE warning on MSVC: manually verified this is safe char *force_implementation_name = getenv("SIMDJSON_FORCE_IMPLEMENTATION"); + SIMDJSON_POP_DISABLE_WARNINGS + if (force_implementation_name) { auto force_implementation = available_implementations[force_implementation_name]; if (!force_implementation) { @@ -579,19 +597,19 @@ SIMDJSON_DLLIMPORTEXPORT const internal::available_implementation_list available SIMDJSON_DLLIMPORTEXPORT internal::atomic_ptr active_implementation{&internal::detect_best_supported_implementation_on_first_use_singleton}; } // namespace simdjson -/* end file */ -/* begin file stage1_find_marks.cpp */ +/* end file src/fallback/implementation.h */ +/* begin file src/stage1_find_marks.cpp */ #if SIMDJSON_IMPLEMENTATION_ARM64 -/* begin file arm64/stage1_find_marks.h */ +/* begin file src/arm64/stage1_find_marks.h */ #ifndef SIMDJSON_ARM64_STAGE1_FIND_MARKS_H #define SIMDJSON_ARM64_STAGE1_FIND_MARKS_H -/* begin file arm64/bitmask.h */ +/* begin file src/arm64/bitmask.h */ #ifndef SIMDJSON_ARM64_BITMASK_H #define SIMDJSON_ARM64_BITMASK_H -/* begin file arm64/intrinsics.h */ +/* begin file src/arm64/intrinsics.h */ #ifndef SIMDJSON_ARM64_INTRINSICS_H #define SIMDJSON_ARM64_INTRINSICS_H @@ -601,7 +619,7 @@ SIMDJSON_DLLIMPORTEXPORT internal::atomic_ptr active_imple #include #endif // SIMDJSON_ARM64_INTRINSICS_H -/* end file */ +/* end file src/arm64/intrinsics.h */ namespace simdjson { namespace arm64 { @@ -639,13 +657,13 @@ really_inline uint64_t prefix_xor(uint64_t bitmask) { UNTARGET_REGION #endif -/* end file */ -/* begin file arm64/simd.h */ +/* end file src/arm64/intrinsics.h */ +/* begin file src/arm64/simd.h */ #ifndef SIMDJSON_ARM64_SIMD_H #define SIMDJSON_ARM64_SIMD_H /* simdprune_tables.h already included: #include "simdprune_tables.h" */ -/* begin file arm64/bitmanipulation.h */ +/* begin file src/arm64/bitmanipulation.h */ #ifndef SIMDJSON_ARM64_BITMANIPULATION_H #define SIMDJSON_ARM64_BITMANIPULATION_H @@ -718,7 +736,7 @@ really_inline bool mul_overflow(uint64_t value1, uint64_t value2, uint64_t *resu } // namespace simdjson #endif // SIMDJSON_ARM64_BITMANIPULATION_H -/* end file */ +/* end file src/arm64/bitmanipulation.h */ /* arm64/intrinsics.h already included: #include "arm64/intrinsics.h" */ namespace simdjson { @@ -1109,7 +1127,7 @@ namespace simd { } // namespace simdjson #endif // SIMDJSON_ARM64_SIMD_H -/* end file */ +/* end file src/arm64/bitmanipulation.h */ /* arm64/bitmanipulation.h already included: #include "arm64/bitmanipulation.h" */ /* arm64/implementation.h already included: #include "arm64/implementation.h" */ @@ -1177,7 +1195,7 @@ really_inline simd8 must_be_continuation(simd8 prev1, simd8 struct buf_block_reader { @@ -1226,8 +1244,8 @@ UNUSED static char * format_mask(uint64_t mask) { buf[64] = '\0'; return buf; } -/* end file */ -/* begin file generic/json_string_scanner.h */ +/* end file src/generic/buf_block_reader.h */ +/* begin file src/generic/json_string_scanner.h */ namespace stage1 { struct json_string_block { @@ -1355,8 +1373,8 @@ really_inline error_code json_string_scanner::finish(bool streaming) { } } // namespace stage1 -/* end file */ -/* begin file generic/json_scanner.h */ +/* end file src/generic/json_string_scanner.h */ +/* begin file src/generic/json_scanner.h */ namespace stage1 { /** @@ -1461,9 +1479,9 @@ really_inline error_code json_scanner::finish(bool streaming) { } } // namespace stage1 -/* end file */ +/* end file src/generic/json_scanner.h */ -/* begin file generic/json_minifier.h */ +/* begin file src/generic/json_minifier.h */ // This file contains the common code every implementation uses in stage1 // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is included already includes @@ -1539,12 +1557,12 @@ error_code json_minifier::minify(const uint8_t *buf, size_t len, uint8_t *dst, s } } // namespace stage1 -/* end file */ +/* end file src/generic/json_minifier.h */ WARN_UNUSED error_code implementation::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept { return arm64::stage1::json_minifier::minify<64>(buf, len, dst, dst_len); } -/* begin file generic/utf8_lookup2_algorithm.h */ +/* begin file src/generic/utf8_lookup2_algorithm.h */ // // Detect Unicode errors. // @@ -1970,8 +1988,8 @@ namespace utf8_validation { } using utf8_validation::utf8_checker; -/* end file */ -/* begin file generic/json_structural_indexer.h */ +/* end file src/generic/utf8_lookup2_algorithm.h */ +/* begin file src/generic/json_structural_indexer.h */ // This file contains the common code every implementation uses in stage1 // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is included already includes @@ -2148,7 +2166,7 @@ error_code json_structural_indexer::index(const uint8_t *buf, size_t len, parser } } // namespace stage1 -/* end file */ +/* end file src/generic/json_structural_indexer.h */ WARN_UNUSED error_code implementation::stage1(const uint8_t *buf, size_t len, parser &parser, bool streaming) const noexcept { return arm64::stage1::json_structural_indexer::index<64>(buf, len, parser, streaming); } @@ -2157,10 +2175,10 @@ WARN_UNUSED error_code implementation::stage1(const uint8_t *buf, size_t len, pa } // namespace simdjson #endif // SIMDJSON_ARM64_STAGE1_FIND_MARKS_H -/* end file */ +/* end file src/generic/json_structural_indexer.h */ #endif #if SIMDJSON_IMPLEMENTATION_FALLBACK -/* begin file fallback/stage1_find_marks.h */ +/* begin file src/fallback/stage1_find_marks.h */ #ifndef SIMDJSON_FALLBACK_STAGE1_FIND_MARKS_H #define SIMDJSON_FALLBACK_STAGE1_FIND_MARKS_H @@ -2374,20 +2392,20 @@ WARN_UNUSED error_code implementation::minify(const uint8_t *buf, size_t len, ui } // namespace simdjson #endif // SIMDJSON_FALLBACK_STAGE1_FIND_MARKS_H -/* end file */ +/* end file src/fallback/stage1_find_marks.h */ #endif #if SIMDJSON_IMPLEMENTATION_HASWELL -/* begin file haswell/stage1_find_marks.h */ +/* begin file src/haswell/stage1_find_marks.h */ #ifndef SIMDJSON_HASWELL_STAGE1_FIND_MARKS_H #define SIMDJSON_HASWELL_STAGE1_FIND_MARKS_H -/* begin file haswell/bitmask.h */ +/* begin file src/haswell/bitmask.h */ #ifndef SIMDJSON_HASWELL_BITMASK_H #define SIMDJSON_HASWELL_BITMASK_H -/* begin file haswell/intrinsics.h */ +/* begin file src/haswell/intrinsics.h */ #ifndef SIMDJSON_HASWELL_INTRINSICS_H #define SIMDJSON_HASWELL_INTRINSICS_H @@ -2441,7 +2459,7 @@ UNTARGET_REGION #endif // SIMDJSON_HASWELL_INTRINSICS_H -/* end file */ +/* end file src/haswell/intrinsics.h */ TARGET_HASWELL namespace simdjson { @@ -2466,13 +2484,13 @@ really_inline uint64_t prefix_xor(const uint64_t bitmask) { UNTARGET_REGION #endif // SIMDJSON_HASWELL_BITMASK_H -/* end file */ -/* begin file haswell/simd.h */ +/* end file src/haswell/intrinsics.h */ +/* begin file src/haswell/simd.h */ #ifndef SIMDJSON_HASWELL_SIMD_H #define SIMDJSON_HASWELL_SIMD_H /* simdprune_tables.h already included: #include "simdprune_tables.h" */ -/* begin file haswell/bitmanipulation.h */ +/* begin file src/haswell/bitmanipulation.h */ #ifndef SIMDJSON_HASWELL_BITMANIPULATION_H #define SIMDJSON_HASWELL_BITMANIPULATION_H @@ -2552,7 +2570,7 @@ really_inline bool mul_overflow(uint64_t value1, uint64_t value2, UNTARGET_REGION #endif // SIMDJSON_HASWELL_BITMANIPULATION_H -/* end file */ +/* end file src/haswell/bitmanipulation.h */ /* haswell/intrinsics.h already included: #include "haswell/intrinsics.h" */ TARGET_HASWELL @@ -2924,7 +2942,7 @@ namespace simd { UNTARGET_REGION #endif // SIMDJSON_HASWELL_SIMD_H -/* end file */ +/* end file src/haswell/bitmanipulation.h */ /* haswell/bitmanipulation.h already included: #include "haswell/bitmanipulation.h" */ /* haswell/implementation.h already included: #include "haswell/implementation.h" */ @@ -2980,7 +2998,7 @@ really_inline simd8 must_be_continuation(simd8 prev1, simd8(is_second_byte | is_third_byte | is_fourth_byte) > int8_t(0); } -/* begin file generic/buf_block_reader.h */ +/* begin file src/generic/buf_block_reader.h */ // Walks through a buffer in block-sized increments, loading the last part with spaces template struct buf_block_reader { @@ -3029,8 +3047,8 @@ UNUSED static char * format_mask(uint64_t mask) { buf[64] = '\0'; return buf; } -/* end file */ -/* begin file generic/json_string_scanner.h */ +/* end file src/generic/buf_block_reader.h */ +/* begin file src/generic/json_string_scanner.h */ namespace stage1 { struct json_string_block { @@ -3158,8 +3176,8 @@ really_inline error_code json_string_scanner::finish(bool streaming) { } } // namespace stage1 -/* end file */ -/* begin file generic/json_scanner.h */ +/* end file src/generic/json_string_scanner.h */ +/* begin file src/generic/json_scanner.h */ namespace stage1 { /** @@ -3264,9 +3282,9 @@ really_inline error_code json_scanner::finish(bool streaming) { } } // namespace stage1 -/* end file */ +/* end file src/generic/json_scanner.h */ -/* begin file generic/json_minifier.h */ +/* begin file src/generic/json_minifier.h */ // This file contains the common code every implementation uses in stage1 // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is included already includes @@ -3342,12 +3360,12 @@ error_code json_minifier::minify(const uint8_t *buf, size_t len, uint8_t *dst, s } } // namespace stage1 -/* end file */ +/* end file src/generic/json_minifier.h */ WARN_UNUSED error_code implementation::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept { return haswell::stage1::json_minifier::minify<128>(buf, len, dst, dst_len); } -/* begin file generic/utf8_lookup2_algorithm.h */ +/* begin file src/generic/utf8_lookup2_algorithm.h */ // // Detect Unicode errors. // @@ -3773,8 +3791,8 @@ namespace utf8_validation { } using utf8_validation::utf8_checker; -/* end file */ -/* begin file generic/json_structural_indexer.h */ +/* end file src/generic/utf8_lookup2_algorithm.h */ +/* begin file src/generic/json_structural_indexer.h */ // This file contains the common code every implementation uses in stage1 // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is included already includes @@ -3951,7 +3969,7 @@ error_code json_structural_indexer::index(const uint8_t *buf, size_t len, parser } } // namespace stage1 -/* end file */ +/* end file src/generic/json_structural_indexer.h */ WARN_UNUSED error_code implementation::stage1(const uint8_t *buf, size_t len, parser &parser, bool streaming) const noexcept { return haswell::stage1::json_structural_indexer::index<128>(buf, len, parser, streaming); } @@ -3962,18 +3980,18 @@ WARN_UNUSED error_code implementation::stage1(const uint8_t *buf, size_t len, pa UNTARGET_REGION #endif // SIMDJSON_HASWELL_STAGE1_FIND_MARKS_H -/* end file */ +/* end file src/generic/json_structural_indexer.h */ #endif #if SIMDJSON_IMPLEMENTATION_WESTMERE -/* begin file westmere/stage1_find_marks.h */ +/* begin file src/westmere/stage1_find_marks.h */ #ifndef SIMDJSON_WESTMERE_STAGE1_FIND_MARKS_H #define SIMDJSON_WESTMERE_STAGE1_FIND_MARKS_H -/* begin file westmere/bitmask.h */ +/* begin file src/westmere/bitmask.h */ #ifndef SIMDJSON_WESTMERE_BITMASK_H #define SIMDJSON_WESTMERE_BITMASK_H -/* begin file westmere/intrinsics.h */ +/* begin file src/westmere/intrinsics.h */ #ifndef SIMDJSON_WESTMERE_INTRINSICS_H #define SIMDJSON_WESTMERE_INTRINSICS_H @@ -4001,7 +4019,7 @@ UNTARGET_REGION #endif // SIMDJSON_WESTMERE_INTRINSICS_H -/* end file */ +/* end file src/westmere/intrinsics.h */ TARGET_WESTMERE namespace simdjson { @@ -4026,13 +4044,13 @@ really_inline uint64_t prefix_xor(const uint64_t bitmask) { UNTARGET_REGION #endif // SIMDJSON_WESTMERE_BITMASK_H -/* end file */ -/* begin file westmere/simd.h */ +/* end file src/westmere/intrinsics.h */ +/* begin file src/westmere/simd.h */ #ifndef SIMDJSON_WESTMERE_SIMD_H #define SIMDJSON_WESTMERE_SIMD_H /* simdprune_tables.h already included: #include "simdprune_tables.h" */ -/* begin file westmere/bitmanipulation.h */ +/* begin file src/westmere/bitmanipulation.h */ #ifndef SIMDJSON_WESTMERE_BITMANIPULATION_H #define SIMDJSON_WESTMERE_BITMANIPULATION_H @@ -4121,7 +4139,7 @@ really_inline bool mul_overflow(uint64_t value1, uint64_t value2, UNTARGET_REGION #endif // SIMDJSON_WESTMERE_BITMANIPULATION_H -/* end file */ +/* end file src/westmere/bitmanipulation.h */ /* westmere/intrinsics.h already included: #include "westmere/intrinsics.h" */ @@ -4478,7 +4496,7 @@ namespace simd { UNTARGET_REGION #endif // SIMDJSON_WESTMERE_SIMD_INPUT_H -/* end file */ +/* end file src/westmere/bitmanipulation.h */ /* westmere/bitmanipulation.h already included: #include "westmere/bitmanipulation.h" */ /* westmere/implementation.h already included: #include "westmere/implementation.h" */ @@ -4534,7 +4552,7 @@ really_inline simd8 must_be_continuation(simd8 prev1, simd8(is_second_byte | is_third_byte | is_fourth_byte) > int8_t(0); } -/* begin file generic/buf_block_reader.h */ +/* begin file src/generic/buf_block_reader.h */ // Walks through a buffer in block-sized increments, loading the last part with spaces template struct buf_block_reader { @@ -4583,8 +4601,8 @@ UNUSED static char * format_mask(uint64_t mask) { buf[64] = '\0'; return buf; } -/* end file */ -/* begin file generic/json_string_scanner.h */ +/* end file src/generic/buf_block_reader.h */ +/* begin file src/generic/json_string_scanner.h */ namespace stage1 { struct json_string_block { @@ -4712,8 +4730,8 @@ really_inline error_code json_string_scanner::finish(bool streaming) { } } // namespace stage1 -/* end file */ -/* begin file generic/json_scanner.h */ +/* end file src/generic/json_string_scanner.h */ +/* begin file src/generic/json_scanner.h */ namespace stage1 { /** @@ -4818,9 +4836,9 @@ really_inline error_code json_scanner::finish(bool streaming) { } } // namespace stage1 -/* end file */ +/* end file src/generic/json_scanner.h */ -/* begin file generic/json_minifier.h */ +/* begin file src/generic/json_minifier.h */ // This file contains the common code every implementation uses in stage1 // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is included already includes @@ -4896,12 +4914,12 @@ error_code json_minifier::minify(const uint8_t *buf, size_t len, uint8_t *dst, s } } // namespace stage1 -/* end file */ +/* end file src/generic/json_minifier.h */ WARN_UNUSED error_code implementation::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept { return westmere::stage1::json_minifier::minify<64>(buf, len, dst, dst_len); } -/* begin file generic/utf8_lookup2_algorithm.h */ +/* begin file src/generic/utf8_lookup2_algorithm.h */ // // Detect Unicode errors. // @@ -5327,8 +5345,8 @@ namespace utf8_validation { } using utf8_validation::utf8_checker; -/* end file */ -/* begin file generic/json_structural_indexer.h */ +/* end file src/generic/utf8_lookup2_algorithm.h */ +/* begin file src/generic/json_structural_indexer.h */ // This file contains the common code every implementation uses in stage1 // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is included already includes @@ -5505,7 +5523,7 @@ error_code json_structural_indexer::index(const uint8_t *buf, size_t len, parser } } // namespace stage1 -/* end file */ +/* end file src/generic/json_structural_indexer.h */ WARN_UNUSED error_code implementation::stage1(const uint8_t *buf, size_t len, parser &parser, bool streaming) const noexcept { return westmere::stage1::json_structural_indexer::index<64>(buf, len, parser, streaming); } @@ -5516,13 +5534,13 @@ WARN_UNUSED error_code implementation::stage1(const uint8_t *buf, size_t len, pa UNTARGET_REGION #endif // SIMDJSON_WESTMERE_STAGE1_FIND_MARKS_H -/* end file */ +/* end file src/generic/json_structural_indexer.h */ #endif -/* end file */ -/* begin file stage2_build_tape.cpp */ +/* end file src/generic/json_structural_indexer.h */ +/* begin file src/stage2_build_tape.cpp */ #include #include -/* begin file jsoncharutils.h */ +/* begin file src/jsoncharutils.h */ #ifndef SIMDJSON_JSONCHARUTILS_H #define SIMDJSON_JSONCHARUTILS_H @@ -5779,17 +5797,6 @@ static inline uint32_t hex_to_u32_nocheck( return v1 | v2 | v3 | v4; } -// returns true if the provided byte value is a -// "continuing" UTF-8 value, that is, if it starts with -// 0b10... -static inline bool is_utf8_continuing(char c) { - // in 2 complement's notation, values start at 0b10000 (-128)... and - // go up to 0b11111 (-1)... so we want all values from -128 to -65 (which is 0b10111111) - return ((signed char)c) <= -65; -} - - - // given a code point cp, writes to c // the utf-8 code, outputting the length in // bytes, if the length is zero, the code point @@ -5831,7 +5838,6 @@ inline size_t codepoint_to_utf8(uint32_t cp, uint8_t *c) { return 0; // bad r } - //// // The following code is used in number parsing. It is not // properly "char utils" stuff, but we move it here so that @@ -5839,7 +5845,6 @@ inline size_t codepoint_to_utf8(uint32_t cp, uint8_t *c) { // per instruction set). /// - constexpr int FASTFLOAT_SMALLEST_POWER = -325; constexpr int FASTFLOAT_LARGEST_POWER = 308; @@ -5848,7 +5853,8 @@ struct value128 { uint64_t high; }; -#if defined(SIMDJSON_REGULAR_VISUAL_STUDIO) && !defined(_M_X64) // _umul128 for x86, arm, arm64 +#if defined(SIMDJSON_REGULAR_VISUAL_STUDIO) && \ + !defined(_M_X64) // _umul128 for x86, arm, arm64 #if defined(_M_ARM) static inline uint64_t __emulu(uint32_t x, uint32_t y) { return x * (uint64_t)y; @@ -5860,7 +5866,8 @@ static inline uint64_t _umul128(uint64_t ab, uint64_t cd, uint64_t *hi) { uint64_t adbc = ad + __emulu((uint32_t)ab, (uint32_t)(cd >> 32)); uint64_t adbc_carry = !!(adbc < ad); uint64_t lo = bd + (adbc << 32); - *hi = __emulu((uint32_t)(ab >> 32), (uint32_t)(cd >> 32)) + (adbc >> 32) + (adbc_carry << 32) + !!(lo < bd); + *hi = __emulu((uint32_t)(ab >> 32), (uint32_t)(cd >> 32)) + (adbc >> 32) + + (adbc_carry << 32) + !!(lo < bd); return lo; } #endif @@ -6218,647 +6225,648 @@ static const components power_of_ten_components[] = { // A complement from power_of_ten_components // complete to a 128-bit mantissa. -const uint64_t mantissa_128[] = {0x419ea3bd35385e2d, - 0x52064cac828675b9, - 0x7343efebd1940993, - 0x1014ebe6c5f90bf8, - 0xd41a26e077774ef6, - 0x8920b098955522b4, - 0x55b46e5f5d5535b0, - 0xeb2189f734aa831d, - 0xa5e9ec7501d523e4, - 0x47b233c92125366e, - 0x999ec0bb696e840a, - 0xc00670ea43ca250d, - 0x380406926a5e5728, - 0xc605083704f5ecf2, - 0xf7864a44c633682e, - 0x7ab3ee6afbe0211d, - 0x5960ea05bad82964, - 0x6fb92487298e33bd, - 0xa5d3b6d479f8e056, - 0x8f48a4899877186c, - 0x331acdabfe94de87, - 0x9ff0c08b7f1d0b14, - 0x7ecf0ae5ee44dd9, - 0xc9e82cd9f69d6150, - 0xbe311c083a225cd2, - 0x6dbd630a48aaf406, - 0x92cbbccdad5b108, - 0x25bbf56008c58ea5, - 0xaf2af2b80af6f24e, - 0x1af5af660db4aee1, - 0x50d98d9fc890ed4d, - 0xe50ff107bab528a0, - 0x1e53ed49a96272c8, - 0x25e8e89c13bb0f7a, - 0x77b191618c54e9ac, - 0xd59df5b9ef6a2417, - 0x4b0573286b44ad1d, - 0x4ee367f9430aec32, - 0x229c41f793cda73f, - 0x6b43527578c1110f, - 0x830a13896b78aaa9, - 0x23cc986bc656d553, - 0x2cbfbe86b7ec8aa8, - 0x7bf7d71432f3d6a9, - 0xdaf5ccd93fb0cc53, - 0xd1b3400f8f9cff68, - 0x23100809b9c21fa1, - 0xabd40a0c2832a78a, - 0x16c90c8f323f516c, - 0xae3da7d97f6792e3, - 0x99cd11cfdf41779c, - 0x40405643d711d583, - 0x482835ea666b2572, - 0xda3243650005eecf, - 0x90bed43e40076a82, - 0x5a7744a6e804a291, - 0x711515d0a205cb36, - 0xd5a5b44ca873e03, - 0xe858790afe9486c2, - 0x626e974dbe39a872, - 0xfb0a3d212dc8128f, - 0x7ce66634bc9d0b99, - 0x1c1fffc1ebc44e80, - 0xa327ffb266b56220, - 0x4bf1ff9f0062baa8, - 0x6f773fc3603db4a9, - 0xcb550fb4384d21d3, - 0x7e2a53a146606a48, - 0x2eda7444cbfc426d, - 0xfa911155fefb5308, - 0x793555ab7eba27ca, - 0x4bc1558b2f3458de, - 0x9eb1aaedfb016f16, - 0x465e15a979c1cadc, - 0xbfacd89ec191ec9, - 0xcef980ec671f667b, - 0x82b7e12780e7401a, - 0xd1b2ecb8b0908810, - 0x861fa7e6dcb4aa15, - 0x67a791e093e1d49a, - 0xe0c8bb2c5c6d24e0, - 0x58fae9f773886e18, - 0xaf39a475506a899e, - 0x6d8406c952429603, - 0xc8e5087ba6d33b83, - 0xfb1e4a9a90880a64, - 0x5cf2eea09a55067f, - 0xf42faa48c0ea481e, - 0xf13b94daf124da26, - 0x76c53d08d6b70858, - 0x54768c4b0c64ca6e, - 0xa9942f5dcf7dfd09, - 0xd3f93b35435d7c4c, - 0xc47bc5014a1a6daf, - 0x359ab6419ca1091b, - 0xc30163d203c94b62, - 0x79e0de63425dcf1d, - 0x985915fc12f542e4, - 0x3e6f5b7b17b2939d, - 0xa705992ceecf9c42, - 0x50c6ff782a838353, - 0xa4f8bf5635246428, - 0x871b7795e136be99, - 0x28e2557b59846e3f, - 0x331aeada2fe589cf, - 0x3ff0d2c85def7621, - 0xfed077a756b53a9, - 0xd3e8495912c62894, - 0x64712dd7abbbd95c, - 0xbd8d794d96aacfb3, - 0xecf0d7a0fc5583a0, - 0xf41686c49db57244, - 0x311c2875c522ced5, - 0x7d633293366b828b, - 0xae5dff9c02033197, - 0xd9f57f830283fdfc, - 0xd072df63c324fd7b, - 0x4247cb9e59f71e6d, - 0x52d9be85f074e608, - 0x67902e276c921f8b, - 0xba1cd8a3db53b6, - 0x80e8a40eccd228a4, - 0x6122cd128006b2cd, - 0x796b805720085f81, - 0xcbe3303674053bb0, - 0xbedbfc4411068a9c, - 0xee92fb5515482d44, - 0x751bdd152d4d1c4a, - 0xd262d45a78a0635d, - 0x86fb897116c87c34, - 0xd45d35e6ae3d4da0, - 0x8974836059cca109, - 0x2bd1a438703fc94b, - 0x7b6306a34627ddcf, - 0x1a3bc84c17b1d542, - 0x20caba5f1d9e4a93, - 0x547eb47b7282ee9c, - 0xe99e619a4f23aa43, - 0x6405fa00e2ec94d4, - 0xde83bc408dd3dd04, - 0x9624ab50b148d445, - 0x3badd624dd9b0957, - 0xe54ca5d70a80e5d6, - 0x5e9fcf4ccd211f4c, - 0x7647c3200069671f, - 0x29ecd9f40041e073, - 0xf468107100525890, - 0x7182148d4066eeb4, - 0xc6f14cd848405530, - 0xb8ada00e5a506a7c, - 0xa6d90811f0e4851c, - 0x908f4a166d1da663, - 0x9a598e4e043287fe, - 0x40eff1e1853f29fd, - 0xd12bee59e68ef47c, - 0x82bb74f8301958ce, - 0xe36a52363c1faf01, - 0xdc44e6c3cb279ac1, - 0x29ab103a5ef8c0b9, - 0x7415d448f6b6f0e7, - 0x111b495b3464ad21, - 0xcab10dd900beec34, - 0x3d5d514f40eea742, - 0xcb4a5a3112a5112, - 0x47f0e785eaba72ab, - 0x59ed216765690f56, - 0x306869c13ec3532c, - 0x1e414218c73a13fb, - 0xe5d1929ef90898fa, - 0xdf45f746b74abf39, - 0x6b8bba8c328eb783, - 0x66ea92f3f326564, - 0xc80a537b0efefebd, - 0xbd06742ce95f5f36, - 0x2c48113823b73704, - 0xf75a15862ca504c5, - 0x9a984d73dbe722fb, - 0xc13e60d0d2e0ebba, - 0x318df905079926a8, - 0xfdf17746497f7052, - 0xfeb6ea8bedefa633, - 0xfe64a52ee96b8fc0, - 0x3dfdce7aa3c673b0, - 0x6bea10ca65c084e, - 0x486e494fcff30a62, - 0x5a89dba3c3efccfa, - 0xf89629465a75e01c, - 0xf6bbb397f1135823, - 0x746aa07ded582e2c, - 0xa8c2a44eb4571cdc, - 0x92f34d62616ce413, - 0x77b020baf9c81d17, - 0xace1474dc1d122e, - 0xd819992132456ba, - 0x10e1fff697ed6c69, - 0xca8d3ffa1ef463c1, - 0xbd308ff8a6b17cb2, - 0xac7cb3f6d05ddbde, - 0x6bcdf07a423aa96b, - 0x86c16c98d2c953c6, - 0xe871c7bf077ba8b7, - 0x11471cd764ad4972, - 0xd598e40d3dd89bcf, - 0x4aff1d108d4ec2c3, - 0xcedf722a585139ba, - 0xc2974eb4ee658828, - 0x733d226229feea32, - 0x806357d5a3f525f, - 0xca07c2dcb0cf26f7, - 0xfc89b393dd02f0b5, - 0xbbac2078d443ace2, - 0xd54b944b84aa4c0d, - 0xa9e795e65d4df11, - 0x4d4617b5ff4a16d5, - 0x504bced1bf8e4e45, - 0xe45ec2862f71e1d6, - 0x5d767327bb4e5a4c, - 0x3a6a07f8d510f86f, - 0x890489f70a55368b, - 0x2b45ac74ccea842e, - 0x3b0b8bc90012929d, - 0x9ce6ebb40173744, - 0xcc420a6a101d0515, - 0x9fa946824a12232d, - 0x47939822dc96abf9, - 0x59787e2b93bc56f7, - 0x57eb4edb3c55b65a, - 0xede622920b6b23f1, - 0xe95fab368e45eced, - 0x11dbcb0218ebb414, - 0xd652bdc29f26a119, - 0x4be76d3346f0495f, - 0x6f70a4400c562ddb, - 0xcb4ccd500f6bb952, - 0x7e2000a41346a7a7, - 0x8ed400668c0c28c8, - 0x728900802f0f32fa, - 0x4f2b40a03ad2ffb9, - 0xe2f610c84987bfa8, - 0xdd9ca7d2df4d7c9, - 0x91503d1c79720dbb, - 0x75a44c6397ce912a, - 0xc986afbe3ee11aba, - 0xfbe85badce996168, - 0xfae27299423fb9c3, - 0xdccd879fc967d41a, - 0x5400e987bbc1c920, - 0x290123e9aab23b68, - 0xf9a0b6720aaf6521, - 0xf808e40e8d5b3e69, - 0xb60b1d1230b20e04, - 0xb1c6f22b5e6f48c2, - 0x1e38aeb6360b1af3, - 0x25c6da63c38de1b0, - 0x579c487e5a38ad0e, - 0x2d835a9df0c6d851, - 0xf8e431456cf88e65, - 0x1b8e9ecb641b58ff, - 0xe272467e3d222f3f, - 0x5b0ed81dcc6abb0f, - 0x98e947129fc2b4e9, - 0x3f2398d747b36224, - 0x8eec7f0d19a03aad, - 0x1953cf68300424ac, - 0x5fa8c3423c052dd7, - 0x3792f412cb06794d, - 0xe2bbd88bbee40bd0, - 0x5b6aceaeae9d0ec4, - 0xf245825a5a445275, - 0xeed6e2f0f0d56712, - 0x55464dd69685606b, - 0xaa97e14c3c26b886, - 0xd53dd99f4b3066a8, - 0xe546a8038efe4029, - 0xde98520472bdd033, - 0x963e66858f6d4440, - 0xdde7001379a44aa8, - 0x5560c018580d5d52, - 0xaab8f01e6e10b4a6, - 0xcab3961304ca70e8, - 0x3d607b97c5fd0d22, - 0x8cb89a7db77c506a, - 0x77f3608e92adb242, - 0x55f038b237591ed3, - 0x6b6c46dec52f6688, - 0x2323ac4b3b3da015, - 0xabec975e0a0d081a, - 0x96e7bd358c904a21, - 0x7e50d64177da2e54, - 0xdde50bd1d5d0b9e9, - 0x955e4ec64b44e864, - 0xbd5af13bef0b113e, - 0xecb1ad8aeacdd58e, - 0x67de18eda5814af2, - 0x80eacf948770ced7, - 0xa1258379a94d028d, - 0x96ee45813a04330, - 0x8bca9d6e188853fc, - 0x775ea264cf55347d, - 0x95364afe032a819d, - 0x3a83ddbd83f52204, - 0xc4926a9672793542, - 0x75b7053c0f178293, - 0x5324c68b12dd6338, - 0xd3f6fc16ebca5e03, - 0x88f4bb1ca6bcf584, - 0x2b31e9e3d06c32e5, - 0x3aff322e62439fcf, - 0x9befeb9fad487c2, - 0x4c2ebe687989a9b3, - 0xf9d37014bf60a10, - 0x538484c19ef38c94, - 0x2865a5f206b06fb9, - 0xf93f87b7442e45d3, - 0xf78f69a51539d748, - 0xb573440e5a884d1b, - 0x31680a88f8953030, - 0xfdc20d2b36ba7c3d, - 0x3d32907604691b4c, - 0xa63f9a49c2c1b10f, - 0xfcf80dc33721d53, - 0xd3c36113404ea4a8, - 0x645a1cac083126e9, - 0x3d70a3d70a3d70a3, - 0xcccccccccccccccc, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x0, - 0x4000000000000000, - 0x5000000000000000, - 0xa400000000000000, - 0x4d00000000000000, - 0xf020000000000000, - 0x6c28000000000000, - 0xc732000000000000, - 0x3c7f400000000000, - 0x4b9f100000000000, - 0x1e86d40000000000, - 0x1314448000000000, - 0x17d955a000000000, - 0x5dcfab0800000000, - 0x5aa1cae500000000, - 0xf14a3d9e40000000, - 0x6d9ccd05d0000000, - 0xe4820023a2000000, - 0xdda2802c8a800000, - 0xd50b2037ad200000, - 0x4526f422cc340000, - 0x9670b12b7f410000, - 0x3c0cdd765f114000, - 0xa5880a69fb6ac800, - 0x8eea0d047a457a00, - 0x72a4904598d6d880, - 0x47a6da2b7f864750, - 0x999090b65f67d924, - 0xfff4b4e3f741cf6d, - 0xbff8f10e7a8921a4, - 0xaff72d52192b6a0d, - 0x9bf4f8a69f764490, - 0x2f236d04753d5b4, - 0x1d762422c946590, - 0x424d3ad2b7b97ef5, - 0xd2e0898765a7deb2, - 0x63cc55f49f88eb2f, - 0x3cbf6b71c76b25fb, - 0x8bef464e3945ef7a, - 0x97758bf0e3cbb5ac, - 0x3d52eeed1cbea317, - 0x4ca7aaa863ee4bdd, - 0x8fe8caa93e74ef6a, - 0xb3e2fd538e122b44, - 0x60dbbca87196b616, - 0xbc8955e946fe31cd, - 0x6babab6398bdbe41, - 0xc696963c7eed2dd1, - 0xfc1e1de5cf543ca2, - 0x3b25a55f43294bcb, - 0x49ef0eb713f39ebe, - 0x6e3569326c784337, - 0x49c2c37f07965404, - 0xdc33745ec97be906, - 0x69a028bb3ded71a3, - 0xc40832ea0d68ce0c, - 0xf50a3fa490c30190, - 0x792667c6da79e0fa, - 0x577001b891185938, - 0xed4c0226b55e6f86, - 0x544f8158315b05b4, - 0x696361ae3db1c721, - 0x3bc3a19cd1e38e9, - 0x4ab48a04065c723, - 0x62eb0d64283f9c76, - 0x3ba5d0bd324f8394, - 0xca8f44ec7ee36479, - 0x7e998b13cf4e1ecb, - 0x9e3fedd8c321a67e, - 0xc5cfe94ef3ea101e, - 0xbba1f1d158724a12, - 0x2a8a6e45ae8edc97, - 0xf52d09d71a3293bd, - 0x593c2626705f9c56, - 0x6f8b2fb00c77836c, - 0xb6dfb9c0f956447, - 0x4724bd4189bd5eac, - 0x58edec91ec2cb657, - 0x2f2967b66737e3ed, - 0xbd79e0d20082ee74, - 0xecd8590680a3aa11, - 0xe80e6f4820cc9495, - 0x3109058d147fdcdd, - 0xbd4b46f0599fd415, - 0x6c9e18ac7007c91a, - 0x3e2cf6bc604ddb0, - 0x84db8346b786151c, - 0xe612641865679a63, - 0x4fcb7e8f3f60c07e, - 0xe3be5e330f38f09d, - 0x5cadf5bfd3072cc5, - 0x73d9732fc7c8f7f6, - 0x2867e7fddcdd9afa, - 0xb281e1fd541501b8, - 0x1f225a7ca91a4226, - 0x3375788de9b06958, - 0x52d6b1641c83ae, - 0xc0678c5dbd23a49a, - 0xf840b7ba963646e0, - 0xb650e5a93bc3d898, - 0xa3e51f138ab4cebe, - 0xc66f336c36b10137, - 0xb80b0047445d4184, - 0xa60dc059157491e5, - 0x87c89837ad68db2f, - 0x29babe4598c311fb, - 0xf4296dd6fef3d67a, - 0x1899e4a65f58660c, - 0x5ec05dcff72e7f8f, - 0x76707543f4fa1f73, - 0x6a06494a791c53a8, - 0x487db9d17636892, - 0x45a9d2845d3c42b6, - 0xb8a2392ba45a9b2, - 0x8e6cac7768d7141e, - 0x3207d795430cd926, - 0x7f44e6bd49e807b8, - 0x5f16206c9c6209a6, - 0x36dba887c37a8c0f, - 0xc2494954da2c9789, - 0xf2db9baa10b7bd6c, - 0x6f92829494e5acc7, - 0xcb772339ba1f17f9, - 0xff2a760414536efb, - 0xfef5138519684aba, - 0x7eb258665fc25d69, - 0xef2f773ffbd97a61, - 0xaafb550ffacfd8fa, - 0x95ba2a53f983cf38, - 0xdd945a747bf26183, - 0x94f971119aeef9e4, - 0x7a37cd5601aab85d, - 0xac62e055c10ab33a, - 0x577b986b314d6009, - 0xed5a7e85fda0b80b, - 0x14588f13be847307, - 0x596eb2d8ae258fc8, - 0x6fca5f8ed9aef3bb, - 0x25de7bb9480d5854, - 0xaf561aa79a10ae6a, - 0x1b2ba1518094da04, - 0x90fb44d2f05d0842, - 0x353a1607ac744a53, - 0x42889b8997915ce8, - 0x69956135febada11, - 0x43fab9837e699095, - 0x94f967e45e03f4bb, - 0x1d1be0eebac278f5, - 0x6462d92a69731732, - 0x7d7b8f7503cfdcfe, - 0x5cda735244c3d43e, - 0x3a0888136afa64a7, - 0x88aaa1845b8fdd0, - 0x8aad549e57273d45, - 0x36ac54e2f678864b, - 0x84576a1bb416a7dd, - 0x656d44a2a11c51d5, - 0x9f644ae5a4b1b325, - 0x873d5d9f0dde1fee, - 0xa90cb506d155a7ea, - 0x9a7f12442d588f2, - 0xc11ed6d538aeb2f, - 0x8f1668c8a86da5fa, - 0xf96e017d694487bc, - 0x37c981dcc395a9ac, - 0x85bbe253f47b1417, - 0x93956d7478ccec8e, - 0x387ac8d1970027b2, - 0x6997b05fcc0319e, - 0x441fece3bdf81f03, - 0xd527e81cad7626c3, - 0x8a71e223d8d3b074, - 0xf6872d5667844e49, - 0xb428f8ac016561db, - 0xe13336d701beba52, - 0xecc0024661173473, - 0x27f002d7f95d0190, - 0x31ec038df7b441f4, - 0x7e67047175a15271, - 0xf0062c6e984d386, - 0x52c07b78a3e60868, - 0xa7709a56ccdf8a82, - 0x88a66076400bb691, - 0x6acff893d00ea435, - 0x583f6b8c4124d43, - 0xc3727a337a8b704a, - 0x744f18c0592e4c5c, - 0x1162def06f79df73, - 0x8addcb5645ac2ba8, - 0x6d953e2bd7173692, - 0xc8fa8db6ccdd0437, - 0x1d9c9892400a22a2, - 0x2503beb6d00cab4b, - 0x2e44ae64840fd61d, - 0x5ceaecfed289e5d2, - 0x7425a83e872c5f47, - 0xd12f124e28f77719, - 0x82bd6b70d99aaa6f, - 0x636cc64d1001550b, - 0x3c47f7e05401aa4e, - 0x65acfaec34810a71, - 0x7f1839a741a14d0d, - 0x1ede48111209a050, - 0x934aed0aab460432, - 0xf81da84d5617853f, - 0x36251260ab9d668e, - 0xc1d72b7c6b426019, - 0xb24cf65b8612f81f, - 0xdee033f26797b627, - 0x169840ef017da3b1, - 0x8e1f289560ee864e, - 0xf1a6f2bab92a27e2, - 0xae10af696774b1db, - 0xacca6da1e0a8ef29, - 0x17fd090a58d32af3, - 0xddfc4b4cef07f5b0, - 0x4abdaf101564f98e, - 0x9d6d1ad41abe37f1, - 0x84c86189216dc5ed, - 0x32fd3cf5b4e49bb4, - 0x3fbc8c33221dc2a1, - 0xfabaf3feaa5334a, - 0x29cb4d87f2a7400e, - 0x743e20e9ef511012, - 0x914da9246b255416, - 0x1ad089b6c2f7548e, - 0xa184ac2473b529b1, - 0xc9e5d72d90a2741e, - 0x7e2fa67c7a658892, - 0xddbb901b98feeab7, - 0x552a74227f3ea565, - 0xd53a88958f87275f, - 0x8a892abaf368f137, - 0x2d2b7569b0432d85, - 0x9c3b29620e29fc73, - 0x8349f3ba91b47b8f, - 0x241c70a936219a73, - 0xed238cd383aa0110, - 0xf4363804324a40aa, - 0xb143c6053edcd0d5, - 0xdd94b7868e94050a, - 0xca7cf2b4191c8326, - 0xfd1c2f611f63a3f0, - 0xbc633b39673c8cec, - 0xd5be0503e085d813, - 0x4b2d8644d8a74e18, - 0xddf8e7d60ed1219e, - 0xcabb90e5c942b503, - 0x3d6a751f3b936243, - 0xcc512670a783ad4, - 0x27fb2b80668b24c5, - 0xb1f9f660802dedf6, - 0x5e7873f8a0396973, - 0xdb0b487b6423e1e8, - 0x91ce1a9a3d2cda62, - 0x7641a140cc7810fb, - 0xa9e904c87fcb0a9d, - 0x546345fa9fbdcd44, - 0xa97c177947ad4095, - 0x49ed8eabcccc485d, - 0x5c68f256bfff5a74, - 0x73832eec6fff3111, - 0xc831fd53c5ff7eab, - 0xba3e7ca8b77f5e55, - 0x28ce1bd2e55f35eb, - 0x7980d163cf5b81b3, - 0xd7e105bcc332621f, - 0x8dd9472bf3fefaa7, - 0xb14f98f6f0feb951, - 0x6ed1bf9a569f33d3, - 0xa862f80ec4700c8, - 0xcd27bb612758c0fa, - 0x8038d51cb897789c, - 0xe0470a63e6bd56c3, - 0x1858ccfce06cac74, - 0xf37801e0c43ebc8, - 0xd30560258f54e6ba, - 0x47c6b82ef32a2069, - 0x4cdc331d57fa5441, - 0xe0133fe4adf8e952, - 0x58180fddd97723a6, - 0x570f09eaa7ea7648}; - +const uint64_t mantissa_128[] = { + 0x419ea3bd35385e2d, + 0x52064cac828675b9, + 0x7343efebd1940993, + 0x1014ebe6c5f90bf8, + 0xd41a26e077774ef6, + 0x8920b098955522b4, + 0x55b46e5f5d5535b0, + 0xeb2189f734aa831d, + 0xa5e9ec7501d523e4, + 0x47b233c92125366e, + 0x999ec0bb696e840a, + 0xc00670ea43ca250d, + 0x380406926a5e5728, + 0xc605083704f5ecf2, + 0xf7864a44c633682e, + 0x7ab3ee6afbe0211d, + 0x5960ea05bad82964, + 0x6fb92487298e33bd, + 0xa5d3b6d479f8e056, + 0x8f48a4899877186c, + 0x331acdabfe94de87, + 0x9ff0c08b7f1d0b14, + 0x7ecf0ae5ee44dd9, + 0xc9e82cd9f69d6150, + 0xbe311c083a225cd2, + 0x6dbd630a48aaf406, + 0x92cbbccdad5b108, + 0x25bbf56008c58ea5, + 0xaf2af2b80af6f24e, + 0x1af5af660db4aee1, + 0x50d98d9fc890ed4d, + 0xe50ff107bab528a0, + 0x1e53ed49a96272c8, + 0x25e8e89c13bb0f7a, + 0x77b191618c54e9ac, + 0xd59df5b9ef6a2417, + 0x4b0573286b44ad1d, + 0x4ee367f9430aec32, + 0x229c41f793cda73f, + 0x6b43527578c1110f, + 0x830a13896b78aaa9, + 0x23cc986bc656d553, + 0x2cbfbe86b7ec8aa8, + 0x7bf7d71432f3d6a9, + 0xdaf5ccd93fb0cc53, + 0xd1b3400f8f9cff68, + 0x23100809b9c21fa1, + 0xabd40a0c2832a78a, + 0x16c90c8f323f516c, + 0xae3da7d97f6792e3, + 0x99cd11cfdf41779c, + 0x40405643d711d583, + 0x482835ea666b2572, + 0xda3243650005eecf, + 0x90bed43e40076a82, + 0x5a7744a6e804a291, + 0x711515d0a205cb36, + 0xd5a5b44ca873e03, + 0xe858790afe9486c2, + 0x626e974dbe39a872, + 0xfb0a3d212dc8128f, + 0x7ce66634bc9d0b99, + 0x1c1fffc1ebc44e80, + 0xa327ffb266b56220, + 0x4bf1ff9f0062baa8, + 0x6f773fc3603db4a9, + 0xcb550fb4384d21d3, + 0x7e2a53a146606a48, + 0x2eda7444cbfc426d, + 0xfa911155fefb5308, + 0x793555ab7eba27ca, + 0x4bc1558b2f3458de, + 0x9eb1aaedfb016f16, + 0x465e15a979c1cadc, + 0xbfacd89ec191ec9, + 0xcef980ec671f667b, + 0x82b7e12780e7401a, + 0xd1b2ecb8b0908810, + 0x861fa7e6dcb4aa15, + 0x67a791e093e1d49a, + 0xe0c8bb2c5c6d24e0, + 0x58fae9f773886e18, + 0xaf39a475506a899e, + 0x6d8406c952429603, + 0xc8e5087ba6d33b83, + 0xfb1e4a9a90880a64, + 0x5cf2eea09a55067f, + 0xf42faa48c0ea481e, + 0xf13b94daf124da26, + 0x76c53d08d6b70858, + 0x54768c4b0c64ca6e, + 0xa9942f5dcf7dfd09, + 0xd3f93b35435d7c4c, + 0xc47bc5014a1a6daf, + 0x359ab6419ca1091b, + 0xc30163d203c94b62, + 0x79e0de63425dcf1d, + 0x985915fc12f542e4, + 0x3e6f5b7b17b2939d, + 0xa705992ceecf9c42, + 0x50c6ff782a838353, + 0xa4f8bf5635246428, + 0x871b7795e136be99, + 0x28e2557b59846e3f, + 0x331aeada2fe589cf, + 0x3ff0d2c85def7621, + 0xfed077a756b53a9, + 0xd3e8495912c62894, + 0x64712dd7abbbd95c, + 0xbd8d794d96aacfb3, + 0xecf0d7a0fc5583a0, + 0xf41686c49db57244, + 0x311c2875c522ced5, + 0x7d633293366b828b, + 0xae5dff9c02033197, + 0xd9f57f830283fdfc, + 0xd072df63c324fd7b, + 0x4247cb9e59f71e6d, + 0x52d9be85f074e608, + 0x67902e276c921f8b, + 0xba1cd8a3db53b6, + 0x80e8a40eccd228a4, + 0x6122cd128006b2cd, + 0x796b805720085f81, + 0xcbe3303674053bb0, + 0xbedbfc4411068a9c, + 0xee92fb5515482d44, + 0x751bdd152d4d1c4a, + 0xd262d45a78a0635d, + 0x86fb897116c87c34, + 0xd45d35e6ae3d4da0, + 0x8974836059cca109, + 0x2bd1a438703fc94b, + 0x7b6306a34627ddcf, + 0x1a3bc84c17b1d542, + 0x20caba5f1d9e4a93, + 0x547eb47b7282ee9c, + 0xe99e619a4f23aa43, + 0x6405fa00e2ec94d4, + 0xde83bc408dd3dd04, + 0x9624ab50b148d445, + 0x3badd624dd9b0957, + 0xe54ca5d70a80e5d6, + 0x5e9fcf4ccd211f4c, + 0x7647c3200069671f, + 0x29ecd9f40041e073, + 0xf468107100525890, + 0x7182148d4066eeb4, + 0xc6f14cd848405530, + 0xb8ada00e5a506a7c, + 0xa6d90811f0e4851c, + 0x908f4a166d1da663, + 0x9a598e4e043287fe, + 0x40eff1e1853f29fd, + 0xd12bee59e68ef47c, + 0x82bb74f8301958ce, + 0xe36a52363c1faf01, + 0xdc44e6c3cb279ac1, + 0x29ab103a5ef8c0b9, + 0x7415d448f6b6f0e7, + 0x111b495b3464ad21, + 0xcab10dd900beec34, + 0x3d5d514f40eea742, + 0xcb4a5a3112a5112, + 0x47f0e785eaba72ab, + 0x59ed216765690f56, + 0x306869c13ec3532c, + 0x1e414218c73a13fb, + 0xe5d1929ef90898fa, + 0xdf45f746b74abf39, + 0x6b8bba8c328eb783, + 0x66ea92f3f326564, + 0xc80a537b0efefebd, + 0xbd06742ce95f5f36, + 0x2c48113823b73704, + 0xf75a15862ca504c5, + 0x9a984d73dbe722fb, + 0xc13e60d0d2e0ebba, + 0x318df905079926a8, + 0xfdf17746497f7052, + 0xfeb6ea8bedefa633, + 0xfe64a52ee96b8fc0, + 0x3dfdce7aa3c673b0, + 0x6bea10ca65c084e, + 0x486e494fcff30a62, + 0x5a89dba3c3efccfa, + 0xf89629465a75e01c, + 0xf6bbb397f1135823, + 0x746aa07ded582e2c, + 0xa8c2a44eb4571cdc, + 0x92f34d62616ce413, + 0x77b020baf9c81d17, + 0xace1474dc1d122e, + 0xd819992132456ba, + 0x10e1fff697ed6c69, + 0xca8d3ffa1ef463c1, + 0xbd308ff8a6b17cb2, + 0xac7cb3f6d05ddbde, + 0x6bcdf07a423aa96b, + 0x86c16c98d2c953c6, + 0xe871c7bf077ba8b7, + 0x11471cd764ad4972, + 0xd598e40d3dd89bcf, + 0x4aff1d108d4ec2c3, + 0xcedf722a585139ba, + 0xc2974eb4ee658828, + 0x733d226229feea32, + 0x806357d5a3f525f, + 0xca07c2dcb0cf26f7, + 0xfc89b393dd02f0b5, + 0xbbac2078d443ace2, + 0xd54b944b84aa4c0d, + 0xa9e795e65d4df11, + 0x4d4617b5ff4a16d5, + 0x504bced1bf8e4e45, + 0xe45ec2862f71e1d6, + 0x5d767327bb4e5a4c, + 0x3a6a07f8d510f86f, + 0x890489f70a55368b, + 0x2b45ac74ccea842e, + 0x3b0b8bc90012929d, + 0x9ce6ebb40173744, + 0xcc420a6a101d0515, + 0x9fa946824a12232d, + 0x47939822dc96abf9, + 0x59787e2b93bc56f7, + 0x57eb4edb3c55b65a, + 0xede622920b6b23f1, + 0xe95fab368e45eced, + 0x11dbcb0218ebb414, + 0xd652bdc29f26a119, + 0x4be76d3346f0495f, + 0x6f70a4400c562ddb, + 0xcb4ccd500f6bb952, + 0x7e2000a41346a7a7, + 0x8ed400668c0c28c8, + 0x728900802f0f32fa, + 0x4f2b40a03ad2ffb9, + 0xe2f610c84987bfa8, + 0xdd9ca7d2df4d7c9, + 0x91503d1c79720dbb, + 0x75a44c6397ce912a, + 0xc986afbe3ee11aba, + 0xfbe85badce996168, + 0xfae27299423fb9c3, + 0xdccd879fc967d41a, + 0x5400e987bbc1c920, + 0x290123e9aab23b68, + 0xf9a0b6720aaf6521, + 0xf808e40e8d5b3e69, + 0xb60b1d1230b20e04, + 0xb1c6f22b5e6f48c2, + 0x1e38aeb6360b1af3, + 0x25c6da63c38de1b0, + 0x579c487e5a38ad0e, + 0x2d835a9df0c6d851, + 0xf8e431456cf88e65, + 0x1b8e9ecb641b58ff, + 0xe272467e3d222f3f, + 0x5b0ed81dcc6abb0f, + 0x98e947129fc2b4e9, + 0x3f2398d747b36224, + 0x8eec7f0d19a03aad, + 0x1953cf68300424ac, + 0x5fa8c3423c052dd7, + 0x3792f412cb06794d, + 0xe2bbd88bbee40bd0, + 0x5b6aceaeae9d0ec4, + 0xf245825a5a445275, + 0xeed6e2f0f0d56712, + 0x55464dd69685606b, + 0xaa97e14c3c26b886, + 0xd53dd99f4b3066a8, + 0xe546a8038efe4029, + 0xde98520472bdd033, + 0x963e66858f6d4440, + 0xdde7001379a44aa8, + 0x5560c018580d5d52, + 0xaab8f01e6e10b4a6, + 0xcab3961304ca70e8, + 0x3d607b97c5fd0d22, + 0x8cb89a7db77c506a, + 0x77f3608e92adb242, + 0x55f038b237591ed3, + 0x6b6c46dec52f6688, + 0x2323ac4b3b3da015, + 0xabec975e0a0d081a, + 0x96e7bd358c904a21, + 0x7e50d64177da2e54, + 0xdde50bd1d5d0b9e9, + 0x955e4ec64b44e864, + 0xbd5af13bef0b113e, + 0xecb1ad8aeacdd58e, + 0x67de18eda5814af2, + 0x80eacf948770ced7, + 0xa1258379a94d028d, + 0x96ee45813a04330, + 0x8bca9d6e188853fc, + 0x775ea264cf55347d, + 0x95364afe032a819d, + 0x3a83ddbd83f52204, + 0xc4926a9672793542, + 0x75b7053c0f178293, + 0x5324c68b12dd6338, + 0xd3f6fc16ebca5e03, + 0x88f4bb1ca6bcf584, + 0x2b31e9e3d06c32e5, + 0x3aff322e62439fcf, + 0x9befeb9fad487c2, + 0x4c2ebe687989a9b3, + 0xf9d37014bf60a10, + 0x538484c19ef38c94, + 0x2865a5f206b06fb9, + 0xf93f87b7442e45d3, + 0xf78f69a51539d748, + 0xb573440e5a884d1b, + 0x31680a88f8953030, + 0xfdc20d2b36ba7c3d, + 0x3d32907604691b4c, + 0xa63f9a49c2c1b10f, + 0xfcf80dc33721d53, + 0xd3c36113404ea4a8, + 0x645a1cac083126e9, + 0x3d70a3d70a3d70a3, + 0xcccccccccccccccc, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x0, + 0x4000000000000000, + 0x5000000000000000, + 0xa400000000000000, + 0x4d00000000000000, + 0xf020000000000000, + 0x6c28000000000000, + 0xc732000000000000, + 0x3c7f400000000000, + 0x4b9f100000000000, + 0x1e86d40000000000, + 0x1314448000000000, + 0x17d955a000000000, + 0x5dcfab0800000000, + 0x5aa1cae500000000, + 0xf14a3d9e40000000, + 0x6d9ccd05d0000000, + 0xe4820023a2000000, + 0xdda2802c8a800000, + 0xd50b2037ad200000, + 0x4526f422cc340000, + 0x9670b12b7f410000, + 0x3c0cdd765f114000, + 0xa5880a69fb6ac800, + 0x8eea0d047a457a00, + 0x72a4904598d6d880, + 0x47a6da2b7f864750, + 0x999090b65f67d924, + 0xfff4b4e3f741cf6d, + 0xbff8f10e7a8921a4, + 0xaff72d52192b6a0d, + 0x9bf4f8a69f764490, + 0x2f236d04753d5b4, + 0x1d762422c946590, + 0x424d3ad2b7b97ef5, + 0xd2e0898765a7deb2, + 0x63cc55f49f88eb2f, + 0x3cbf6b71c76b25fb, + 0x8bef464e3945ef7a, + 0x97758bf0e3cbb5ac, + 0x3d52eeed1cbea317, + 0x4ca7aaa863ee4bdd, + 0x8fe8caa93e74ef6a, + 0xb3e2fd538e122b44, + 0x60dbbca87196b616, + 0xbc8955e946fe31cd, + 0x6babab6398bdbe41, + 0xc696963c7eed2dd1, + 0xfc1e1de5cf543ca2, + 0x3b25a55f43294bcb, + 0x49ef0eb713f39ebe, + 0x6e3569326c784337, + 0x49c2c37f07965404, + 0xdc33745ec97be906, + 0x69a028bb3ded71a3, + 0xc40832ea0d68ce0c, + 0xf50a3fa490c30190, + 0x792667c6da79e0fa, + 0x577001b891185938, + 0xed4c0226b55e6f86, + 0x544f8158315b05b4, + 0x696361ae3db1c721, + 0x3bc3a19cd1e38e9, + 0x4ab48a04065c723, + 0x62eb0d64283f9c76, + 0x3ba5d0bd324f8394, + 0xca8f44ec7ee36479, + 0x7e998b13cf4e1ecb, + 0x9e3fedd8c321a67e, + 0xc5cfe94ef3ea101e, + 0xbba1f1d158724a12, + 0x2a8a6e45ae8edc97, + 0xf52d09d71a3293bd, + 0x593c2626705f9c56, + 0x6f8b2fb00c77836c, + 0xb6dfb9c0f956447, + 0x4724bd4189bd5eac, + 0x58edec91ec2cb657, + 0x2f2967b66737e3ed, + 0xbd79e0d20082ee74, + 0xecd8590680a3aa11, + 0xe80e6f4820cc9495, + 0x3109058d147fdcdd, + 0xbd4b46f0599fd415, + 0x6c9e18ac7007c91a, + 0x3e2cf6bc604ddb0, + 0x84db8346b786151c, + 0xe612641865679a63, + 0x4fcb7e8f3f60c07e, + 0xe3be5e330f38f09d, + 0x5cadf5bfd3072cc5, + 0x73d9732fc7c8f7f6, + 0x2867e7fddcdd9afa, + 0xb281e1fd541501b8, + 0x1f225a7ca91a4226, + 0x3375788de9b06958, + 0x52d6b1641c83ae, + 0xc0678c5dbd23a49a, + 0xf840b7ba963646e0, + 0xb650e5a93bc3d898, + 0xa3e51f138ab4cebe, + 0xc66f336c36b10137, + 0xb80b0047445d4184, + 0xa60dc059157491e5, + 0x87c89837ad68db2f, + 0x29babe4598c311fb, + 0xf4296dd6fef3d67a, + 0x1899e4a65f58660c, + 0x5ec05dcff72e7f8f, + 0x76707543f4fa1f73, + 0x6a06494a791c53a8, + 0x487db9d17636892, + 0x45a9d2845d3c42b6, + 0xb8a2392ba45a9b2, + 0x8e6cac7768d7141e, + 0x3207d795430cd926, + 0x7f44e6bd49e807b8, + 0x5f16206c9c6209a6, + 0x36dba887c37a8c0f, + 0xc2494954da2c9789, + 0xf2db9baa10b7bd6c, + 0x6f92829494e5acc7, + 0xcb772339ba1f17f9, + 0xff2a760414536efb, + 0xfef5138519684aba, + 0x7eb258665fc25d69, + 0xef2f773ffbd97a61, + 0xaafb550ffacfd8fa, + 0x95ba2a53f983cf38, + 0xdd945a747bf26183, + 0x94f971119aeef9e4, + 0x7a37cd5601aab85d, + 0xac62e055c10ab33a, + 0x577b986b314d6009, + 0xed5a7e85fda0b80b, + 0x14588f13be847307, + 0x596eb2d8ae258fc8, + 0x6fca5f8ed9aef3bb, + 0x25de7bb9480d5854, + 0xaf561aa79a10ae6a, + 0x1b2ba1518094da04, + 0x90fb44d2f05d0842, + 0x353a1607ac744a53, + 0x42889b8997915ce8, + 0x69956135febada11, + 0x43fab9837e699095, + 0x94f967e45e03f4bb, + 0x1d1be0eebac278f5, + 0x6462d92a69731732, + 0x7d7b8f7503cfdcfe, + 0x5cda735244c3d43e, + 0x3a0888136afa64a7, + 0x88aaa1845b8fdd0, + 0x8aad549e57273d45, + 0x36ac54e2f678864b, + 0x84576a1bb416a7dd, + 0x656d44a2a11c51d5, + 0x9f644ae5a4b1b325, + 0x873d5d9f0dde1fee, + 0xa90cb506d155a7ea, + 0x9a7f12442d588f2, + 0xc11ed6d538aeb2f, + 0x8f1668c8a86da5fa, + 0xf96e017d694487bc, + 0x37c981dcc395a9ac, + 0x85bbe253f47b1417, + 0x93956d7478ccec8e, + 0x387ac8d1970027b2, + 0x6997b05fcc0319e, + 0x441fece3bdf81f03, + 0xd527e81cad7626c3, + 0x8a71e223d8d3b074, + 0xf6872d5667844e49, + 0xb428f8ac016561db, + 0xe13336d701beba52, + 0xecc0024661173473, + 0x27f002d7f95d0190, + 0x31ec038df7b441f4, + 0x7e67047175a15271, + 0xf0062c6e984d386, + 0x52c07b78a3e60868, + 0xa7709a56ccdf8a82, + 0x88a66076400bb691, + 0x6acff893d00ea435, + 0x583f6b8c4124d43, + 0xc3727a337a8b704a, + 0x744f18c0592e4c5c, + 0x1162def06f79df73, + 0x8addcb5645ac2ba8, + 0x6d953e2bd7173692, + 0xc8fa8db6ccdd0437, + 0x1d9c9892400a22a2, + 0x2503beb6d00cab4b, + 0x2e44ae64840fd61d, + 0x5ceaecfed289e5d2, + 0x7425a83e872c5f47, + 0xd12f124e28f77719, + 0x82bd6b70d99aaa6f, + 0x636cc64d1001550b, + 0x3c47f7e05401aa4e, + 0x65acfaec34810a71, + 0x7f1839a741a14d0d, + 0x1ede48111209a050, + 0x934aed0aab460432, + 0xf81da84d5617853f, + 0x36251260ab9d668e, + 0xc1d72b7c6b426019, + 0xb24cf65b8612f81f, + 0xdee033f26797b627, + 0x169840ef017da3b1, + 0x8e1f289560ee864e, + 0xf1a6f2bab92a27e2, + 0xae10af696774b1db, + 0xacca6da1e0a8ef29, + 0x17fd090a58d32af3, + 0xddfc4b4cef07f5b0, + 0x4abdaf101564f98e, + 0x9d6d1ad41abe37f1, + 0x84c86189216dc5ed, + 0x32fd3cf5b4e49bb4, + 0x3fbc8c33221dc2a1, + 0xfabaf3feaa5334a, + 0x29cb4d87f2a7400e, + 0x743e20e9ef511012, + 0x914da9246b255416, + 0x1ad089b6c2f7548e, + 0xa184ac2473b529b1, + 0xc9e5d72d90a2741e, + 0x7e2fa67c7a658892, + 0xddbb901b98feeab7, + 0x552a74227f3ea565, + 0xd53a88958f87275f, + 0x8a892abaf368f137, + 0x2d2b7569b0432d85, + 0x9c3b29620e29fc73, + 0x8349f3ba91b47b8f, + 0x241c70a936219a73, + 0xed238cd383aa0110, + 0xf4363804324a40aa, + 0xb143c6053edcd0d5, + 0xdd94b7868e94050a, + 0xca7cf2b4191c8326, + 0xfd1c2f611f63a3f0, + 0xbc633b39673c8cec, + 0xd5be0503e085d813, + 0x4b2d8644d8a74e18, + 0xddf8e7d60ed1219e, + 0xcabb90e5c942b503, + 0x3d6a751f3b936243, + 0xcc512670a783ad4, + 0x27fb2b80668b24c5, + 0xb1f9f660802dedf6, + 0x5e7873f8a0396973, + 0xdb0b487b6423e1e8, + 0x91ce1a9a3d2cda62, + 0x7641a140cc7810fb, + 0xa9e904c87fcb0a9d, + 0x546345fa9fbdcd44, + 0xa97c177947ad4095, + 0x49ed8eabcccc485d, + 0x5c68f256bfff5a74, + 0x73832eec6fff3111, + 0xc831fd53c5ff7eab, + 0xba3e7ca8b77f5e55, + 0x28ce1bd2e55f35eb, + 0x7980d163cf5b81b3, + 0xd7e105bcc332621f, + 0x8dd9472bf3fefaa7, + 0xb14f98f6f0feb951, + 0x6ed1bf9a569f33d3, + 0xa862f80ec4700c8, + 0xcd27bb612758c0fa, + 0x8038d51cb897789c, + 0xe0470a63e6bd56c3, + 0x1858ccfce06cac74, + 0xf37801e0c43ebc8, + 0xd30560258f54e6ba, + 0x47c6b82ef32a2069, + 0x4cdc331d57fa5441, + 0xe0133fe4adf8e952, + 0x58180fddd97723a6, + 0x570f09eaa7ea7648, +}; } // namespace simdjson #endif -/* end file */ -/* begin file document_parser_callbacks.h */ +/* end file src/jsoncharutils.h */ +/* begin file src/document_parser_callbacks.h */ #ifndef SIMDJSON_DOCUMENT_PARSER_CALLBACKS_H #define SIMDJSON_DOCUMENT_PARSER_CALLBACKS_H @@ -7003,7 +7011,7 @@ really_inline void parser::end_scope(uint32_t depth) noexcept { } // namespace dom #endif // SIMDJSON_DOCUMENT_PARSER_CALLBACKS_H -/* end file */ +/* end file src/document_parser_callbacks.h */ using namespace simdjson; @@ -7014,12 +7022,12 @@ void found_bad_string(const uint8_t *buf); #endif #if SIMDJSON_IMPLEMENTATION_ARM64 -/* begin file arm64/stage2_build_tape.h */ +/* begin file src/arm64/stage2_build_tape.h */ #ifndef SIMDJSON_ARM64_STAGE2_BUILD_TAPE_H #define SIMDJSON_ARM64_STAGE2_BUILD_TAPE_H /* arm64/implementation.h already included: #include "arm64/implementation.h" */ -/* begin file arm64/stringparsing.h */ +/* begin file src/arm64/stringparsing.h */ #ifndef SIMDJSON_ARM64_STRINGPARSING_H #define SIMDJSON_ARM64_STRINGPARSING_H @@ -7066,7 +7074,7 @@ really_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8 }; } -/* begin file generic/stringparsing.h */ +/* begin file src/generic/stringparsing.h */ // This file contains the common code every implementation uses // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is include already includes @@ -7188,14 +7196,14 @@ WARN_UNUSED really_inline uint8_t *parse_string(const uint8_t *src, uint8_t *dst } } // namespace stringparsing -/* end file */ +/* end file src/generic/stringparsing.h */ } // namespace arm64 } // namespace simdjson #endif // SIMDJSON_ARM64_STRINGPARSING_H -/* end file */ -/* begin file arm64/numberparsing.h */ +/* end file src/generic/stringparsing.h */ +/* begin file src/arm64/numberparsing.h */ #ifndef SIMDJSON_ARM64_NUMBERPARSING_H #define SIMDJSON_ARM64_NUMBERPARSING_H @@ -7228,7 +7236,7 @@ static inline uint32_t parse_eight_digits_unrolled(const char *chars) { #define SWAR_NUMBER_PARSING -/* begin file generic/numberparsing.h */ +/* begin file src/generic/numberparsing.h */ namespace numberparsing { @@ -7797,18 +7805,18 @@ really_inline bool parse_number(UNUSED const uint8_t *const src, } } // namespace numberparsing -/* end file */ +/* end file src/generic/numberparsing.h */ } // namespace arm64 } // namespace simdjson #endif // SIMDJSON_ARM64_NUMBERPARSING_H -/* end file */ +/* end file src/generic/numberparsing.h */ namespace simdjson { namespace arm64 { -/* begin file generic/atomparsing.h */ +/* begin file src/generic/atomparsing.h */ namespace atomparsing { really_inline uint32_t string_to_uint32(const char* str) { return *reinterpret_cast(str); } @@ -7858,8 +7866,8 @@ really_inline bool is_valid_null_atom(const uint8_t *src, size_t len) { } } // namespace atomparsing -/* end file */ -/* begin file generic/stage2_build_tape.h */ +/* end file src/generic/atomparsing.h */ +/* begin file src/generic/stage2_build_tape.h */ // This file contains the common code every implementation uses for stage2 // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is include already includes @@ -8313,8 +8321,8 @@ WARN_UNUSED error_code implementation::parse(const uint8_t *buf, size_t len, par } return code; } -/* end file */ -/* begin file generic/stage2_streaming_build_tape.h */ +/* end file src/generic/stage2_build_tape.h */ +/* begin file src/generic/stage2_streaming_build_tape.h */ namespace stage2 { struct streaming_structural_parser: structural_parser { @@ -8469,22 +8477,22 @@ finish: error: return parser.error(); } -/* end file */ +/* end file src/generic/stage2_streaming_build_tape.h */ } // namespace arm64 } // namespace simdjson #endif // SIMDJSON_ARM64_STAGE2_BUILD_TAPE_H -/* end file */ +/* end file src/generic/stage2_streaming_build_tape.h */ #endif #if SIMDJSON_IMPLEMENTATION_FALLBACK -/* begin file fallback/stage2_build_tape.h */ +/* begin file src/fallback/stage2_build_tape.h */ #ifndef SIMDJSON_FALLBACK_STAGE2_BUILD_TAPE_H #define SIMDJSON_FALLBACK_STAGE2_BUILD_TAPE_H /* fallback/implementation.h already included: #include "fallback/implementation.h" */ -/* begin file fallback/stringparsing.h */ +/* begin file src/fallback/stringparsing.h */ #ifndef SIMDJSON_FALLBACK_STRINGPARSING_H #define SIMDJSON_FALLBACK_STRINGPARSING_H @@ -8513,7 +8521,7 @@ really_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8 return { src[0] }; } -/* begin file generic/stringparsing.h */ +/* begin file src/generic/stringparsing.h */ // This file contains the common code every implementation uses // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is include already includes @@ -8635,19 +8643,19 @@ WARN_UNUSED really_inline uint8_t *parse_string(const uint8_t *src, uint8_t *dst } } // namespace stringparsing -/* end file */ +/* end file src/generic/stringparsing.h */ } // namespace fallback } // namespace simdjson #endif // SIMDJSON_FALLBACK_STRINGPARSING_H -/* end file */ -/* begin file fallback/numberparsing.h */ +/* end file src/generic/stringparsing.h */ +/* begin file src/fallback/numberparsing.h */ #ifndef SIMDJSON_FALLBACK_NUMBERPARSING_H #define SIMDJSON_FALLBACK_NUMBERPARSING_H /* jsoncharutils.h already included: #include "jsoncharutils.h" */ -/* begin file fallback/bitmanipulation.h */ +/* begin file src/fallback/bitmanipulation.h */ #ifndef SIMDJSON_FALLBACK_BITMANIPULATION_H #define SIMDJSON_FALLBACK_BITMANIPULATION_H @@ -8724,7 +8732,7 @@ really_inline bool mul_overflow(uint64_t value1, uint64_t value2, uint64_t *resu } // namespace simdjson #endif // SIMDJSON_FALLBACK_BITMANIPULATION_H -/* end file */ +/* end file src/fallback/bitmanipulation.h */ #include #include @@ -8747,7 +8755,7 @@ static inline uint32_t parse_eight_digits_unrolled(const char *chars) { #define SWAR_NUMBER_PARSING -/* begin file generic/numberparsing.h */ +/* begin file src/generic/numberparsing.h */ namespace numberparsing { @@ -9316,19 +9324,19 @@ really_inline bool parse_number(UNUSED const uint8_t *const src, } } // namespace numberparsing -/* end file */ +/* end file src/generic/numberparsing.h */ } // namespace fallback } // namespace simdjson #endif // SIMDJSON_FALLBACK_NUMBERPARSING_H -/* end file */ +/* end file src/generic/numberparsing.h */ namespace simdjson { namespace fallback { -/* begin file generic/atomparsing.h */ +/* begin file src/generic/atomparsing.h */ namespace atomparsing { really_inline uint32_t string_to_uint32(const char* str) { return *reinterpret_cast(str); } @@ -9378,8 +9386,8 @@ really_inline bool is_valid_null_atom(const uint8_t *src, size_t len) { } } // namespace atomparsing -/* end file */ -/* begin file generic/stage2_build_tape.h */ +/* end file src/generic/atomparsing.h */ +/* begin file src/generic/stage2_build_tape.h */ // This file contains the common code every implementation uses for stage2 // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is include already includes @@ -9833,8 +9841,8 @@ WARN_UNUSED error_code implementation::parse(const uint8_t *buf, size_t len, par } return code; } -/* end file */ -/* begin file generic/stage2_streaming_build_tape.h */ +/* end file src/generic/stage2_build_tape.h */ +/* begin file src/generic/stage2_streaming_build_tape.h */ namespace stage2 { struct streaming_structural_parser: structural_parser { @@ -9989,21 +9997,21 @@ finish: error: return parser.error(); } -/* end file */ +/* end file src/generic/stage2_streaming_build_tape.h */ } // namespace fallback } // namespace simdjson #endif // SIMDJSON_FALLBACK_STAGE2_BUILD_TAPE_H -/* end file */ +/* end file src/generic/stage2_streaming_build_tape.h */ #endif #if SIMDJSON_IMPLEMENTATION_HASWELL -/* begin file haswell/stage2_build_tape.h */ +/* begin file src/haswell/stage2_build_tape.h */ #ifndef SIMDJSON_HASWELL_STAGE2_BUILD_TAPE_H #define SIMDJSON_HASWELL_STAGE2_BUILD_TAPE_H /* haswell/implementation.h already included: #include "haswell/implementation.h" */ -/* begin file haswell/stringparsing.h */ +/* begin file src/haswell/stringparsing.h */ #ifndef SIMDJSON_HASWELL_STRINGPARSING_H #define SIMDJSON_HASWELL_STRINGPARSING_H @@ -10046,7 +10054,7 @@ really_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8 }; } -/* begin file generic/stringparsing.h */ +/* begin file src/generic/stringparsing.h */ // This file contains the common code every implementation uses // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is include already includes @@ -10168,15 +10176,15 @@ WARN_UNUSED really_inline uint8_t *parse_string(const uint8_t *src, uint8_t *dst } } // namespace stringparsing -/* end file */ +/* end file src/generic/stringparsing.h */ } // namespace haswell } // namespace simdjson UNTARGET_REGION #endif // SIMDJSON_HASWELL_STRINGPARSING_H -/* end file */ -/* begin file haswell/numberparsing.h */ +/* end file src/generic/stringparsing.h */ +/* begin file src/haswell/numberparsing.h */ #ifndef SIMDJSON_HASWELL_NUMBERPARSING_H #define SIMDJSON_HASWELL_NUMBERPARSING_H @@ -10217,7 +10225,7 @@ static inline uint32_t parse_eight_digits_unrolled(const char *chars) { #define SWAR_NUMBER_PARSING -/* begin file generic/numberparsing.h */ +/* begin file src/generic/numberparsing.h */ namespace numberparsing { @@ -10786,7 +10794,7 @@ really_inline bool parse_number(UNUSED const uint8_t *const src, } } // namespace numberparsing -/* end file */ +/* end file src/generic/numberparsing.h */ } // namespace haswell @@ -10794,13 +10802,13 @@ really_inline bool parse_number(UNUSED const uint8_t *const src, UNTARGET_REGION #endif // SIMDJSON_HASWELL_NUMBERPARSING_H -/* end file */ +/* end file src/generic/numberparsing.h */ TARGET_HASWELL namespace simdjson { namespace haswell { -/* begin file generic/atomparsing.h */ +/* begin file src/generic/atomparsing.h */ namespace atomparsing { really_inline uint32_t string_to_uint32(const char* str) { return *reinterpret_cast(str); } @@ -10850,8 +10858,8 @@ really_inline bool is_valid_null_atom(const uint8_t *src, size_t len) { } } // namespace atomparsing -/* end file */ -/* begin file generic/stage2_build_tape.h */ +/* end file src/generic/atomparsing.h */ +/* begin file src/generic/stage2_build_tape.h */ // This file contains the common code every implementation uses for stage2 // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is include already includes @@ -11305,8 +11313,8 @@ WARN_UNUSED error_code implementation::parse(const uint8_t *buf, size_t len, par } return code; } -/* end file */ -/* begin file generic/stage2_streaming_build_tape.h */ +/* end file src/generic/stage2_build_tape.h */ +/* begin file src/generic/stage2_streaming_build_tape.h */ namespace stage2 { struct streaming_structural_parser: structural_parser { @@ -11461,22 +11469,22 @@ finish: error: return parser.error(); } -/* end file */ +/* end file src/generic/stage2_streaming_build_tape.h */ } // namespace haswell } // namespace simdjson UNTARGET_REGION #endif // SIMDJSON_HASWELL_STAGE2_BUILD_TAPE_H -/* end file */ +/* end file src/generic/stage2_streaming_build_tape.h */ #endif #if SIMDJSON_IMPLEMENTATION_WESTMERE -/* begin file westmere/stage2_build_tape.h */ +/* begin file src/westmere/stage2_build_tape.h */ #ifndef SIMDJSON_WESTMERE_STAGE2_BUILD_TAPE_H #define SIMDJSON_WESTMERE_STAGE2_BUILD_TAPE_H /* westmere/implementation.h already included: #include "westmere/implementation.h" */ -/* begin file westmere/stringparsing.h */ +/* begin file src/westmere/stringparsing.h */ #ifndef SIMDJSON_WESTMERE_STRINGPARSING_H #define SIMDJSON_WESTMERE_STRINGPARSING_H @@ -11521,7 +11529,7 @@ really_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8 }; } -/* begin file generic/stringparsing.h */ +/* begin file src/generic/stringparsing.h */ // This file contains the common code every implementation uses // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is include already includes @@ -11643,15 +11651,15 @@ WARN_UNUSED really_inline uint8_t *parse_string(const uint8_t *src, uint8_t *dst } } // namespace stringparsing -/* end file */ +/* end file src/generic/stringparsing.h */ } // namespace westmere } // namespace simdjson UNTARGET_REGION #endif // SIMDJSON_WESTMERE_STRINGPARSING_H -/* end file */ -/* begin file westmere/numberparsing.h */ +/* end file src/generic/stringparsing.h */ +/* begin file src/westmere/numberparsing.h */ #ifndef SIMDJSON_WESTMERE_NUMBERPARSING_H #define SIMDJSON_WESTMERE_NUMBERPARSING_H @@ -11693,7 +11701,7 @@ static inline uint32_t parse_eight_digits_unrolled(const char *chars) { #define SWAR_NUMBER_PARSING -/* begin file generic/numberparsing.h */ +/* begin file src/generic/numberparsing.h */ namespace numberparsing { @@ -12262,7 +12270,7 @@ really_inline bool parse_number(UNUSED const uint8_t *const src, } } // namespace numberparsing -/* end file */ +/* end file src/generic/numberparsing.h */ } // namespace westmere @@ -12270,13 +12278,13 @@ really_inline bool parse_number(UNUSED const uint8_t *const src, UNTARGET_REGION #endif // SIMDJSON_WESTMERE_NUMBERPARSING_H -/* end file */ +/* end file src/generic/numberparsing.h */ TARGET_WESTMERE namespace simdjson { namespace westmere { -/* begin file generic/atomparsing.h */ +/* begin file src/generic/atomparsing.h */ namespace atomparsing { really_inline uint32_t string_to_uint32(const char* str) { return *reinterpret_cast(str); } @@ -12326,8 +12334,8 @@ really_inline bool is_valid_null_atom(const uint8_t *src, size_t len) { } } // namespace atomparsing -/* end file */ -/* begin file generic/stage2_build_tape.h */ +/* end file src/generic/atomparsing.h */ +/* begin file src/generic/stage2_build_tape.h */ // This file contains the common code every implementation uses for stage2 // It is intended to be included multiple times and compiled multiple times // We assume the file in which it is include already includes @@ -12781,8 +12789,8 @@ WARN_UNUSED error_code implementation::parse(const uint8_t *buf, size_t len, par } return code; } -/* end file */ -/* begin file generic/stage2_streaming_build_tape.h */ +/* end file src/generic/stage2_build_tape.h */ +/* begin file src/generic/stage2_streaming_build_tape.h */ namespace stage2 { struct streaming_structural_parser: structural_parser { @@ -12937,13 +12945,15 @@ finish: error: return parser.error(); } -/* end file */ +/* end file src/generic/stage2_streaming_build_tape.h */ } // namespace westmere } // namespace simdjson UNTARGET_REGION #endif // SIMDJSON_WESTMERE_STAGE2_BUILD_TAPE_H -/* end file */ +/* end file src/generic/stage2_streaming_build_tape.h */ #endif -/* end file */ -/* end file */ +/* end file src/generic/stage2_streaming_build_tape.h */ + +SIMDJSON_POP_DISABLE_WARNINGS +/* end file src/generic/stage2_streaming_build_tape.h */ diff --git a/singleheader/simdjson.h b/singleheader/simdjson.h index 1997f70e4..d251ae613 100644 --- a/singleheader/simdjson.h +++ b/singleheader/simdjson.h @@ -1,5 +1,5 @@ -/* auto-generated on Mon 27 Apr 2020 21:20:37 EDT. Do not edit! */ -/* begin file simdjson.h */ +/* auto-generated on Sat May 2 15:01:27 PDT 2020. Do not edit! */ +/* begin file include/simdjson.h */ #ifndef SIMDJSON_H #define SIMDJSON_H @@ -9,7 +9,7 @@ * Check the [README.md](https://github.com/lemire/simdjson/blob/master/README.md#simdjson--parsing-gigabytes-of-json-per-second). */ -/* begin file simdjson/compiler_check.h */ +/* begin file include/simdjson/compiler_check.h */ #ifndef SIMDJSON_COMPILER_CHECK_H #define SIMDJSON_COMPILER_CHECK_H @@ -45,13 +45,13 @@ #endif #endif // SIMDJSON_COMPILER_CHECK_H -/* end file */ -/* begin file simdjson/common_defs.h */ +/* end file include/simdjson/compiler_check.h */ +/* begin file include/simdjson/common_defs.h */ #ifndef SIMDJSON_COMMON_DEFS_H #define SIMDJSON_COMMON_DEFS_H #include -/* begin file simdjson/portability.h */ +/* begin file include/simdjson/portability.h */ #ifndef SIMDJSON_PORTABILITY_H #define SIMDJSON_PORTABILITY_H @@ -201,8 +201,13 @@ compiling for a known 64-bit platform." // regular visual studio and clang under visual studio. // clang under Windows has _stricmp (like visual studio) but not strcasecmp (as clang normally has) #define simdjson_strcasecmp _stricmp +#define simdjson_strncasecmp _strnicmp #else +// The strcasecmp, strncasecmp, and strcasestr functions do not work with multibyte strings (e.g. UTF-8). +// So they are only useful for ASCII in our context. +// https://www.gnu.org/software/libunistring/manual/libunistring.html#char-_002a-strings #define simdjson_strcasecmp strcasecmp +#define simdjson_strncasecmp strncasecmp #endif namespace simdjson { @@ -248,7 +253,7 @@ static inline void aligned_free_char(char *mem_block) { } } // namespace simdjson #endif // SIMDJSON_PORTABILITY_H -/* end file */ +/* end file include/simdjson/portability.h */ namespace simdjson { @@ -423,7 +428,7 @@ constexpr size_t DEFAULT_MAX_DEPTH = 1024; // #ifndef SIMDJSON_HAS_STRING_VIEW SIMDJSON_PUSH_DISABLE_ALL_WARNINGS -/* begin file simdjson/nonstd/string_view.hpp */ +/* begin file include/simdjson/nonstd/string_view.hpp */ // Copyright 2017-2019 by Martin Moene // // string-view lite, a C++17-like string_view for C++98 and later. @@ -1953,7 +1958,7 @@ nssv_RESTORE_WARNINGS() #endif // nssv_HAVE_STD_STRING_VIEW #endif // NONSTD_SV_LITE_H_INCLUDED -/* end file */ +/* end file include/simdjson/nonstd/string_view.hpp */ SIMDJSON_POP_DISABLE_WARNINGS namespace std { @@ -1963,7 +1968,7 @@ namespace std { #undef SIMDJSON_HAS_STRING_VIEW // We are not going to need this macro anymore. #endif // SIMDJSON_COMMON_DEFS_H -/* end file */ +/* end file include/simdjson/nonstd/string_view.hpp */ SIMDJSON_PUSH_DISABLE_WARNINGS #if defined(_MSC_VER) && defined(__clang__) @@ -1971,7 +1976,7 @@ SIMDJSON_DISABLE_GCC_WARNING(-Wmicrosoft-include) #endif // Public API -/* begin file simdjson/simdjson_version.h */ +/* begin file include/simdjson/simdjson_version.h */ // /include/simdjson/simdjson_version.h automatically generated by release.py, // do not change by hand #ifndef SIMDJSON_SIMDJSON_VERSION_H @@ -1998,8 +2003,8 @@ enum { } // namespace simdjson #endif // SIMDJSON_SIMDJSON_VERSION_H -/* end file */ -/* begin file simdjson/error.h */ +/* end file include/simdjson/simdjson_version.h */ +/* begin file include/simdjson/error.h */ #ifndef SIMDJSON_ERROR_H #define SIMDJSON_ERROR_H @@ -2232,8 +2237,8 @@ inline const std::string &error_message(int error) noexcept; } // namespace simdjson #endif // SIMDJSON_ERROR_H -/* end file */ -/* begin file simdjson/padded_string.h */ +/* end file include/simdjson/error.h */ +/* begin file include/simdjson/padded_string.h */ #ifndef SIMDJSON_PADDED_STRING_H #define SIMDJSON_PADDED_STRING_H @@ -2373,8 +2378,8 @@ inline char *allocate_padded_buffer(size_t length) noexcept; } // namespace simdjson #endif // SIMDJSON_PADDED_STRING_H -/* end file */ -/* begin file simdjson/implementation.h */ +/* end file include/simdjson/padded_string.h */ +/* begin file include/simdjson/implementation.h */ #ifndef SIMDJSON_IMPLEMENTATION_H #define SIMDJSON_IMPLEMENTATION_H @@ -2382,7 +2387,7 @@ inline char *allocate_padded_buffer(size_t length) noexcept; #include #include #include -/* begin file simdjson/document.h */ +/* begin file include/simdjson/document.h */ #ifndef SIMDJSON_DOCUMENT_H #define SIMDJSON_DOCUMENT_H @@ -2391,7 +2396,7 @@ inline char *allocate_padded_buffer(size_t length) noexcept; #include #include #include -/* begin file simdjson/simdjson.h */ +/* begin file include/simdjson/simdjson.h */ /** * @file * @deprecated We'll be removing this file so it isn't confused with the top level simdjson.h @@ -2401,7 +2406,7 @@ inline char *allocate_padded_buffer(size_t length) noexcept; #endif // SIMDJSON_H -/* end file */ +/* end file include/simdjson/simdjson.h */ namespace simdjson { namespace dom { @@ -2706,6 +2711,7 @@ public: /** * Get the value associated with the given key in a case-insensitive manner. + * It is only guaranteed to work over ASCII inputs. * * Note: The key will be matched against **unescaped** JSON. * @@ -3731,7 +3737,7 @@ public: } // namespace simdjson #endif // SIMDJSON_DOCUMENT_H -/* end file */ +/* end file include/simdjson/simdjson.h */ namespace simdjson { @@ -3963,8 +3969,8 @@ extern SIMDJSON_DLLIMPORTEXPORT internal::atomic_ptr activ } // namespace simdjson #endif // SIMDJSON_IMPLEMENTATION_H -/* end file */ -/* begin file simdjson/document_stream.h */ +/* end file include/simdjson/simdjson.h */ +/* begin file include/simdjson/document_stream.h */ #ifndef SIMDJSON_DOCUMENT_STREAM_H #define SIMDJSON_DOCUMENT_STREAM_H @@ -4111,16 +4117,16 @@ private: } // namespace simdjson #endif // SIMDJSON_DOCUMENT_STREAM_H -/* end file */ +/* end file include/simdjson/document_stream.h */ // // Deprecated API -/* begin file simdjson/jsonparser.h */ +/* begin file include/simdjson/jsonparser.h */ // TODO Remove this -- deprecated API and files #ifndef SIMDJSON_JSONPARSER_H #define SIMDJSON_JSONPARSER_H -/* begin file simdjson/parsedjson.h */ +/* begin file include/simdjson/parsedjson.h */ // TODO Remove this -- deprecated API and files #ifndef SIMDJSON_PARSEDJSON_H @@ -4136,8 +4142,8 @@ using ParsedJson [[deprecated("Use dom::parser instead")]] = dom::parser; } // namespace simdjson #endif -/* end file */ -/* begin file simdjson/jsonioutil.h */ +/* end file include/simdjson/parsedjson.h */ +/* begin file include/simdjson/jsonioutil.h */ #ifndef SIMDJSON_JSONIOUTIL_H #define SIMDJSON_JSONIOUTIL_H @@ -4163,7 +4169,7 @@ inline padded_string get_corpus(const char *path) { } // namespace simdjson #endif // SIMDJSON_JSONIOUTIL_H -/* end file */ +/* end file include/simdjson/jsonioutil.h */ namespace simdjson { @@ -4273,8 +4279,8 @@ dom::parser build_parsed_json(const char *buf) noexcept = delete; } // namespace simdjson #endif -/* end file */ -/* begin file simdjson/parsedjson_iterator.h */ +/* end file include/simdjson/jsonioutil.h */ +/* begin file include/simdjson/parsedjson_iterator.h */ // TODO Remove this -- deprecated API and files #ifndef SIMDJSON_PARSEDJSON_ITERATOR_H @@ -4287,7 +4293,7 @@ dom::parser build_parsed_json(const char *buf) noexcept = delete; #include #include -/* begin file simdjson/internal/jsonformatutils.h */ +/* begin file include/simdjson/internal/jsonformatutils.h */ #ifndef SIMDJSON_INTERNAL_JSONFORMATUTILS_H #define SIMDJSON_INTERNAL_JSONFORMATUTILS_H @@ -4353,7 +4359,7 @@ inline std::ostream& operator<<(std::ostream& out, const escape_json_string &une } // namespace simdjson #endif // SIMDJSON_INTERNAL_JSONFORMATUTILS_H -/* end file */ +/* end file include/simdjson/internal/jsonformatutils.h */ namespace simdjson { @@ -4608,10 +4614,10 @@ public: } // namespace simdjson #endif -/* end file */ +/* end file include/simdjson/internal/jsonformatutils.h */ // // Inline functions -/* begin file simdjson/inline/document.h */ +/* begin file include/simdjson/inline/document.h */ #ifndef SIMDJSON_INLINE_DOCUMENT_H #define SIMDJSON_INLINE_DOCUMENT_H @@ -4948,7 +4954,11 @@ inline bool parser::dump_raw_tape(std::ostream &os) const noexcept { inline simdjson_result parser::read_file(const std::string &path) noexcept { // Open the file + SIMDJSON_PUSH_DISABLE_WARNINGS + SIMDJSON_DISABLE_DEPRECATED_WARNING // Disable CRT_SECURE warning on MSVC: manually verified this is safe std::FILE *fp = std::fopen(path.c_str(), "rb"); + SIMDJSON_POP_DISABLE_WARNINGS + if (fp == nullptr) { return IO_ERROR; } @@ -5295,10 +5305,10 @@ inline simdjson_result object::at_key_case_insensitive(const std::strin for (iterator field = begin(); field != end_field; ++field) { auto field_key = field.key(); if (key.length() == field_key.length()) { - bool equal = true; - for (size_t i=0; i::simdjson_result() noexcept } // namespace simdjson #endif // SIMDJSON_INLINE_ERROR_H -/* end file */ -/* begin file simdjson/inline/padded_string.h */ +/* end file include/simdjson/inline/error.h */ +/* begin file include/simdjson/inline/padded_string.h */ #ifndef SIMDJSON_INLINE_PADDED_STRING_H #define SIMDJSON_INLINE_PADDED_STRING_H @@ -6315,7 +6325,11 @@ inline padded_string::operator std::string_view() const { return std::string_vie inline simdjson_result padded_string::load(const std::string &filename) noexcept { // Open the file + SIMDJSON_PUSH_DISABLE_WARNINGS + SIMDJSON_DISABLE_DEPRECATED_WARNING // Disable CRT_SECURE warning on MSVC: manually verified this is safe std::FILE *fp = std::fopen(filename.c_str(), "rb"); + SIMDJSON_POP_DISABLE_WARNINGS + if (fp == nullptr) { return IO_ERROR; } @@ -6352,8 +6366,8 @@ inline simdjson_result padded_string::load(const std::string &fil } // namespace simdjson #endif // SIMDJSON_INLINE_PADDED_STRING_H -/* end file */ -/* begin file simdjson/inline/parsedjson_iterator.h */ +/* end file include/simdjson/inline/padded_string.h */ +/* begin file include/simdjson/inline/parsedjson_iterator.h */ #ifndef SIMDJSON_INLINE_PARSEDJSON_ITERATOR_H #define SIMDJSON_INLINE_PARSEDJSON_ITERATOR_H @@ -6837,9 +6851,9 @@ SIMDJSON_POP_DISABLE_WARNINGS } // namespace simdjson #endif // SIMDJSON_INLINE_PARSEDJSON_ITERATOR_H -/* end file */ +/* end file include/simdjson/inline/parsedjson_iterator.h */ SIMDJSON_POP_DISABLE_WARNINGS #endif // SIMDJSON_H -/* end file */ +/* end file include/simdjson/inline/parsedjson_iterator.h */ From afb369950c66129cf5272a4a82186a5deb70d342 Mon Sep 17 00:00:00 2001 From: John Keiser Date: Mon, 4 May 2020 11:37:28 -0700 Subject: [PATCH 6/6] Disable Intellisense-only warnings in simdjson.h/cpp --- include/simdjson.h | 4 +--- include/simdjson/common_defs.h | 8 ++++++++ singleheader/simdjson.cpp | 6 ++---- singleheader/simdjson.h | 14 ++++++++++---- src/simdjson.cpp | 4 +--- 5 files changed, 22 insertions(+), 14 deletions(-) diff --git a/include/simdjson.h b/include/simdjson.h index 2dc55de00..b795298f7 100644 --- a/include/simdjson.h +++ b/include/simdjson.h @@ -11,9 +11,7 @@ #include "simdjson/common_defs.h" SIMDJSON_PUSH_DISABLE_WARNINGS -#if defined(_MSC_VER) && defined(__clang__) -SIMDJSON_DISABLE_GCC_WARNING(-Wmicrosoft-include) -#endif +SIMDJSON_DISABLE_UNDESIRED_WARNINGS // Public API #include "simdjson/simdjson_version.h" diff --git a/include/simdjson/common_defs.h b/include/simdjson/common_defs.h index debf7c8b5..47a25089a 100644 --- a/include/simdjson/common_defs.h +++ b/include/simdjson/common_defs.h @@ -77,9 +77,12 @@ constexpr size_t DEFAULT_MAX_DEPTH = 1024; #define unlikely(x) x #endif + #include #define SIMDJSON_PUSH_DISABLE_WARNINGS __pragma(warning( push )) #define SIMDJSON_PUSH_DISABLE_ALL_WARNINGS __pragma(warning( push, 0 )) #define SIMDJSON_DISABLE_VS_WARNING(WARNING_NUMBER) __pragma(warning( disable : WARNING_NUMBER )) + // Get rid of Intellisense-only warnings (Code Analysis) + #define SIMDJSON_DISABLE_UNDESIRED_WARNINGS SIMDJSON_DISABLE_VS_WARNING(ALL_CPPCORECHECK_WARNINGS) #define SIMDJSON_DISABLE_DEPRECATED_WARNING SIMDJSON_DISABLE_VS_WARNING(4996) #define SIMDJSON_POP_DISABLE_WARNINGS __pragma(warning( pop )) @@ -113,6 +116,11 @@ constexpr size_t DEFAULT_MAX_DEPTH = 1024; SIMDJSON_DISABLE_GCC_WARNING(-Wunused-variable) #define SIMDJSON_PRAGMA(P) _Pragma(#P) #define SIMDJSON_DISABLE_GCC_WARNING(WARNING) SIMDJSON_PRAGMA(GCC diagnostic ignored #WARNING) + #if defined(SIMDJSON_CLANG_VISUAL_STUDIO) + #define SIMDJSON_DISABLE_UNDESIRED_WARNINGS SIMDJSON_DISABLE_GCC_WARNING(-Wmicrosoft-include) + #else + #define SIMDJSON_DISABLE_UNDESIRED_WARNINGS + #endif #define SIMDJSON_DISABLE_DEPRECATED_WARNING SIMDJSON_DISABLE_GCC_WARNING(-Wdeprecated-declarations) #define SIMDJSON_POP_DISABLE_WARNINGS _Pragma("GCC diagnostic pop") diff --git a/singleheader/simdjson.cpp b/singleheader/simdjson.cpp index c9e0d71e7..09b7f713b 100644 --- a/singleheader/simdjson.cpp +++ b/singleheader/simdjson.cpp @@ -1,11 +1,9 @@ -/* auto-generated on Sat May 2 15:01:27 PDT 2020. Do not edit! */ +/* auto-generated on Mon May 4 11:46:14 PDT 2020. Do not edit! */ /* begin file src/simdjson.cpp */ #include "simdjson.h" SIMDJSON_PUSH_DISABLE_WARNINGS -#if defined(SIMDJSON_CLANG_VISUAL_STUDIO) -SIMDJSON_DISABLE_GCC_WARNING(-Wmicrosoft-include) -#endif +SIMDJSON_DISABLE_UNDESIRED_WARNINGS /* begin file src/error.cpp */ diff --git a/singleheader/simdjson.h b/singleheader/simdjson.h index d251ae613..7fee763f8 100644 --- a/singleheader/simdjson.h +++ b/singleheader/simdjson.h @@ -1,4 +1,4 @@ -/* auto-generated on Sat May 2 15:01:27 PDT 2020. Do not edit! */ +/* auto-generated on Mon May 4 11:46:14 PDT 2020. Do not edit! */ /* begin file include/simdjson.h */ #ifndef SIMDJSON_H #define SIMDJSON_H @@ -328,9 +328,12 @@ constexpr size_t DEFAULT_MAX_DEPTH = 1024; #define unlikely(x) x #endif + #include #define SIMDJSON_PUSH_DISABLE_WARNINGS __pragma(warning( push )) #define SIMDJSON_PUSH_DISABLE_ALL_WARNINGS __pragma(warning( push, 0 )) #define SIMDJSON_DISABLE_VS_WARNING(WARNING_NUMBER) __pragma(warning( disable : WARNING_NUMBER )) + // Get rid of Intellisense-only warnings (Code Analysis) + #define SIMDJSON_DISABLE_UNDESIRED_WARNINGS SIMDJSON_DISABLE_VS_WARNING(ALL_CPPCORECHECK_WARNINGS) #define SIMDJSON_DISABLE_DEPRECATED_WARNING SIMDJSON_DISABLE_VS_WARNING(4996) #define SIMDJSON_POP_DISABLE_WARNINGS __pragma(warning( pop )) @@ -364,6 +367,11 @@ constexpr size_t DEFAULT_MAX_DEPTH = 1024; SIMDJSON_DISABLE_GCC_WARNING(-Wunused-variable) #define SIMDJSON_PRAGMA(P) _Pragma(#P) #define SIMDJSON_DISABLE_GCC_WARNING(WARNING) SIMDJSON_PRAGMA(GCC diagnostic ignored #WARNING) + #if defined(SIMDJSON_CLANG_VISUAL_STUDIO) + #define SIMDJSON_DISABLE_UNDESIRED_WARNINGS SIMDJSON_DISABLE_GCC_WARNING(-Wmicrosoft-include) + #else + #define SIMDJSON_DISABLE_UNDESIRED_WARNINGS + #endif #define SIMDJSON_DISABLE_DEPRECATED_WARNING SIMDJSON_DISABLE_GCC_WARNING(-Wdeprecated-declarations) #define SIMDJSON_POP_DISABLE_WARNINGS _Pragma("GCC diagnostic pop") @@ -1971,9 +1979,7 @@ namespace std { /* end file include/simdjson/nonstd/string_view.hpp */ SIMDJSON_PUSH_DISABLE_WARNINGS -#if defined(_MSC_VER) && defined(__clang__) -SIMDJSON_DISABLE_GCC_WARNING(-Wmicrosoft-include) -#endif +SIMDJSON_DISABLE_UNDESIRED_WARNINGS // Public API /* begin file include/simdjson/simdjson_version.h */ diff --git a/src/simdjson.cpp b/src/simdjson.cpp index 517a19842..d98a8acbb 100644 --- a/src/simdjson.cpp +++ b/src/simdjson.cpp @@ -1,9 +1,7 @@ #include "simdjson.h" SIMDJSON_PUSH_DISABLE_WARNINGS -#if defined(SIMDJSON_CLANG_VISUAL_STUDIO) -SIMDJSON_DISABLE_GCC_WARNING(-Wmicrosoft-include) -#endif +SIMDJSON_DISABLE_UNDESIRED_WARNINGS #include "error.cpp" #include "implementation.cpp"