diff --git a/src/arm64/bitmanipulation.h b/src/arm64/bitmanipulation.h index 6db28e77..47216fcd 100644 --- a/src/arm64/bitmanipulation.h +++ b/src/arm64/bitmanipulation.h @@ -1,6 +1,7 @@ #ifndef SIMDJSON_ARM64_BITMANIPULATION_H #define SIMDJSON_ARM64_BITMANIPULATION_H +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -57,5 +58,6 @@ simdjson_really_inline bool add_overflow(uint64_t value1, uint64_t value2, uint6 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #endif // SIMDJSON_ARM64_BITMANIPULATION_H diff --git a/src/arm64/bitmask.h b/src/arm64/bitmask.h index 8b56ffe2..2d3e5c3b 100644 --- a/src/arm64/bitmask.h +++ b/src/arm64/bitmask.h @@ -1,6 +1,7 @@ #ifndef SIMDJSON_ARM64_BITMASK_H #define SIMDJSON_ARM64_BITMASK_H +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -34,6 +35,7 @@ simdjson_really_inline uint64_t prefix_xor(uint64_t bitmask) { } // namespace arm64 } // namespace simdjson +} // namespace simdjson SIMDJSON_UNTARGET_IMPLEMENTATION #endif diff --git a/src/arm64/dom_parser_implementation.cpp b/src/arm64/dom_parser_implementation.cpp index 9b7fb0eb..2685cbac 100644 --- a/src/arm64/dom_parser_implementation.cpp +++ b/src/arm64/dom_parser_implementation.cpp @@ -5,6 +5,7 @@ // // Stage 1 // +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -100,6 +101,7 @@ simdjson_really_inline simd8 must_be_2_3_continuation(const simd8 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "generic/stage1/utf8_lookup4_algorithm.h" #include "generic/stage1/json_structural_indexer.h" @@ -116,6 +118,7 @@ simdjson_really_inline simd8 must_be_2_3_continuation(const simd8 // // Implementation-specific overrides // +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage1 { @@ -159,5 +162,6 @@ SIMDJSON_WARN_UNUSED error_code dom_parser_implementation::parse(const uint8_t * } } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "arm64/end_implementation.h" diff --git a/src/arm64/implementation.cpp b/src/arm64/implementation.cpp index c98a9d70..0039c48a 100644 --- a/src/arm64/implementation.cpp +++ b/src/arm64/implementation.cpp @@ -1,6 +1,7 @@ #include "arm64/begin_implementation.h" #include "arm64/dom_parser_implementation.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { SIMDJSON_WARN_UNUSED error_code implementation::create_dom_parser_implementation( @@ -16,5 +17,6 @@ SIMDJSON_WARN_UNUSED error_code implementation::create_dom_parser_implementation } } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "arm64/end_implementation.h" \ No newline at end of file diff --git a/src/arm64/implementation.h b/src/arm64/implementation.h index 31ff3c48..15205521 100644 --- a/src/arm64/implementation.h +++ b/src/arm64/implementation.h @@ -4,6 +4,7 @@ #include "simdjson.h" #include "isadetection.h" +namespace simdjson { namespace arm64 { using namespace simdjson; @@ -22,5 +23,6 @@ public: }; } // namespace arm64 +} // namespace simdjson #endif // SIMDJSON_ARM64_IMPLEMENTATION_H diff --git a/src/arm64/numberparsing.h b/src/arm64/numberparsing.h index 1ae5e64f..21eaad9c 100644 --- a/src/arm64/numberparsing.h +++ b/src/arm64/numberparsing.h @@ -1,6 +1,7 @@ #ifndef SIMDJSON_ARM64_NUMBERPARSING_H #define SIMDJSON_ARM64_NUMBERPARSING_H +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -16,6 +17,7 @@ static simdjson_really_inline uint32_t parse_eight_digits_unrolled(const uint8_t } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #define SWAR_NUMBER_PARSING diff --git a/src/arm64/simd.h b/src/arm64/simd.h index fd3daef0..fbc95f5a 100644 --- a/src/arm64/simd.h +++ b/src/arm64/simd.h @@ -7,6 +7,7 @@ #include +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace simd { @@ -486,5 +487,6 @@ simdjson_really_inline int8x16_t make_int8x16_t(int8_t x1, int8_t x2, int8_t x } // namespace simd } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #endif // SIMDJSON_ARM64_SIMD_H diff --git a/src/arm64/stringparsing.h b/src/arm64/stringparsing.h index d269bea8..5fa27eb6 100644 --- a/src/arm64/stringparsing.h +++ b/src/arm64/stringparsing.h @@ -5,6 +5,7 @@ #include "arm64/simd.h" #include "arm64/bitmanipulation.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -45,6 +46,7 @@ simdjson_really_inline backslash_and_quote backslash_and_quote::copy_and_find(co } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "generic/stage2/stringparsing.h" diff --git a/src/fallback/bitmanipulation.h b/src/fallback/bitmanipulation.h index ccfba1fc..c0c8fea4 100644 --- a/src/fallback/bitmanipulation.h +++ b/src/fallback/bitmanipulation.h @@ -4,6 +4,7 @@ #include "simdjson.h" #include +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -41,5 +42,6 @@ simdjson_really_inline int leading_zeroes(uint64_t input_num) { } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #endif // SIMDJSON_FALLBACK_BITMANIPULATION_H diff --git a/src/fallback/dom_parser_implementation.cpp b/src/fallback/dom_parser_implementation.cpp index 87e760b6..fad6caf4 100644 --- a/src/fallback/dom_parser_implementation.cpp +++ b/src/fallback/dom_parser_implementation.cpp @@ -7,6 +7,7 @@ // #include "generic/stage1/find_next_document_index.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage1 { @@ -309,6 +310,7 @@ SIMDJSON_WARN_UNUSED bool implementation::validate_utf8(const char *buf, size_t } } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson // // Stage 2 @@ -317,6 +319,7 @@ SIMDJSON_WARN_UNUSED bool implementation::validate_utf8(const char *buf, size_t #include "fallback/numberparsing.h" #include "generic/stage2/tape_builder.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { SIMDJSON_WARN_UNUSED error_code dom_parser_implementation::stage2(dom::document &_doc) noexcept { @@ -334,5 +337,6 @@ SIMDJSON_WARN_UNUSED error_code dom_parser_implementation::parse(const uint8_t * } } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "fallback/end_implementation.h" \ No newline at end of file diff --git a/src/fallback/implementation.cpp b/src/fallback/implementation.cpp index 61954a2f..cb503d11 100644 --- a/src/fallback/implementation.cpp +++ b/src/fallback/implementation.cpp @@ -1,6 +1,7 @@ #include "fallback/begin_implementation.h" #include "fallback/dom_parser_implementation.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { SIMDJSON_WARN_UNUSED error_code implementation::create_dom_parser_implementation( @@ -16,5 +17,6 @@ SIMDJSON_WARN_UNUSED error_code implementation::create_dom_parser_implementation } } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "fallback/end_implementation.h" \ No newline at end of file diff --git a/src/fallback/implementation.h b/src/fallback/implementation.h index 4f4b5625..9bb2e821 100644 --- a/src/fallback/implementation.h +++ b/src/fallback/implementation.h @@ -4,6 +4,7 @@ #include "simdjson.h" #include "isadetection.h" +namespace simdjson { namespace fallback { using namespace simdjson; @@ -26,5 +27,6 @@ public: }; } // namespace fallback +} // namespace simdjson #endif // SIMDJSON_FALLBACK_IMPLEMENTATION_H \ No newline at end of file diff --git a/src/fallback/numberparsing.h b/src/fallback/numberparsing.h index 44684c34..d9a0c32e 100644 --- a/src/fallback/numberparsing.h +++ b/src/fallback/numberparsing.h @@ -8,6 +8,7 @@ void found_unsigned_integer(uint64_t result, const uint8_t *buf); void found_float(double result, const uint8_t *buf); #endif +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { static simdjson_really_inline uint32_t parse_eight_digits_unrolled(const char *chars) { @@ -23,6 +24,7 @@ static simdjson_really_inline uint32_t parse_eight_digits_unrolled(const uint8_t } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #define SWAR_NUMBER_PARSING #include "generic/stage2/numberparsing.h" diff --git a/src/fallback/stringparsing.h b/src/fallback/stringparsing.h index fca6d279..2f06f94f 100644 --- a/src/fallback/stringparsing.h +++ b/src/fallback/stringparsing.h @@ -3,6 +3,7 @@ #include "simdjson.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -28,6 +29,7 @@ simdjson_really_inline backslash_and_quote backslash_and_quote::copy_and_find(co } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "generic/stage2/stringparsing.h" diff --git a/src/generic/dom_parser_implementation.h b/src/generic/dom_parser_implementation.h index 5edc87f9..9261c587 100644 --- a/src/generic/dom_parser_implementation.h +++ b/src/generic/dom_parser_implementation.h @@ -1,6 +1,7 @@ #include "simdjson.h" #include "isadetection.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { // expectation: sizeof(open_container) = 64/8. @@ -40,10 +41,12 @@ public: }; } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "generic/stage1/allocate.h" #include "generic/stage2/allocate.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { inline dom_parser_implementation::dom_parser_implementation() noexcept = default; @@ -66,3 +69,4 @@ SIMDJSON_WARN_UNUSED error_code dom_parser_implementation::set_max_depth(size_t } } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/implementation_simdjson_result_base-inl.h b/src/generic/implementation_simdjson_result_base-inl.h index 54da4f00..36a9e63e 100644 --- a/src/generic/implementation_simdjson_result_base-inl.h +++ b/src/generic/implementation_simdjson_result_base-inl.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { // @@ -73,4 +74,5 @@ template simdjson_really_inline implementation_simdjson_result_base::implementation_simdjson_result_base() noexcept : implementation_simdjson_result_base(T{}, UNINITIALIZED) {} -} // namespace SIMDJSON_IMPLEMENTATION \ No newline at end of file +} // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson \ No newline at end of file diff --git a/src/generic/implementation_simdjson_result_base.h b/src/generic/implementation_simdjson_result_base.h index f2d2a2ca..9c7ac8ab 100644 --- a/src/generic/implementation_simdjson_result_base.h +++ b/src/generic/implementation_simdjson_result_base.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { // This is a near copy of include/error.h's implementation_simdjson_result_base, except it doesn't use std::pair @@ -117,4 +118,5 @@ struct implementation_simdjson_result_base { error_code second; }; // struct implementation_simdjson_result_base -} // namespace SIMDJSON_IMPLEMENTATION \ No newline at end of file +} // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson \ No newline at end of file diff --git a/src/generic/ondemand/array-inl.h b/src/generic/ondemand/array-inl.h index c1aee6b5..ad376079 100644 --- a/src/generic/ondemand/array-inl.h +++ b/src/generic/ondemand/array-inl.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -72,6 +73,7 @@ simdjson_really_inline array_iterator array::end() & noexcept { } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/array.h b/src/generic/ondemand/array.h index 39b6ed6d..eb93aaa9 100644 --- a/src/generic/ondemand/array.h +++ b/src/generic/ondemand/array.h @@ -1,5 +1,6 @@ #include "simdjson/error.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -60,6 +61,7 @@ protected: } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/array_iterator-inl.h b/src/generic/ondemand/array_iterator-inl.h index 0e189190..cc9e0745 100644 --- a/src/generic/ondemand/array_iterator-inl.h +++ b/src/generic/ondemand/array_iterator-inl.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -22,6 +23,7 @@ simdjson_really_inline array_iterator &array_iterator::operator++() noexcept { } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/array_iterator.h b/src/generic/ondemand/array_iterator.h index f157f70b..0c1c0ad0 100644 --- a/src/generic/ondemand/array_iterator.h +++ b/src/generic/ondemand/array_iterator.h @@ -1,5 +1,6 @@ #include "simdjson/error.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -48,6 +49,7 @@ private: } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/document-inl.h b/src/generic/ondemand/document-inl.h index d8f8627d..0c6bbfe6 100644 --- a/src/generic/ondemand/document-inl.h +++ b/src/generic/ondemand/document-inl.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -93,6 +94,7 @@ simdjson_really_inline simdjson_result document::operator[](const char *k } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/document.h b/src/generic/ondemand/document.h index a60f840f..2f5bb05f 100644 --- a/src/generic/ondemand/document.h +++ b/src/generic/ondemand/document.h @@ -1,5 +1,6 @@ #include "simdjson/error.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -82,6 +83,7 @@ protected: } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/field-inl.h b/src/generic/ondemand/field-inl.h index 95ca4ebe..540828aa 100644 --- a/src/generic/ondemand/field-inl.h +++ b/src/generic/ondemand/field-inl.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -30,6 +31,7 @@ simdjson_really_inline value &field::value() noexcept { } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/field.h b/src/generic/ondemand/field.h index 3ece2b43..d7c2fab5 100644 --- a/src/generic/ondemand/field.h +++ b/src/generic/ondemand/field.h @@ -1,5 +1,6 @@ #include "simdjson/error.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -26,6 +27,7 @@ protected: } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/json_iterator-inl.h b/src/generic/ondemand/json_iterator-inl.h index 06899a42..4f202ea4 100644 --- a/src/generic/ondemand/json_iterator-inl.h +++ b/src/generic/ondemand/json_iterator-inl.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -323,6 +324,7 @@ simdjson_really_inline bool json_iterator_ref::is_active() const noexcept { } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/json_iterator.h b/src/generic/ondemand/json_iterator.h index abb8790e..6a08f70a 100644 --- a/src/generic/ondemand/json_iterator.h +++ b/src/generic/ondemand/json_iterator.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -183,6 +184,7 @@ private: } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/logger-inl.h b/src/generic/ondemand/logger-inl.h index 5ab9358b..d97f33d3 100644 --- a/src/generic/ondemand/logger-inl.h +++ b/src/generic/ondemand/logger-inl.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { namespace logger { @@ -71,3 +72,4 @@ simdjson_really_inline void log_line(const json_iterator &iter, const char *titl } // namespace logger } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/ondemand/logger.h b/src/generic/ondemand/logger.h index 0fa474f8..f421d7ac 100644 --- a/src/generic/ondemand/logger.h +++ b/src/generic/ondemand/logger.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -18,3 +19,4 @@ static simdjson_really_inline void log_error(const json_iterator &iter, const ch } // namespace logger } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/ondemand/object-inl.h b/src/generic/ondemand/object-inl.h index f6ad8104..2b62f7bc 100644 --- a/src/generic/ondemand/object-inl.h +++ b/src/generic/ondemand/object-inl.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -121,6 +122,7 @@ simdjson_really_inline object_iterator object::end() noexcept { } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/object.h b/src/generic/ondemand/object.h index 2539a953..6e72a170 100644 --- a/src/generic/ondemand/object.h +++ b/src/generic/ondemand/object.h @@ -1,5 +1,6 @@ #include "simdjson/error.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -63,6 +64,7 @@ protected: } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/object_iterator-inl.h b/src/generic/ondemand/object_iterator-inl.h index 1671e15b..76f3b3d0 100644 --- a/src/generic/ondemand/object_iterator-inl.h +++ b/src/generic/ondemand/object_iterator-inl.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -27,6 +28,7 @@ simdjson_really_inline object_iterator &object_iterator::operator++() noexcept { } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/object_iterator.h b/src/generic/ondemand/object_iterator.h index 0b0ae321..db119d49 100644 --- a/src/generic/ondemand/object_iterator.h +++ b/src/generic/ondemand/object_iterator.h @@ -1,5 +1,6 @@ #include "simdjson/error.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -42,6 +43,7 @@ private: } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/parser-inl.h b/src/generic/ondemand/parser-inl.h index a11ce312..7f843e82 100644 --- a/src/generic/ondemand/parser-inl.h +++ b/src/generic/ondemand/parser-inl.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -41,6 +42,7 @@ SIMDJSON_WARN_UNUSED simdjson_really_inline simdjson_result parse } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/parser.h b/src/generic/ondemand/parser.h index a7708c40..9f7cbb75 100644 --- a/src/generic/ondemand/parser.h +++ b/src/generic/ondemand/parser.h @@ -1,5 +1,6 @@ #include "simdjson/error.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -35,6 +36,7 @@ private: } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/raw_json_string-inl.h b/src/generic/ondemand/raw_json_string-inl.h index a9de9e9e..9f8d405b 100644 --- a/src/generic/ondemand/raw_json_string-inl.h +++ b/src/generic/ondemand/raw_json_string-inl.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -34,6 +35,7 @@ SIMDJSON_UNUSED simdjson_really_inline bool operator!=(std::string_view a, const } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/raw_json_string.h b/src/generic/ondemand/raw_json_string.h index 564e89be..52bb67a2 100644 --- a/src/generic/ondemand/raw_json_string.h +++ b/src/generic/ondemand/raw_json_string.h @@ -1,5 +1,6 @@ #include "simdjson/error.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -32,6 +33,7 @@ SIMDJSON_UNUSED simdjson_really_inline bool operator!=(std::string_view a, const } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/token_iterator-inl.h b/src/generic/ondemand/token_iterator-inl.h index b75ee5d7..ea71af21 100644 --- a/src/generic/ondemand/token_iterator-inl.h +++ b/src/generic/ondemand/token_iterator-inl.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -40,6 +41,7 @@ simdjson_really_inline bool token_iterator::operator<=(const token_iterator &oth } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/token_iterator.h b/src/generic/ondemand/token_iterator.h index 524c497e..a25c885d 100644 --- a/src/generic/ondemand/token_iterator.h +++ b/src/generic/ondemand/token_iterator.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -73,6 +74,7 @@ protected: } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/value-inl.h b/src/generic/ondemand/value-inl.h index 5b6fee0a..3d4cd22a 100644 --- a/src/generic/ondemand/value-inl.h +++ b/src/generic/ondemand/value-inl.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -166,6 +167,7 @@ simdjson_really_inline void value::log_error(const char *message) const noexcept } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/ondemand/value.h b/src/generic/ondemand/value.h index 99eb000e..ce2b5040 100644 --- a/src/generic/ondemand/value.h +++ b/src/generic/ondemand/value.h @@ -1,5 +1,6 @@ #include "simdjson/error.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand { @@ -88,6 +89,7 @@ protected: } // namespace ondemand } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson namespace simdjson { diff --git a/src/generic/stage1/allocate.h b/src/generic/stage1/allocate.h index 46ab3b33..9ed15539 100644 --- a/src/generic/stage1/allocate.h +++ b/src/generic/stage1/allocate.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage1 { @@ -19,3 +20,4 @@ simdjson_really_inline error_code set_capacity(internal::dom_parser_implementati } // namespace stage1 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage1/buf_block_reader.h b/src/generic/stage1/buf_block_reader.h index 3068a0a3..813e1355 100644 --- a/src/generic/stage1/buf_block_reader.h +++ b/src/generic/stage1/buf_block_reader.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -88,3 +89,4 @@ simdjson_really_inline void buf_block_reader::advance() { } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage1/find_next_document_index.h b/src/generic/stage1/find_next_document_index.h index c4580c46..35358068 100644 --- a/src/generic/stage1/find_next_document_index.h +++ b/src/generic/stage1/find_next_document_index.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -69,3 +70,4 @@ simdjson_really_inline uint32_t find_next_document_index(dom_parser_implementati } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage1/json_minifier.h b/src/generic/stage1/json_minifier.h index bf042e9d..f163b23f 100644 --- a/src/generic/stage1/json_minifier.h +++ b/src/generic/stage1/json_minifier.h @@ -3,6 +3,7 @@ // We assume the file in which it is included already includes // "simdjson/stage1.h" (this simplifies amalgation) +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage1 { @@ -90,3 +91,4 @@ error_code json_minifier::minify(const uint8_t *buf, size_t len, uint8_t *dst, s } // namespace stage1 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage1/json_scanner.h b/src/generic/stage1/json_scanner.h index 294911d1..c5b6e22d 100644 --- a/src/generic/stage1/json_scanner.h +++ b/src/generic/stage1/json_scanner.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage1 { @@ -144,3 +145,4 @@ simdjson_really_inline error_code json_scanner::finish(bool streaming) { } // namespace stage1 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage1/json_string_scanner.h b/src/generic/stage1/json_string_scanner.h index fb44f816..e47051b2 100644 --- a/src/generic/stage1/json_string_scanner.h +++ b/src/generic/stage1/json_string_scanner.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage1 { @@ -141,3 +142,4 @@ simdjson_really_inline error_code json_string_scanner::finish(bool streaming) { } // namespace stage1 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage1/json_structural_indexer.h b/src/generic/stage1/json_structural_indexer.h index a2bd20e8..e731642e 100644 --- a/src/generic/stage1/json_structural_indexer.h +++ b/src/generic/stage1/json_structural_indexer.h @@ -9,6 +9,7 @@ #include "generic/stage1/json_minifier.h" #include "generic/stage1/find_next_document_index.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage1 { @@ -228,3 +229,4 @@ simdjson_really_inline error_code json_structural_indexer::finish(dom_parser_imp } // namespace stage1 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage1/utf8_fastvalidate_algorithm.h b/src/generic/stage1/utf8_fastvalidate_algorithm.h index fd446175..7942ce50 100644 --- a/src/generic/stage1/utf8_fastvalidate_algorithm.h +++ b/src/generic/stage1/utf8_fastvalidate_algorithm.h @@ -1,4 +1,5 @@ namespace simdjson { +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { /* @@ -182,3 +183,4 @@ struct utf8_checker { } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage1/utf8_lookup2_algorithm.h b/src/generic/stage1/utf8_lookup2_algorithm.h index 9cf6d118..0656c23b 100644 --- a/src/generic/stage1/utf8_lookup2_algorithm.h +++ b/src/generic/stage1/utf8_lookup2_algorithm.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace utf8_validation { @@ -223,3 +224,4 @@ using utf8_validation::utf8_checker; } // namespace SIMDJSON_IMPLEMENTATION } // namespace simdjson +} // namespace simdjson diff --git a/src/generic/stage1/utf8_lookup3_algorithm.h b/src/generic/stage1/utf8_lookup3_algorithm.h index 2d8f18b7..5330fd69 100644 --- a/src/generic/stage1/utf8_lookup3_algorithm.h +++ b/src/generic/stage1/utf8_lookup3_algorithm.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace utf8_validation { @@ -243,3 +244,4 @@ using utf8_validation::utf8_checker; } // namespace SIMDJSON_IMPLEMENTATION } // namespace simdjson +} // namespace simdjson diff --git a/src/generic/stage1/utf8_lookup4_algorithm.h b/src/generic/stage1/utf8_lookup4_algorithm.h index 5ccaf5a3..80c29a37 100644 --- a/src/generic/stage1/utf8_lookup4_algorithm.h +++ b/src/generic/stage1/utf8_lookup4_algorithm.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace utf8_validation { @@ -181,3 +182,4 @@ using utf8_validation::utf8_checker; } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage1/utf8_lookup_algorithm.h b/src/generic/stage1/utf8_lookup_algorithm.h index 3505c4f3..b402e340 100644 --- a/src/generic/stage1/utf8_lookup_algorithm.h +++ b/src/generic/stage1/utf8_lookup_algorithm.h @@ -1,4 +1,5 @@ namespace simdjson { +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace utf8_validation { @@ -301,3 +302,4 @@ struct utf8_checker { } // namespace utf8_validation } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage1/utf8_range_algorithm.h b/src/generic/stage1/utf8_range_algorithm.h index 1898577e..3694df9e 100644 --- a/src/generic/stage1/utf8_range_algorithm.h +++ b/src/generic/stage1/utf8_range_algorithm.h @@ -1,4 +1,5 @@ namespace simdjson { +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { /* @@ -184,3 +185,4 @@ struct utf8_checker { } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage1/utf8_validator.h b/src/generic/stage1/utf8_validator.h index 5ba08e89..abd3c4a4 100644 --- a/src/generic/stage1/utf8_validator.h +++ b/src/generic/stage1/utf8_validator.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage1 { @@ -30,3 +31,4 @@ bool generic_validate_utf8(const char * input, size_t length) { } // namespace stage1 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage1/utf8_zwegner_algorithm.h b/src/generic/stage1/utf8_zwegner_algorithm.h index 9b5fb2c3..885f263a 100644 --- a/src/generic/stage1/utf8_zwegner_algorithm.h +++ b/src/generic/stage1/utf8_zwegner_algorithm.h @@ -1,4 +1,5 @@ namespace simdjson { +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { // // Detect UTF-8 errors. @@ -363,3 +364,4 @@ struct utf8_checker { } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage2/allocate.h b/src/generic/stage2/allocate.h index eec40496..0683f7b4 100644 --- a/src/generic/stage2/allocate.h +++ b/src/generic/stage2/allocate.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage2 { @@ -20,3 +21,4 @@ simdjson_really_inline error_code set_max_depth(dom_parser_implementation &parse } // namespace stage2 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage2/atomparsing.h b/src/generic/stage2/atomparsing.h index db768186..063ef3cf 100644 --- a/src/generic/stage2/atomparsing.h +++ b/src/generic/stage2/atomparsing.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage2 { @@ -62,3 +63,4 @@ simdjson_really_inline bool is_valid_null_atom(const uint8_t *src, size_t len) { } // namespace stage2 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage2/json_iterator.h b/src/generic/stage2/json_iterator.h index eab3053e..91fce480 100644 --- a/src/generic/stage2/json_iterator.h +++ b/src/generic/stage2/json_iterator.h @@ -1,5 +1,6 @@ #include "generic/stage2/logger.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage2 { @@ -313,3 +314,4 @@ SIMDJSON_WARN_UNUSED simdjson_really_inline error_code json_iterator::visit_prim } // namespace stage2 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage2/jsoncharutils.h b/src/generic/stage2/jsoncharutils.h index c36b2195..e6bab357 100644 --- a/src/generic/stage2/jsoncharutils.h +++ b/src/generic/stage2/jsoncharutils.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage2 { @@ -107,3 +108,4 @@ simdjson_really_inline value128 full_multiplication(uint64_t value1, uint64_t va } // namespace stage2 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage2/logger.h b/src/generic/stage2/logger.h index 7eda82df..f3f5c7ab 100644 --- a/src/generic/stage2/logger.h +++ b/src/generic/stage2/logger.h @@ -1,5 +1,6 @@ // This is for an internal-only stage 2 specific logger. // Set LOG_ENABLED = true to log what stage 2 is doing! +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace logger { @@ -84,3 +85,4 @@ namespace logger { } // namespace logger } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage2/numberparsing.h b/src/generic/stage2/numberparsing.h index 698162bb..6b0a55b6 100644 --- a/src/generic/stage2/numberparsing.h +++ b/src/generic/stage2/numberparsing.h @@ -1,6 +1,7 @@ #include #include +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage2 { @@ -768,3 +769,4 @@ SIMDJSON_UNUSED simdjson_really_inline simdjson_result parse_double(cons } // namespace stage2 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage2/stringparsing.h b/src/generic/stage2/stringparsing.h index b86d2742..de5d48e5 100644 --- a/src/generic/stage2/stringparsing.h +++ b/src/generic/stage2/stringparsing.h @@ -1,6 +1,7 @@ // This file contains the common code every implementation uses // It is intended to be included multiple times and compiled multiple times +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage2 { @@ -131,3 +132,4 @@ SIMDJSON_UNUSED SIMDJSON_WARN_UNUSED simdjson_really_inline error_code parse_str } // namespace stage2 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage2/structural_iterator.h b/src/generic/stage2/structural_iterator.h index 11ae1aad..18533c10 100644 --- a/src/generic/stage2/structural_iterator.h +++ b/src/generic/stage2/structural_iterator.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage2 { @@ -50,3 +51,4 @@ public: } // namespace stage2 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage2/tape_builder.h b/src/generic/stage2/tape_builder.h index 6134631c..6aa474b5 100644 --- a/src/generic/stage2/tape_builder.h +++ b/src/generic/stage2/tape_builder.h @@ -2,6 +2,7 @@ #include "generic/stage2/tape_writer.h" #include "generic/stage2/atomparsing.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage2 { @@ -281,3 +282,4 @@ simdjson_really_inline void tape_builder::on_end_string(uint8_t *dst) noexcept { } // namespace stage2 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/generic/stage2/tape_writer.h b/src/generic/stage2/tape_writer.h index 551cce0f..d8117b15 100644 --- a/src/generic/stage2/tape_writer.h +++ b/src/generic/stage2/tape_writer.h @@ -1,3 +1,4 @@ +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage2 { @@ -101,3 +102,4 @@ simdjson_really_inline void tape_writer::write(uint64_t &tape_loc, uint64_t val, } // namespace stage2 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson diff --git a/src/haswell/bitmanipulation.h b/src/haswell/bitmanipulation.h index e0dec035..14df0a78 100644 --- a/src/haswell/bitmanipulation.h +++ b/src/haswell/bitmanipulation.h @@ -1,6 +1,7 @@ #ifndef SIMDJSON_HASWELL_BITMANIPULATION_H #define SIMDJSON_HASWELL_BITMANIPULATION_H +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -55,5 +56,6 @@ simdjson_really_inline bool add_overflow(uint64_t value1, uint64_t value2, } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #endif // SIMDJSON_HASWELL_BITMANIPULATION_H diff --git a/src/haswell/bitmask.h b/src/haswell/bitmask.h index 871e3e7e..6a5396cb 100644 --- a/src/haswell/bitmask.h +++ b/src/haswell/bitmask.h @@ -1,6 +1,7 @@ #ifndef SIMDJSON_HASWELL_BITMASK_H #define SIMDJSON_HASWELL_BITMASK_H +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -19,5 +20,6 @@ simdjson_really_inline uint64_t prefix_xor(const uint64_t bitmask) { } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #endif // SIMDJSON_HASWELL_BITMASK_H diff --git a/src/haswell/dom_parser_implementation.cpp b/src/haswell/dom_parser_implementation.cpp index 0dc8ba33..450fda02 100644 --- a/src/haswell/dom_parser_implementation.cpp +++ b/src/haswell/dom_parser_implementation.cpp @@ -6,6 +6,7 @@ // Stage 1 // +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -104,6 +105,7 @@ simdjson_really_inline simd8 must_be_2_3_continuation(const simd8 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "generic/stage1/utf8_lookup4_algorithm.h" #include "generic/stage1/json_structural_indexer.h" @@ -119,6 +121,7 @@ simdjson_really_inline simd8 must_be_2_3_continuation(const simd8 // // Implementation-specific overrides // +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage1 { @@ -160,6 +163,7 @@ SIMDJSON_WARN_UNUSED error_code dom_parser_implementation::parse(const uint8_t * } } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "generic/ondemand.h" diff --git a/src/haswell/implementation.cpp b/src/haswell/implementation.cpp index 501b7bf8..993b42a0 100644 --- a/src/haswell/implementation.cpp +++ b/src/haswell/implementation.cpp @@ -1,6 +1,7 @@ #include "haswell/begin_implementation.h" #include "haswell/dom_parser_implementation.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { SIMDJSON_WARN_UNUSED error_code implementation::create_dom_parser_implementation( @@ -16,6 +17,7 @@ SIMDJSON_WARN_UNUSED error_code implementation::create_dom_parser_implementation } } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "haswell/end_implementation.h" diff --git a/src/haswell/implementation.h b/src/haswell/implementation.h index 764a58a2..52e4bbc4 100644 --- a/src/haswell/implementation.h +++ b/src/haswell/implementation.h @@ -5,6 +5,7 @@ #include "isadetection.h" // The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_REGION +namespace simdjson { namespace haswell { using namespace simdjson; @@ -26,5 +27,6 @@ public: }; } // namespace haswell +} // namespace simdjson #endif // SIMDJSON_HASWELL_IMPLEMENTATION_H \ No newline at end of file diff --git a/src/haswell/numberparsing.h b/src/haswell/numberparsing.h index d4388f7f..2e1e004b 100644 --- a/src/haswell/numberparsing.h +++ b/src/haswell/numberparsing.h @@ -1,6 +1,7 @@ #ifndef SIMDJSON_HASWELL_NUMBERPARSING_H #define SIMDJSON_HASWELL_NUMBERPARSING_H +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -24,6 +25,7 @@ static simdjson_really_inline uint32_t parse_eight_digits_unrolled(const uint8_t } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #define SWAR_NUMBER_PARSING diff --git a/src/haswell/simd.h b/src/haswell/simd.h index 0896cbe9..36b20c8a 100644 --- a/src/haswell/simd.h +++ b/src/haswell/simd.h @@ -3,6 +3,7 @@ #include "simdprune_tables.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace simd { @@ -357,5 +358,6 @@ namespace simd { } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #endif // SIMDJSON_HASWELL_SIMD_H diff --git a/src/haswell/stringparsing.h b/src/haswell/stringparsing.h index 8e072301..d7da2e08 100644 --- a/src/haswell/stringparsing.h +++ b/src/haswell/stringparsing.h @@ -5,6 +5,7 @@ #include "haswell/simd.h" #include "haswell/bitmanipulation.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -40,6 +41,7 @@ simdjson_really_inline backslash_and_quote backslash_and_quote::copy_and_find(co } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "generic/stage2/stringparsing.h" diff --git a/src/westmere/bitmanipulation.h b/src/westmere/bitmanipulation.h index 9adf21a2..02f2825c 100644 --- a/src/westmere/bitmanipulation.h +++ b/src/westmere/bitmanipulation.h @@ -1,6 +1,7 @@ #ifndef SIMDJSON_WESTMERE_BITMANIPULATION_H #define SIMDJSON_WESTMERE_BITMANIPULATION_H +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -64,5 +65,6 @@ simdjson_really_inline bool add_overflow(uint64_t value1, uint64_t value2, } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #endif // SIMDJSON_WESTMERE_BITMANIPULATION_H diff --git a/src/westmere/bitmask.h b/src/westmere/bitmask.h index 10e107fa..e7e21b7f 100644 --- a/src/westmere/bitmask.h +++ b/src/westmere/bitmask.h @@ -1,6 +1,7 @@ #ifndef SIMDJSON_WESTMERE_BITMASK_H #define SIMDJSON_WESTMERE_BITMASK_H +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -19,5 +20,6 @@ simdjson_really_inline uint64_t prefix_xor(const uint64_t bitmask) { } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #endif // SIMDJSON_WESTMERE_BITMASK_H diff --git a/src/westmere/dom_parser_implementation.cpp b/src/westmere/dom_parser_implementation.cpp index 9723f107..32b5aa78 100644 --- a/src/westmere/dom_parser_implementation.cpp +++ b/src/westmere/dom_parser_implementation.cpp @@ -6,6 +6,7 @@ // Stage 1 // +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -102,6 +103,7 @@ simdjson_really_inline simd8 must_be_2_3_continuation(const simd8 } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "generic/stage1/utf8_lookup4_algorithm.h" #include "generic/stage1/json_structural_indexer.h" @@ -118,6 +120,7 @@ simdjson_really_inline simd8 must_be_2_3_continuation(const simd8 // Implementation-specific overrides // +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace stage1 { @@ -159,5 +162,6 @@ SIMDJSON_WARN_UNUSED error_code dom_parser_implementation::parse(const uint8_t * } } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "westmere/end_implementation.h" diff --git a/src/westmere/implementation.cpp b/src/westmere/implementation.cpp index e8755ac8..e3b159a3 100644 --- a/src/westmere/implementation.cpp +++ b/src/westmere/implementation.cpp @@ -1,6 +1,7 @@ #include "westmere/begin_implementation.h" #include "westmere/dom_parser_implementation.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -18,5 +19,6 @@ SIMDJSON_WARN_UNUSED error_code implementation::create_dom_parser_implementation } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "westmere/end_implementation.h" \ No newline at end of file diff --git a/src/westmere/implementation.h b/src/westmere/implementation.h index f95c13ed..4ed8b3c9 100644 --- a/src/westmere/implementation.h +++ b/src/westmere/implementation.h @@ -6,6 +6,7 @@ #include "isadetection.h" // The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_REGION +namespace simdjson { namespace westmere { namespace { @@ -26,5 +27,6 @@ public: } // unnamed namespace } // namespace westmere +} // namespace simdjson #endif // SIMDJSON_WESTMERE_IMPLEMENTATION_H \ No newline at end of file diff --git a/src/westmere/numberparsing.h b/src/westmere/numberparsing.h index 4ec26cfe..09a2aa8c 100644 --- a/src/westmere/numberparsing.h +++ b/src/westmere/numberparsing.h @@ -1,6 +1,7 @@ #ifndef SIMDJSON_WESTMERE_NUMBERPARSING_H #define SIMDJSON_WESTMERE_NUMBERPARSING_H +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -24,6 +25,7 @@ static simdjson_really_inline uint32_t parse_eight_digits_unrolled(const uint8_t } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #define SWAR_NUMBER_PARSING diff --git a/src/westmere/simd.h b/src/westmere/simd.h index 6385b995..520a53f9 100644 --- a/src/westmere/simd.h +++ b/src/westmere/simd.h @@ -3,6 +3,7 @@ #include "simdprune_tables.h" +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { namespace simd { @@ -328,5 +329,6 @@ namespace simd { } // namespace simd } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #endif // SIMDJSON_WESTMERE_SIMD_INPUT_H diff --git a/src/westmere/stringparsing.h b/src/westmere/stringparsing.h index 0c2af8d5..55b5c143 100644 --- a/src/westmere/stringparsing.h +++ b/src/westmere/stringparsing.h @@ -1,6 +1,7 @@ #ifndef SIMDJSON_WESTMERE_STRINGPARSING_H #define SIMDJSON_WESTMERE_STRINGPARSING_H +namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace { @@ -38,6 +39,7 @@ simdjson_really_inline backslash_and_quote backslash_and_quote::copy_and_find(co } // unnamed namespace } // namespace SIMDJSON_IMPLEMENTATION +} // namespace simdjson #include "generic/stage2/stringparsing.h"