Include files where they are used

This commit is contained in:
John Keiser 2020-07-16 13:05:59 -07:00
parent 464f4813e3
commit 3867ee71ed
7 changed files with 14 additions and 34 deletions

View File

@ -104,13 +104,9 @@ really_inline simd8<bool> must_be_2_3_continuation(const simd8<uint8_t> prev2, c
} // namespace SIMDJSON_IMPLEMENTATION
} // namespace simdjson
#include "generic/stage1/buf_block_reader.h"
#include "generic/stage1/json_string_scanner.h"
#include "generic/stage1/json_scanner.h"
#include "generic/stage1/json_minifier.h"
#include "generic/stage1/find_next_document_index.h"
#include "generic/stage1/utf8_lookup4_algorithm.h"
#include "generic/stage1/json_structural_indexer.h"
#include "generic/stage1/utf8_validator.h"
//
// Stage 2
@ -118,9 +114,6 @@ really_inline simd8<bool> must_be_2_3_continuation(const simd8<uint8_t> prev2, c
#include "arm64/stringparsing.h"
#include "arm64/numberparsing.h"
#include "generic/stage2/logger.h"
#include "generic/stage2/atomparsing.h"
#include "generic/stage2/structural_iterator.h"
#include "generic/stage2/structural_parser.h"
//
@ -150,8 +143,6 @@ WARN_UNUSED error_code dom_parser_implementation::stage1(const uint8_t *_buf, si
return arm64::stage1::json_structural_indexer::index<64>(buf, len, *this, streaming);
}
#include "generic/stage1/utf8_validator.h"
WARN_UNUSED bool implementation::validate_utf8(const char *buf, size_t len) const noexcept {
return simdjson::arm64::stage1::generic_validate_utf8(buf,len);
}
@ -165,4 +156,4 @@ WARN_UNUSED error_code dom_parser_implementation::parse(const uint8_t *_buf, siz
} // namespace SIMDJSON_IMPLEMENTATION
} // namespace simdjson
#include "arm64/end_implementation.h"
#include "arm64/end_implementation.h"

View File

@ -314,9 +314,6 @@ WARN_UNUSED bool implementation::validate_utf8(const char *buf, size_t len) cons
//
#include "fallback/stringparsing.h"
#include "fallback/numberparsing.h"
#include "generic/stage2/logger.h"
#include "generic/stage2/atomparsing.h"
#include "generic/stage2/structural_iterator.h"
#include "generic/stage2/structural_parser.h"
namespace simdjson {

View File

@ -3,6 +3,12 @@
// We assume the file in which it is included already includes
// "simdjson/stage1.h" (this simplifies amalgation)
#include "generic/stage1/buf_block_reader.h"
#include "generic/stage1/json_string_scanner.h"
#include "generic/stage1/json_scanner.h"
#include "generic/stage1/json_minifier.h"
#include "generic/stage1/find_next_document_index.h"
namespace simdjson {
namespace SIMDJSON_IMPLEMENTATION {
namespace stage1 {

View File

@ -1,6 +1,7 @@
namespace simdjson {
namespace SIMDJSON_IMPLEMENTATION {
namespace stage1 {
/**
* Validates that the string is actual UTF-8.
*/

View File

@ -4,6 +4,9 @@
// "simdjson/stage2.h" (this simplifies amalgation)
#include "generic/stage2/tape_writer.h"
#include "generic/stage2/logger.h"
#include "generic/stage2/atomparsing.h"
#include "generic/stage2/structural_iterator.h"
namespace simdjson {
namespace SIMDJSON_IMPLEMENTATION {

View File

@ -69,22 +69,15 @@ really_inline simd8<bool> must_be_2_3_continuation(const simd8<uint8_t> prev2, c
} // namespace SIMDJSON_IMPLEMENTATION
} // namespace simdjson
#include "generic/stage1/buf_block_reader.h"
#include "generic/stage1/json_string_scanner.h"
#include "generic/stage1/json_scanner.h"
#include "generic/stage1/json_minifier.h"
#include "generic/stage1/find_next_document_index.h"
#include "generic/stage1/utf8_lookup4_algorithm.h"
#include "generic/stage1/json_structural_indexer.h"
#include "generic/stage1/utf8_validator.h"
//
// Stage 2
//
#include "haswell/stringparsing.h"
#include "haswell/numberparsing.h"
#include "generic/stage2/logger.h"
#include "generic/stage2/atomparsing.h"
#include "generic/stage2/structural_iterator.h"
#include "generic/stage2/structural_parser.h"
//
@ -112,8 +105,6 @@ WARN_UNUSED error_code dom_parser_implementation::stage1(const uint8_t *_buf, si
return haswell::stage1::json_structural_indexer::index<128>(_buf, _len, *this, streaming);
}
#include "generic/stage1/utf8_validator.h"
WARN_UNUSED bool implementation::validate_utf8(const char *buf, size_t len) const noexcept {
return simdjson::haswell::stage1::generic_validate_utf8(buf,len);
}

View File

@ -74,22 +74,15 @@ really_inline simd8<bool> must_be_2_3_continuation(const simd8<uint8_t> prev2, c
} // namespace SIMDJSON_IMPLEMENTATION
} // namespace simdjson
#include "generic/stage1/buf_block_reader.h"
#include "generic/stage1/json_string_scanner.h"
#include "generic/stage1/json_scanner.h"
#include "generic/stage1/json_minifier.h"
#include "generic/stage1/find_next_document_index.h"
#include "generic/stage1/utf8_lookup4_algorithm.h"
#include "generic/stage1/json_structural_indexer.h"
#include "generic/stage1/utf8_validator.h"
//
// Stage 2
//
#include "westmere/stringparsing.h"
#include "westmere/numberparsing.h"
#include "generic/stage2/logger.h"
#include "generic/stage2/atomparsing.h"
#include "generic/stage2/structural_iterator.h"
#include "generic/stage2/structural_parser.h"
//
@ -117,8 +110,6 @@ WARN_UNUSED error_code dom_parser_implementation::stage1(const uint8_t *_buf, si
return westmere::stage1::json_structural_indexer::index<64>(_buf, _len, *this, streaming);
}
#include "generic/stage1/utf8_validator.h"
WARN_UNUSED bool implementation::validate_utf8(const char *buf, size_t len) const noexcept {
return simdjson::westmere::stage1::generic_validate_utf8(buf,len);
}