Skip to content

Commit 3867ee7

Browse files
committed
Include files where they are used
1 parent 464f481 commit 3867ee7

File tree

7 files changed

+14
-34
lines changed

7 files changed

+14
-34
lines changed

src/arm64/dom_parser_implementation.cpp

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -104,23 +104,16 @@ really_inline simd8<bool> must_be_2_3_continuation(const simd8<uint8_t> prev2, c
104104
} // namespace SIMDJSON_IMPLEMENTATION
105105
} // namespace simdjson
106106

107-
#include "generic/stage1/buf_block_reader.h"
108-
#include "generic/stage1/json_string_scanner.h"
109-
#include "generic/stage1/json_scanner.h"
110-
#include "generic/stage1/json_minifier.h"
111-
#include "generic/stage1/find_next_document_index.h"
112107
#include "generic/stage1/utf8_lookup4_algorithm.h"
113108
#include "generic/stage1/json_structural_indexer.h"
109+
#include "generic/stage1/utf8_validator.h"
114110

115111
//
116112
// Stage 2
117113
//
118114

119115
#include "arm64/stringparsing.h"
120116
#include "arm64/numberparsing.h"
121-
#include "generic/stage2/logger.h"
122-
#include "generic/stage2/atomparsing.h"
123-
#include "generic/stage2/structural_iterator.h"
124117
#include "generic/stage2/structural_parser.h"
125118

126119
//
@@ -150,8 +143,6 @@ WARN_UNUSED error_code dom_parser_implementation::stage1(const uint8_t *_buf, si
150143
return arm64::stage1::json_structural_indexer::index<64>(buf, len, *this, streaming);
151144
}
152145

153-
#include "generic/stage1/utf8_validator.h"
154-
155146
WARN_UNUSED bool implementation::validate_utf8(const char *buf, size_t len) const noexcept {
156147
return simdjson::arm64::stage1::generic_validate_utf8(buf,len);
157148
}
@@ -165,4 +156,4 @@ WARN_UNUSED error_code dom_parser_implementation::parse(const uint8_t *_buf, siz
165156
} // namespace SIMDJSON_IMPLEMENTATION
166157
} // namespace simdjson
167158

168-
#include "arm64/end_implementation.h"
159+
#include "arm64/end_implementation.h"

src/fallback/dom_parser_implementation.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,6 @@ WARN_UNUSED bool implementation::validate_utf8(const char *buf, size_t len) cons
314314
//
315315
#include "fallback/stringparsing.h"
316316
#include "fallback/numberparsing.h"
317-
#include "generic/stage2/logger.h"
318-
#include "generic/stage2/atomparsing.h"
319-
#include "generic/stage2/structural_iterator.h"
320317
#include "generic/stage2/structural_parser.h"
321318

322319
namespace simdjson {

src/generic/stage1/json_structural_indexer.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
// We assume the file in which it is included already includes
44
// "simdjson/stage1.h" (this simplifies amalgation)
55

6+
#include "generic/stage1/buf_block_reader.h"
7+
#include "generic/stage1/json_string_scanner.h"
8+
#include "generic/stage1/json_scanner.h"
9+
#include "generic/stage1/json_minifier.h"
10+
#include "generic/stage1/find_next_document_index.h"
11+
612
namespace simdjson {
713
namespace SIMDJSON_IMPLEMENTATION {
814
namespace stage1 {

src/generic/stage1/utf8_validator.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
namespace simdjson {
22
namespace SIMDJSON_IMPLEMENTATION {
33
namespace stage1 {
4+
45
/**
56
* Validates that the string is actual UTF-8.
67
*/

src/generic/stage2/structural_parser.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
// "simdjson/stage2.h" (this simplifies amalgation)
55

66
#include "generic/stage2/tape_writer.h"
7+
#include "generic/stage2/logger.h"
8+
#include "generic/stage2/atomparsing.h"
9+
#include "generic/stage2/structural_iterator.h"
710

811
namespace simdjson {
912
namespace SIMDJSON_IMPLEMENTATION {

src/haswell/dom_parser_implementation.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,22 +69,15 @@ really_inline simd8<bool> must_be_2_3_continuation(const simd8<uint8_t> prev2, c
6969
} // namespace SIMDJSON_IMPLEMENTATION
7070
} // namespace simdjson
7171

72-
#include "generic/stage1/buf_block_reader.h"
73-
#include "generic/stage1/json_string_scanner.h"
74-
#include "generic/stage1/json_scanner.h"
75-
#include "generic/stage1/json_minifier.h"
76-
#include "generic/stage1/find_next_document_index.h"
7772
#include "generic/stage1/utf8_lookup4_algorithm.h"
7873
#include "generic/stage1/json_structural_indexer.h"
74+
#include "generic/stage1/utf8_validator.h"
7975

8076
//
8177
// Stage 2
8278
//
8379
#include "haswell/stringparsing.h"
8480
#include "haswell/numberparsing.h"
85-
#include "generic/stage2/logger.h"
86-
#include "generic/stage2/atomparsing.h"
87-
#include "generic/stage2/structural_iterator.h"
8881
#include "generic/stage2/structural_parser.h"
8982

9083
//
@@ -112,8 +105,6 @@ WARN_UNUSED error_code dom_parser_implementation::stage1(const uint8_t *_buf, si
112105
return haswell::stage1::json_structural_indexer::index<128>(_buf, _len, *this, streaming);
113106
}
114107

115-
#include "generic/stage1/utf8_validator.h"
116-
117108
WARN_UNUSED bool implementation::validate_utf8(const char *buf, size_t len) const noexcept {
118109
return simdjson::haswell::stage1::generic_validate_utf8(buf,len);
119110
}

src/westmere/dom_parser_implementation.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,22 +74,15 @@ really_inline simd8<bool> must_be_2_3_continuation(const simd8<uint8_t> prev2, c
7474
} // namespace SIMDJSON_IMPLEMENTATION
7575
} // namespace simdjson
7676

77-
#include "generic/stage1/buf_block_reader.h"
78-
#include "generic/stage1/json_string_scanner.h"
79-
#include "generic/stage1/json_scanner.h"
80-
#include "generic/stage1/json_minifier.h"
81-
#include "generic/stage1/find_next_document_index.h"
8277
#include "generic/stage1/utf8_lookup4_algorithm.h"
8378
#include "generic/stage1/json_structural_indexer.h"
79+
#include "generic/stage1/utf8_validator.h"
8480

8581
//
8682
// Stage 2
8783
//
8884
#include "westmere/stringparsing.h"
8985
#include "westmere/numberparsing.h"
90-
#include "generic/stage2/logger.h"
91-
#include "generic/stage2/atomparsing.h"
92-
#include "generic/stage2/structural_iterator.h"
9386
#include "generic/stage2/structural_parser.h"
9487

9588
//
@@ -117,8 +110,6 @@ WARN_UNUSED error_code dom_parser_implementation::stage1(const uint8_t *_buf, si
117110
return westmere::stage1::json_structural_indexer::index<64>(_buf, _len, *this, streaming);
118111
}
119112

120-
#include "generic/stage1/utf8_validator.h"
121-
122113
WARN_UNUSED bool implementation::validate_utf8(const char *buf, size_t len) const noexcept {
123114
return simdjson::westmere::stage1::generic_validate_utf8(buf,len);
124115
}

0 commit comments

Comments
 (0)