Make entire implementation namespaces anonymous

This commit is contained in:
John Keiser
2020-07-24 08:09:34 -07:00
parent 65148b123b
commit c7fa9b5fe8
55 changed files with 123 additions and 229 deletions
+5 -9
View File
@@ -6,9 +6,8 @@
// Stage 1
//
namespace simdjson {
namespace SIMDJSON_IMPLEMENTATION {
namespace {
namespace SIMDJSON_IMPLEMENTATION {
using namespace simd;
@@ -65,9 +64,8 @@ really_inline simd8<bool> must_be_2_3_continuation(const simd8<uint8_t> prev2, c
return simd8<int8_t>(is_third_byte | is_fourth_byte) > int8_t(0);
}
} // namespace {
} // namespace SIMDJSON_IMPLEMENTATION
} // namespace simdjson
} // namespace {
#include "generic/stage1/utf8_lookup4_algorithm.h"
#include "generic/stage1/json_structural_indexer.h"
@@ -83,9 +81,8 @@ really_inline simd8<bool> must_be_2_3_continuation(const simd8<uint8_t> prev2, c
//
// Implementation-specific overrides
//
namespace simdjson {
namespace SIMDJSON_IMPLEMENTATION {
namespace {
namespace SIMDJSON_IMPLEMENTATION {
namespace stage1 {
really_inline uint64_t json_string_scanner::find_escaped(uint64_t backslash) {
@@ -94,7 +91,6 @@ really_inline uint64_t json_string_scanner::find_escaped(uint64_t backslash) {
}
} // namespace stage1
} // namespace {
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);
@@ -107,7 +103,7 @@ WARN_UNUSED error_code dom_parser_implementation::stage1(const uint8_t *_buf, si
}
WARN_UNUSED bool implementation::validate_utf8(const char *buf, size_t len) const noexcept {
return simdjson::haswell::stage1::generic_validate_utf8(buf,len);
return haswell::stage1::generic_validate_utf8(buf,len);
}
WARN_UNUSED error_code dom_parser_implementation::stage2(dom::document &_doc) noexcept {
@@ -134,6 +130,6 @@ WARN_UNUSED error_code dom_parser_implementation::parse(const uint8_t *_buf, siz
}
} // namespace SIMDJSON_IMPLEMENTATION
} // namespace simdjson
} // namespace {
#include "haswell/end_implementation.h"