Merge pull request #729 from simdjson/jkeiser/cmake-amalgamate

Add amalgamation support to cmake
This commit is contained in:
John Keiser 2020-04-22 14:16:10 -07:00 committed by GitHub
commit a116e68a47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 334 additions and 272 deletions

View File

@ -1,7 +1,7 @@
* *
!.git !.git
!Makefile !Makefile
!amalgamation.sh !amalgamate.sh
!benchmark !benchmark
!dependencies !dependencies
!include !include

View File

@ -47,7 +47,7 @@ platform:
steps: steps:
- name: build - name: build
image: gcc:8 image: gcc:8
commands: [ make, make amalgamate ] commands: [ make, make amalgamate_test ]
--- ---
kind: pipeline kind: pipeline
name: x64-slowtests name: x64-slowtests
@ -87,7 +87,7 @@ steps:
image: gcc:8 image: gcc:8
environment: environment:
EXTRA_FLAGS: -fno-exceptions EXTRA_FLAGS: -fno-exceptions
commands: [ make, make amalgamate ] commands: [ make, make amalgamate_test ]
--- ---
kind: pipeline kind: pipeline
name: x64-noexceptions-slowtests name: x64-noexceptions-slowtests
@ -139,7 +139,7 @@ platform:
steps: steps:
- name: build - name: build
image: gcc:8 image: gcc:8
commands: [ make, make amalgamate ] commands: [ make, make amalgamate_test ]
--- ---
kind: pipeline kind: pipeline
name: arm64-slowtests name: arm64-slowtests

5
.gitignore vendored
View File

@ -133,6 +133,11 @@ objs
/tests/allparserscheckfile /tests/allparserscheckfile
/tests/basictests /tests/basictests
/tests/checkimplementation /tests/checkimplementation
/tests/compilation_failure_tests/dangling_parser_load_should_compile
/tests/compilation_failure_tests/dangling_parser_parse_padstring_should_compile
/tests/compilation_failure_tests/dangling_parser_parse_stdstring_should_compile
/tests/compilation_failure_tests/dangling_parser_parse_uchar_should_compile
/tests/compilation_failure_tests/dangling_parser_parse_uint8_should_compile
/tests/compilation_failure_tests/example_compiletest_should_compile /tests/compilation_failure_tests/example_compiletest_should_compile
/tests/errortests /tests/errortests
/tests/extracting_values_example /tests/extracting_values_example

View File

@ -138,6 +138,15 @@ if (NOT MSVC)
add_custom_target(simdjson-user-cmakecache ALL DEPENDS ${SIMDJSON_USER_CMAKECACHE}) add_custom_target(simdjson-user-cmakecache ALL DEPENDS ${SIMDJSON_USER_CMAKECACHE})
endif() endif()
#
# Set up test data
#
enable_testing()
add_subdirectory(jsonchecker)
add_subdirectory(jsonexamples)
add_library(test-data INTERFACE)
target_link_libraries(test-data INTERFACE jsonchecker-data jsonexamples-data)
# #
# Create the top level simdjson library (must be done at this level to use both src/ and include/ # Create the top level simdjson library (must be done at this level to use both src/ and include/
# directories) and tools # directories) and tools
@ -146,16 +155,11 @@ add_subdirectory(include)
add_subdirectory(src) add_subdirectory(src)
add_subdirectory(windows) add_subdirectory(windows)
add_subdirectory(tools) add_subdirectory(tools)
add_subdirectory(singleheader)
# #
# Compile tools / tests / benchmarks # Compile tools / tests / benchmarks
# #
enable_testing()
add_library(test-data INTERFACE)
target_compile_definitions(test-data INTERFACE SIMDJSON_TEST_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/jsonchecker/")
target_compile_definitions(test-data INTERFACE SIMDJSON_BENCHMARK_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/jsonexamples/")
set(EXAMPLE_JSON ${CMAKE_CURRENT_SOURCE_DIR}/jsonexamples/twitter.json)
add_subdirectory(dependencies) add_subdirectory(dependencies)
add_subdirectory(tests) add_subdirectory(tests)

View File

@ -37,7 +37,7 @@ Other important files and directories:
* **.drone.yml:** Definitions for Drone CI. * **.drone.yml:** Definitions for Drone CI.
* **.appveyor.yml:** Definitions for Appveyor CI (Windows). * **.appveyor.yml:** Definitions for Appveyor CI (Windows).
* **.circleci:** Definitions for Circle CI. * **.circleci:** Definitions for Circle CI.
* **amalgamation.sh:** Generates singleheader/simdjson.h and singleheader/simdjson.cpp for release. * **amalgamate.sh:** Generates singleheader/simdjson.h and singleheader/simdjson.cpp for release.
* **benchmark:** This is where we do benchmarking. Benchmarking is core to every change we make; the * **benchmark:** This is where we do benchmarking. Benchmarking is core to every change we make; the
cardinal rule is don't regress performance without knowing exactly why, and what you're trading cardinal rule is don't regress performance without knowing exactly why, and what you're trading
for it. If you're not sure what else to do to check your performance, this is always a good start: for it. If you're not sure what else to do to check your performance, this is always a good start:
@ -73,7 +73,7 @@ you can regenerate them by running this at the top level:
make amalgamate make amalgamate
``` ```
The amalgamator is at `amalgamation.sh` at the top level. It generates singleheader/simdjson.h by The amalgamator is at `amalgamate.sh` at the top level. It generates singleheader/simdjson.h by
reading through include/simdjson.h, copy/pasting each header file into the amalgamated file at the reading through include/simdjson.h, copy/pasting each header file into the amalgamated file at the
point it gets included (but only once per header). singleheader/simdjson.cpp is generated from point it gets included (but only once per header). singleheader/simdjson.cpp is generated from
src/simdjson.cpp the same way, except files under generic/ may be included and copy/pasted multiple src/simdjson.cpp the same way, except files under generic/ may be included and copy/pasted multiple

View File

@ -178,13 +178,16 @@ quicktests: run_basictests run_quickstart readme_examples readme_examples_noexce
slowtests: run_testjson2json_sh run_issue150_sh slowtests: run_testjson2json_sh run_issue150_sh
amalgamate: amalgamate:
./amalgamation.sh singleheader/amalgamate.sh
singleheader/simdjson.h singleheader/simdjson.cpp singleheader/amalgamation_demo.cpp: amalgamation.sh src/simdjson.cpp $(SRCHEADERS) $(INCLUDEHEADERS) singleheader/simdjson.h singleheader/simdjson.cpp singleheader/amalgamate_demo.cpp: singleheader/amalgamate.sh src/simdjson.cpp $(SRCHEADERS) $(INCLUDEHEADERS)
./amalgamation.sh singleheader/amalgamate.sh
singleheader/demo: singleheader/simdjson.h singleheader/simdjson.cpp singleheader/amalgamation_demo.cpp singleheader/demo: singleheader/simdjson.h singleheader/simdjson.cpp singleheader/amalgamate_demo.cpp
$(CXX) $(CXXFLAGS) -o singleheader/demo singleheader/amalgamation_demo.cpp -Isingleheader $(CXX) $(CXXFLAGS) -o singleheader/demo singleheader/amalgamate_demo.cpp -Isingleheader
amalgamate_test: singleheader/demo jsonexamples/twitter.json jsonexamples/amazon_cellphones.ndjson
singleheader/demo jsonexamples/twitter.json jsonexamples/amazon_cellphones.ndjson
submodules: submodules:
-git submodule update --init --recursive -git submodule update --init --recursive

View File

@ -0,0 +1,3 @@
set(SIMDJSON_TEST_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE)
add_library(jsonchecker-data INTERFACE)
target_compile_definitions(jsonchecker-data INTERFACE SIMDJSON_TEST_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/")

View File

@ -0,0 +1,5 @@
set(SIMDJSON_BENCHMARK_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE)
set(EXAMPLE_JSON ${CMAKE_CURRENT_SOURCE_DIR}/twitter.json PARENT_SCOPE)
set(EXAMPLE_NDJSON ${CMAKE_CURRENT_SOURCE_DIR}/amazon_cellphones.ndjson PARENT_SCOPE)
add_library(jsonexamples-data INTERFACE)
target_compile_definitions(jsonexamples-data INTERFACE SIMDJSON_BENCHMARK_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/")

View File

@ -0,0 +1,21 @@
#
# Amalgamation
#
if (NOT MSVC)
set(SINGLEHEADER_FILES simdjson.h simdjson.cpp amalgamate_demo.cpp README.md)
add_custom_command(
OUTPUT ${SINGLEHEADER_FILES}
COMMAND ${CMAKE_COMMAND} -E env
AMALGAMATE_SOURCE_PATH=${PROJECT_SOURCE_DIR}/src
AMALGAMATE_INPUT_PATH=${PROJECT_SOURCE_DIR}/include
AMALGAMATE_OUTPUT_PATH=${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/amalgamate.sh
DEPENDS simdjson-source amalgamate.sh
)
add_custom_target(amalgamate DEPENDS ${SINGLEHEADER_FILES})
add_executable(amalgamate_demo amalgamate_demo.cpp)
target_link_libraries(amalgamate_demo simdjson-include-source)
add_test(amalgamate_demo amalgamate_demo ${EXAMPLE_JSON} ${EXAMPLE_NDJSON})
endif()

View File

@ -1 +1,2 @@
c++ -O3 -std=c++17 -pthread -o amalgamation_demo amalgamation_demo.cpp && ./amalgamation_demo ../jsonexamples/twitter.json ../jsonexamples/amazon_cellphones.ndjson Try :
c++ -O3 -std=c++17 -pthread -o amalgamate_demo amalgamate_demo.cpp && ./amalgamate_demo ../jsonexamples/twitter.json ../jsonexamples/amazon_cellphones.ndjson

View File

@ -3,16 +3,16 @@
# Generates an "amalgamation build" for roaring. Inspired by similar # Generates an "amalgamation build" for roaring. Inspired by similar
# script used by whefs. # script used by whefs.
######################################################################## ########################################################################
set -e
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
echo "We are about to amalgamate all simdjson files into one source file. " echo "We are about to amalgamate all simdjson files into one source file. "
echo "See https://www.sqlite.org/amalgamation.html and https://en.wikipedia.org/wiki/Single_Compilation_Unit for rationale. " echo "See https://www.sqlite.org/amalgamation.html and https://en.wikipedia.org/wiki/Single_Compilation_Unit for rationale. "
AMAL_H="simdjson.h" if [ -z "$AMALGAMATE_SOURCE_PATH" ]; then AMALGAMATE_SOURCE_PATH="$SCRIPTPATH/../src"; fi
AMAL_C="simdjson.cpp" if [ -z "$AMALGAMATE_INCLUDE_PATH" ]; then AMALGAMATE_INCLUDE_PATH="$SCRIPTPATH/../include"; fi
if [ -z "$AMALGAMATE_OUTPUT_PATH" ]; then AMALGAMATE_OUTPUT_PATH="$SCRIPTPATH"; fi
SRCPATH="$SCRIPTPATH/src"
INCLUDEPATH="$SCRIPTPATH/include"
# this list excludes the "src/generic headers" # this list excludes the "src/generic headers"
ALLCFILES=" ALLCFILES="
@ -27,14 +27,14 @@ simdjson.h
found_includes=() found_includes=()
for file in ${ALLCFILES}; do for file in ${ALLCFILES}; do
test -e "$SRCPATH/$file" && continue test -e "$AMALGAMATE_SOURCE_PATH/$file" && continue
echo "FATAL: source file [$SRCPATH/$file] not found." echo "FATAL: source file [$AMALGAMATE_SOURCE_PATH/$file] not found."
exit 127 exit 127
done done
for file in ${ALLCHEADERS}; do for file in ${ALLCHEADERS}; do
test -e "$INCLUDEPATH/$file" && continue test -e "$AMALGAMATE_INCLUDE_PATH/$file" && continue
echo "FATAL: source file [$INCLUDEPATH/$file] not found." echo "FATAL: source file [$AMALGAMATE_INCLUDE_PATH/$file] not found."
exit 127 exit 127
done done
@ -42,18 +42,18 @@ function doinclude()
{ {
file=$1 file=$1
line="${@:2}" line="${@:2}"
if [ -f $INCLUDEPATH/$file ]; then if [ -f $AMALGAMATE_INCLUDE_PATH/$file ]; then
if [[ ! " ${found_includes[@]} " =~ " ${file} " ]]; then if [[ ! " ${found_includes[@]} " =~ " ${file} " ]]; then
found_includes+=("$file") found_includes+=("$file")
dofile $INCLUDEPATH/$file dofile $AMALGAMATE_INCLUDE_PATH $file
fi; fi;
elif [ -f $SRCPATH/$file ]; then elif [ -f $AMALGAMATE_SOURCE_PATH/$file ]; then
# generic includes are included multiple times # generic includes are included multiple times
if [[ "${file}" == *'generic/'*'.h' ]]; then if [[ "${file}" == *'generic/'*'.h' ]]; then
dofile $SRCPATH/$file dofile $AMALGAMATE_SOURCE_PATH $file
elif [[ ! " ${found_includes[@]} " =~ " ${file} " ]]; then elif [[ ! " ${found_includes[@]} " =~ " ${file} " ]]; then
found_includes+=("$file") found_includes+=("$file")
dofile $SRCPATH/$file dofile $AMALGAMATE_SOURCE_PATH $file
else else
echo "/* $file already included: $line */" echo "/* $file already included: $line */"
fi fi
@ -65,9 +65,9 @@ function doinclude()
function dofile() function dofile()
{ {
file="$1/$2"
# Last lines are always ignored. Files should end by an empty lines. # Last lines are always ignored. Files should end by an empty lines.
RELFILE=${1#"$SCRIPTPATH/"} echo "/* begin file ${2} */"
echo "/* begin file $RELFILE */"
# echo "#line 8 \"$1\"" ## redefining the line/file is not nearly as useful as it sounds for debugging. It breaks IDEs. # echo "#line 8 \"$1\"" ## redefining the line/file is not nearly as useful as it sounds for debugging. It breaks IDEs.
while IFS= read -r line || [ -n "$line" ]; while IFS= read -r line || [ -n "$line" ];
do do
@ -84,23 +84,31 @@ function dofile()
# Otherwise we simply copy the line # Otherwise we simply copy the line
echo "$line" echo "$line"
fi fi
done < "$1" done < "$file"
echo "/* end file $RELFILE */" echo "/* end file $RELFILE */"
} }
timestamp=$(date) timestamp=$(date)
mkdir -p $AMALGAMATE_OUTPUT_PATH
AMAL_H="${AMALGAMATE_OUTPUT_PATH}/simdjson.h"
AMAL_C="${AMALGAMATE_OUTPUT_PATH}/simdjson.cpp"
DEMOCPP="${AMALGAMATE_OUTPUT_PATH}/amalgamate_demo.cpp"
README="$AMALGAMATE_OUTPUT_PATH/README.md"
echo "Creating ${AMAL_H}..." echo "Creating ${AMAL_H}..."
echo "/* auto-generated on ${timestamp}. Do not edit! */" > "${AMAL_H}" echo "/* auto-generated on ${timestamp}. Do not edit! */" > ${AMAL_H}
{ {
for h in ${ALLCHEADERS}; do for h in ${ALLCHEADERS}; do
doinclude $h "ERROR $h not found" doinclude $h "ERROR $h not found"
done done
} >> "${AMAL_H}" } >> ${AMAL_H}
echo "Creating ${AMAL_C}..." echo "Creating ${AMAL_C}..."
echo "/* auto-generated on ${timestamp}. Do not edit! */" > "${AMAL_C}" echo "/* auto-generated on ${timestamp}. Do not edit! */" > ${AMAL_C}
{ {
echo "#include \"${AMAL_H}\"" echo "#include \"simdjson.h\""
echo "" echo ""
echo "/* used for http://dmalloc.com/ Dmalloc - Debug Malloc Library */" echo "/* used for http://dmalloc.com/ Dmalloc - Debug Malloc Library */"
@ -110,14 +118,13 @@ echo "/* auto-generated on ${timestamp}. Do not edit! */" > "${AMAL_C}"
echo "" echo ""
for file in ${ALLCFILES}; do for file in ${ALLCFILES}; do
dofile "$SRCPATH/$file" dofile $AMALGAMATE_SOURCE_PATH $file
done done
} >> "${AMAL_C}" } >> ${AMAL_C}
DEMOCPP="amalgamation_demo.cpp"
echo "Creating ${DEMOCPP}..." echo "Creating ${DEMOCPP}..."
echo "/* auto-generated on ${timestamp}. Do not edit! */" > "${DEMOCPP}" echo "/* auto-generated on ${timestamp}. Do not edit! */" > ${DEMOCPP}
cat <<< ' cat <<< '
#include <iostream> #include <iostream>
#include "simdjson.h" #include "simdjson.h"
@ -128,11 +135,14 @@ int main(int argc, char *argv[]) {
} }
const char * filename = argv[1]; const char * filename = argv[1];
simdjson::dom::parser parser; simdjson::dom::parser parser;
auto [doc, error] = parser.load(filename); // do the parsing simdjson::error_code error;
UNUSED simdjson::dom::element elem;
parser.load(filename).tie(elem, error); // do the parsing
if (error) { if (error) {
std::cout << "parse failed" << std::endl; std::cout << "parse failed" << std::endl;
std::cout << "error code: " << error << std::endl; std::cout << "error code: " << error << std::endl;
std::cout << error << std::endl; std::cout << error << std::endl;
return EXIT_FAILURE;
} else { } else {
std::cout << "parse valid" << std::endl; std::cout << "parse valid" << std::endl;
} }
@ -149,34 +159,31 @@ int main(int argc, char *argv[]) {
std::cout << "parse_many failed" << std::endl; std::cout << "parse_many failed" << std::endl;
std::cout << "error code: " << error << std::endl; std::cout << "error code: " << error << std::endl;
std::cout << error << std::endl; std::cout << error << std::endl;
return EXIT_FAILURE;
} else { } else {
std::cout << "parse_many valid" << std::endl; std::cout << "parse_many valid" << std::endl;
} }
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
' >> "${DEMOCPP}" ' >> ${DEMOCPP}
echo "Done with all files generation. " CPPBIN=$(basename ${DEMOCPP} .cpp)
echo "Files have been written to directory: $PWD " echo "Try :" > ${README}
ls -la ${AMAL_C} ${AMAL_H} ${DEMOCPP} echo "c++ -O3 -std=c++17 -pthread -o ${CPPBIN} ${DEMOCPP##*/} && ./${CPPBIN##*/} ../jsonexamples/twitter.json ../jsonexamples/amazon_cellphones.ndjson" >> ${README}
echo "Done with all files generation."
echo "Files have been written to directory: ${AMALGAMATE_OUTPUT_PATH}/"
ls -la ${AMAL_C} ${AMAL_H} ${DEMOCPP} ${README}
#
# Instructions to create demo
#
echo ""
echo "Giving final instructions:" echo "Giving final instructions:"
cat ${README}
CPPBIN=${DEMOCPP%%.*}
echo "Try :"
echo "c++ -O3 -std=c++17 -pthread -o ${CPPBIN} ${DEMOCPP} && ./${CPPBIN} ../jsonexamples/twitter.json ../jsonexamples/amazon_cellphones.ndjson"
SINGLEHDR=$SCRIPTPATH/singleheader
echo "Copying files to $SCRIPTPATH/singleheader "
mkdir -p $SINGLEHDR
echo "c++ -O3 -std=c++17 -pthread -o ${CPPBIN} ${DEMOCPP} && ./${CPPBIN} ../jsonexamples/twitter.json ../jsonexamples/amazon_cellphones.ndjson" > $SINGLEHDR/README.md
cp ${AMAL_C} ${AMAL_H} ${DEMOCPP} $SINGLEHDR
ls $SINGLEHDR
cd $SINGLEHDR && c++ -O3 -std=c++17 -pthread -o ${CPPBIN} ${DEMOCPP} && ./${CPPBIN} ../jsonexamples/twitter.json ../jsonexamples/amazon_cellphones.ndjson
lowercase(){ lowercase(){
echo "$1" | tr 'A-Z' 'a-z' echo "$1" | tr 'A-Z' 'a-z'

View File

@ -1,4 +1,4 @@
/* auto-generated on Sun Apr 19 11:36:20 PDT 2020. Do not edit! */ /* auto-generated on Mon Apr 20 11:05:12 PDT 2020. Do not edit! */
#include <iostream> #include <iostream>
#include "simdjson.h" #include "simdjson.h"
@ -9,11 +9,14 @@ int main(int argc, char *argv[]) {
} }
const char * filename = argv[1]; const char * filename = argv[1];
simdjson::dom::parser parser; simdjson::dom::parser parser;
auto [doc, error] = parser.load(filename); // do the parsing simdjson::error_code error;
UNUSED simdjson::dom::element elem;
parser.load(filename).tie(elem, error); // do the parsing
if (error) { if (error) {
std::cout << "parse failed" << std::endl; std::cout << "parse failed" << std::endl;
std::cout << "error code: " << error << std::endl; std::cout << "error code: " << error << std::endl;
std::cout << error << std::endl; std::cout << error << std::endl;
return EXIT_FAILURE;
} else { } else {
std::cout << "parse valid" << std::endl; std::cout << "parse valid" << std::endl;
} }
@ -30,6 +33,7 @@ int main(int argc, char *argv[]) {
std::cout << "parse_many failed" << std::endl; std::cout << "parse_many failed" << std::endl;
std::cout << "error code: " << error << std::endl; std::cout << "error code: " << error << std::endl;
std::cout << error << std::endl; std::cout << error << std::endl;
return EXIT_FAILURE;
} else { } else {
std::cout << "parse_many valid" << std::endl; std::cout << "parse_many valid" << std::endl;
} }

View File

@ -1,4 +1,4 @@
/* auto-generated on Sun Apr 19 11:36:20 PDT 2020. Do not edit! */ /* auto-generated on Mon Apr 20 11:05:12 PDT 2020. Do not edit! */
#include "simdjson.h" #include "simdjson.h"
/* used for http://dmalloc.com/ Dmalloc - Debug Malloc Library */ /* used for http://dmalloc.com/ Dmalloc - Debug Malloc Library */
@ -6,8 +6,8 @@
#include "dmalloc.h" #include "dmalloc.h"
#endif #endif
/* begin file src/simdjson.cpp */ /* begin file simdjson.cpp */
/* begin file src/error.cpp */ /* begin file error.cpp */
namespace simdjson { namespace simdjson {
namespace internal { namespace internal {
@ -42,9 +42,9 @@ namespace internal {
} // namespace internal } // namespace internal
} // namespace simdjson } // namespace simdjson
/* end file src/error.cpp */ /* end file */
/* begin file src/implementation.cpp */ /* begin file implementation.cpp */
/* begin file src/isadetection.h */ /* begin file isadetection.h */
/* From /* From
https://github.com/endorno/pytorch/blob/master/torch/lib/TH/generic/simd/simd.h https://github.com/endorno/pytorch/blob/master/torch/lib/TH/generic/simd/simd.h
Highly modified. Highly modified.
@ -198,8 +198,8 @@ static inline uint32_t detect_supported_architectures() {
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_ISADETECTION_H #endif // SIMDJSON_ISADETECTION_H
/* end file src/isadetection.h */ /* end file */
/* begin file src/simdprune_tables.h */ /* begin file simdprune_tables.h */
#ifndef SIMDJSON_SIMDPRUNE_TABLES_H #ifndef SIMDJSON_SIMDPRUNE_TABLES_H
#define SIMDJSON_SIMDPRUNE_TABLES_H #define SIMDJSON_SIMDPRUNE_TABLES_H
#include <cstdint> #include <cstdint>
@ -330,7 +330,7 @@ static const uint64_t thintable_epi8[256] = {
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_SIMDPRUNE_TABLES_H #endif // SIMDJSON_SIMDPRUNE_TABLES_H
/* end file src/simdprune_tables.h */ /* end file */
#include <initializer_list> #include <initializer_list>
@ -338,7 +338,7 @@ static const uint64_t thintable_epi8[256] = {
// without requiring a static initializer. // without requiring a static initializer.
#if SIMDJSON_IMPLEMENTATION_HASWELL #if SIMDJSON_IMPLEMENTATION_HASWELL
/* begin file src/haswell/implementation.h */ /* begin file haswell/implementation.h */
#ifndef SIMDJSON_HASWELL_IMPLEMENTATION_H #ifndef SIMDJSON_HASWELL_IMPLEMENTATION_H
#define SIMDJSON_HASWELL_IMPLEMENTATION_H #define SIMDJSON_HASWELL_IMPLEMENTATION_H
@ -367,12 +367,12 @@ public:
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_HASWELL_IMPLEMENTATION_H #endif // SIMDJSON_HASWELL_IMPLEMENTATION_H
/* end file src/haswell/implementation.h */ /* end file */
namespace simdjson { namespace internal { const haswell::implementation haswell_singleton{}; } } namespace simdjson { namespace internal { const haswell::implementation haswell_singleton{}; } }
#endif // SIMDJSON_IMPLEMENTATION_HASWELL #endif // SIMDJSON_IMPLEMENTATION_HASWELL
#if SIMDJSON_IMPLEMENTATION_WESTMERE #if SIMDJSON_IMPLEMENTATION_WESTMERE
/* begin file src/westmere/implementation.h */ /* begin file westmere/implementation.h */
#ifndef SIMDJSON_WESTMERE_IMPLEMENTATION_H #ifndef SIMDJSON_WESTMERE_IMPLEMENTATION_H
#define SIMDJSON_WESTMERE_IMPLEMENTATION_H #define SIMDJSON_WESTMERE_IMPLEMENTATION_H
@ -397,12 +397,12 @@ public:
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_WESTMERE_IMPLEMENTATION_H #endif // SIMDJSON_WESTMERE_IMPLEMENTATION_H
/* end file src/westmere/implementation.h */ /* end file */
namespace simdjson { namespace internal { const westmere::implementation westmere_singleton{}; } } namespace simdjson { namespace internal { const westmere::implementation westmere_singleton{}; } }
#endif // SIMDJSON_IMPLEMENTATION_WESTMERE #endif // SIMDJSON_IMPLEMENTATION_WESTMERE
#if SIMDJSON_IMPLEMENTATION_ARM64 #if SIMDJSON_IMPLEMENTATION_ARM64
/* begin file src/arm64/implementation.h */ /* begin file arm64/implementation.h */
#ifndef SIMDJSON_ARM64_IMPLEMENTATION_H #ifndef SIMDJSON_ARM64_IMPLEMENTATION_H
#define SIMDJSON_ARM64_IMPLEMENTATION_H #define SIMDJSON_ARM64_IMPLEMENTATION_H
@ -427,12 +427,12 @@ public:
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_ARM64_IMPLEMENTATION_H #endif // SIMDJSON_ARM64_IMPLEMENTATION_H
/* end file src/arm64/implementation.h */ /* end file */
namespace simdjson { namespace internal { const arm64::implementation arm64_singleton{}; } } namespace simdjson { namespace internal { const arm64::implementation arm64_singleton{}; } }
#endif // SIMDJSON_IMPLEMENTATION_ARM64 #endif // SIMDJSON_IMPLEMENTATION_ARM64
#if SIMDJSON_IMPLEMENTATION_FALLBACK #if SIMDJSON_IMPLEMENTATION_FALLBACK
/* begin file src/fallback/implementation.h */ /* begin file fallback/implementation.h */
#ifndef SIMDJSON_FALLBACK_IMPLEMENTATION_H #ifndef SIMDJSON_FALLBACK_IMPLEMENTATION_H
#define SIMDJSON_FALLBACK_IMPLEMENTATION_H #define SIMDJSON_FALLBACK_IMPLEMENTATION_H
@ -462,7 +462,7 @@ public:
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_FALLBACK_IMPLEMENTATION_H #endif // SIMDJSON_FALLBACK_IMPLEMENTATION_H
/* end file src/fallback/implementation.h */ /* end file */
namespace simdjson { namespace internal { const fallback::implementation fallback_singleton{}; } } namespace simdjson { namespace internal { const fallback::implementation fallback_singleton{}; } }
#endif // SIMDJSON_IMPLEMENTATION_FALLBACK #endif // SIMDJSON_IMPLEMENTATION_FALLBACK
@ -561,6 +561,15 @@ const implementation *available_implementation_list::detect_best_supported() con
} }
const implementation *detect_best_supported_implementation_on_first_use::set_best() const noexcept { const implementation *detect_best_supported_implementation_on_first_use::set_best() const noexcept {
char *force_implementation_name = getenv("SIMDJSON_FORCE_IMPLEMENTATION");
if (force_implementation_name) {
auto force_implementation = available_implementations[force_implementation_name];
if (!force_implementation) {
fprintf(stderr, "SIMDJSON_FORCE_IMPLEMENTATION environment variable set to '%s', which is not a supported implementation name!\n", force_implementation_name);
abort();
}
return active_implementation = force_implementation;
}
return active_implementation = available_implementations.detect_best_supported(); return active_implementation = available_implementations.detect_best_supported();
} }
@ -570,19 +579,19 @@ SIMDJSON_DLLIMPORTEXPORT const internal::available_implementation_list available
SIMDJSON_DLLIMPORTEXPORT internal::atomic_ptr<const implementation> active_implementation{&internal::detect_best_supported_implementation_on_first_use_singleton}; SIMDJSON_DLLIMPORTEXPORT internal::atomic_ptr<const implementation> active_implementation{&internal::detect_best_supported_implementation_on_first_use_singleton};
} // namespace simdjson } // namespace simdjson
/* end file src/fallback/implementation.h */ /* end file */
/* begin file src/stage1_find_marks.cpp */ /* begin file stage1_find_marks.cpp */
#if SIMDJSON_IMPLEMENTATION_ARM64 #if SIMDJSON_IMPLEMENTATION_ARM64
/* begin file src/arm64/stage1_find_marks.h */ /* begin file arm64/stage1_find_marks.h */
#ifndef SIMDJSON_ARM64_STAGE1_FIND_MARKS_H #ifndef SIMDJSON_ARM64_STAGE1_FIND_MARKS_H
#define SIMDJSON_ARM64_STAGE1_FIND_MARKS_H #define SIMDJSON_ARM64_STAGE1_FIND_MARKS_H
/* begin file src/arm64/bitmask.h */ /* begin file arm64/bitmask.h */
#ifndef SIMDJSON_ARM64_BITMASK_H #ifndef SIMDJSON_ARM64_BITMASK_H
#define SIMDJSON_ARM64_BITMASK_H #define SIMDJSON_ARM64_BITMASK_H
/* begin file src/arm64/intrinsics.h */ /* begin file arm64/intrinsics.h */
#ifndef SIMDJSON_ARM64_INTRINSICS_H #ifndef SIMDJSON_ARM64_INTRINSICS_H
#define SIMDJSON_ARM64_INTRINSICS_H #define SIMDJSON_ARM64_INTRINSICS_H
@ -592,7 +601,7 @@ SIMDJSON_DLLIMPORTEXPORT internal::atomic_ptr<const implementation> active_imple
#include <arm_neon.h> #include <arm_neon.h>
#endif // SIMDJSON_ARM64_INTRINSICS_H #endif // SIMDJSON_ARM64_INTRINSICS_H
/* end file src/arm64/intrinsics.h */ /* end file */
namespace simdjson { namespace simdjson {
namespace arm64 { namespace arm64 {
@ -630,13 +639,13 @@ really_inline uint64_t prefix_xor(uint64_t bitmask) {
UNTARGET_REGION UNTARGET_REGION
#endif #endif
/* end file src/arm64/intrinsics.h */ /* end file */
/* begin file src/arm64/simd.h */ /* begin file arm64/simd.h */
#ifndef SIMDJSON_ARM64_SIMD_H #ifndef SIMDJSON_ARM64_SIMD_H
#define SIMDJSON_ARM64_SIMD_H #define SIMDJSON_ARM64_SIMD_H
/* simdprune_tables.h already included: #include "simdprune_tables.h" */ /* simdprune_tables.h already included: #include "simdprune_tables.h" */
/* begin file src/arm64/bitmanipulation.h */ /* begin file arm64/bitmanipulation.h */
#ifndef SIMDJSON_ARM64_BITMANIPULATION_H #ifndef SIMDJSON_ARM64_BITMANIPULATION_H
#define SIMDJSON_ARM64_BITMANIPULATION_H #define SIMDJSON_ARM64_BITMANIPULATION_H
@ -710,7 +719,7 @@ really_inline bool mul_overflow(uint64_t value1, uint64_t value2, uint64_t *resu
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_ARM64_BITMANIPULATION_H #endif // SIMDJSON_ARM64_BITMANIPULATION_H
/* end file src/arm64/bitmanipulation.h */ /* end file */
/* arm64/intrinsics.h already included: #include "arm64/intrinsics.h" */ /* arm64/intrinsics.h already included: #include "arm64/intrinsics.h" */
namespace simdjson { namespace simdjson {
@ -1101,7 +1110,7 @@ namespace simd {
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_ARM64_SIMD_H #endif // SIMDJSON_ARM64_SIMD_H
/* end file src/arm64/bitmanipulation.h */ /* end file */
/* arm64/bitmanipulation.h already included: #include "arm64/bitmanipulation.h" */ /* arm64/bitmanipulation.h already included: #include "arm64/bitmanipulation.h" */
/* arm64/implementation.h already included: #include "arm64/implementation.h" */ /* arm64/implementation.h already included: #include "arm64/implementation.h" */
@ -1169,7 +1178,7 @@ really_inline simd8<bool> must_be_continuation(simd8<uint8_t> prev1, simd8<uint8
return is_second_byte ^ is_third_byte ^ is_fourth_byte; return is_second_byte ^ is_third_byte ^ is_fourth_byte;
} }
/* begin file src/generic/buf_block_reader.h */ /* begin file generic/buf_block_reader.h */
// Walks through a buffer in block-sized increments, loading the last part with spaces // Walks through a buffer in block-sized increments, loading the last part with spaces
template<size_t STEP_SIZE> template<size_t STEP_SIZE>
struct buf_block_reader { struct buf_block_reader {
@ -1218,8 +1227,8 @@ UNUSED static char * format_mask(uint64_t mask) {
buf[64] = '\0'; buf[64] = '\0';
return buf; return buf;
} }
/* end file src/generic/buf_block_reader.h */ /* end file */
/* begin file src/generic/json_string_scanner.h */ /* begin file generic/json_string_scanner.h */
namespace stage1 { namespace stage1 {
struct json_string_block { struct json_string_block {
@ -1347,8 +1356,8 @@ really_inline error_code json_string_scanner::finish(bool streaming) {
} }
} // namespace stage1 } // namespace stage1
/* end file src/generic/json_string_scanner.h */ /* end file */
/* begin file src/generic/json_scanner.h */ /* begin file generic/json_scanner.h */
namespace stage1 { namespace stage1 {
/** /**
@ -1452,9 +1461,9 @@ really_inline error_code json_scanner::finish(bool streaming) {
} }
} // namespace stage1 } // namespace stage1
/* end file src/generic/json_scanner.h */ /* end file */
/* begin file src/generic/json_minifier.h */ /* begin file generic/json_minifier.h */
// This file contains the common code every implementation uses in stage1 // This file contains the common code every implementation uses in stage1
// It is intended to be included multiple times and compiled multiple times // It is intended to be included multiple times and compiled multiple times
// We assume the file in which it is included already includes // We assume the file in which it is included already includes
@ -1528,12 +1537,12 @@ error_code json_minifier::minify(const uint8_t *buf, size_t len, uint8_t *dst, s
} }
} // namespace stage1 } // namespace stage1
/* end file src/generic/json_minifier.h */ /* end file */
WARN_UNUSED error_code implementation::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept { 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); return arm64::stage1::json_minifier::minify<64>(buf, len, dst, dst_len);
} }
/* begin file src/generic/utf8_lookup2_algorithm.h */ /* begin file generic/utf8_lookup2_algorithm.h */
// //
// Detect Unicode errors. // Detect Unicode errors.
// //
@ -1959,8 +1968,8 @@ namespace utf8_validation {
} }
using utf8_validation::utf8_checker; using utf8_validation::utf8_checker;
/* end file src/generic/utf8_lookup2_algorithm.h */ /* end file */
/* begin file src/generic/json_structural_indexer.h */ /* begin file generic/json_structural_indexer.h */
// This file contains the common code every implementation uses in stage1 // This file contains the common code every implementation uses in stage1
// It is intended to be included multiple times and compiled multiple times // It is intended to be included multiple times and compiled multiple times
// We assume the file in which it is included already includes // We assume the file in which it is included already includes
@ -2136,7 +2145,7 @@ error_code json_structural_indexer::index(const uint8_t *buf, size_t len, parser
} }
} // namespace stage1 } // namespace stage1
/* end file src/generic/json_structural_indexer.h */ /* end file */
WARN_UNUSED error_code implementation::stage1(const uint8_t *buf, size_t len, parser &parser, bool streaming) const noexcept { 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); return arm64::stage1::json_structural_indexer::index<64>(buf, len, parser, streaming);
} }
@ -2145,10 +2154,10 @@ WARN_UNUSED error_code implementation::stage1(const uint8_t *buf, size_t len, pa
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_ARM64_STAGE1_FIND_MARKS_H #endif // SIMDJSON_ARM64_STAGE1_FIND_MARKS_H
/* end file src/generic/json_structural_indexer.h */ /* end file */
#endif #endif
#if SIMDJSON_IMPLEMENTATION_FALLBACK #if SIMDJSON_IMPLEMENTATION_FALLBACK
/* begin file src/fallback/stage1_find_marks.h */ /* begin file fallback/stage1_find_marks.h */
#ifndef SIMDJSON_FALLBACK_STAGE1_FIND_MARKS_H #ifndef SIMDJSON_FALLBACK_STAGE1_FIND_MARKS_H
#define SIMDJSON_FALLBACK_STAGE1_FIND_MARKS_H #define SIMDJSON_FALLBACK_STAGE1_FIND_MARKS_H
@ -2362,20 +2371,20 @@ WARN_UNUSED error_code implementation::minify(const uint8_t *buf, size_t len, ui
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_FALLBACK_STAGE1_FIND_MARKS_H #endif // SIMDJSON_FALLBACK_STAGE1_FIND_MARKS_H
/* end file src/fallback/stage1_find_marks.h */ /* end file */
#endif #endif
#if SIMDJSON_IMPLEMENTATION_HASWELL #if SIMDJSON_IMPLEMENTATION_HASWELL
/* begin file src/haswell/stage1_find_marks.h */ /* begin file haswell/stage1_find_marks.h */
#ifndef SIMDJSON_HASWELL_STAGE1_FIND_MARKS_H #ifndef SIMDJSON_HASWELL_STAGE1_FIND_MARKS_H
#define SIMDJSON_HASWELL_STAGE1_FIND_MARKS_H #define SIMDJSON_HASWELL_STAGE1_FIND_MARKS_H
/* begin file src/haswell/bitmask.h */ /* begin file haswell/bitmask.h */
#ifndef SIMDJSON_HASWELL_BITMASK_H #ifndef SIMDJSON_HASWELL_BITMASK_H
#define SIMDJSON_HASWELL_BITMASK_H #define SIMDJSON_HASWELL_BITMASK_H
/* begin file src/haswell/intrinsics.h */ /* begin file haswell/intrinsics.h */
#ifndef SIMDJSON_HASWELL_INTRINSICS_H #ifndef SIMDJSON_HASWELL_INTRINSICS_H
#define SIMDJSON_HASWELL_INTRINSICS_H #define SIMDJSON_HASWELL_INTRINSICS_H
@ -2387,7 +2396,7 @@ WARN_UNUSED error_code implementation::minify(const uint8_t *buf, size_t len, ui
#endif // _MSC_VER #endif // _MSC_VER
#endif // SIMDJSON_HASWELL_INTRINSICS_H #endif // SIMDJSON_HASWELL_INTRINSICS_H
/* end file src/haswell/intrinsics.h */ /* end file */
TARGET_HASWELL TARGET_HASWELL
namespace simdjson { namespace simdjson {
@ -2412,13 +2421,13 @@ really_inline uint64_t prefix_xor(const uint64_t bitmask) {
UNTARGET_REGION UNTARGET_REGION
#endif // SIMDJSON_HASWELL_BITMASK_H #endif // SIMDJSON_HASWELL_BITMASK_H
/* end file src/haswell/intrinsics.h */ /* end file */
/* begin file src/haswell/simd.h */ /* begin file haswell/simd.h */
#ifndef SIMDJSON_HASWELL_SIMD_H #ifndef SIMDJSON_HASWELL_SIMD_H
#define SIMDJSON_HASWELL_SIMD_H #define SIMDJSON_HASWELL_SIMD_H
/* simdprune_tables.h already included: #include "simdprune_tables.h" */ /* simdprune_tables.h already included: #include "simdprune_tables.h" */
/* begin file src/haswell/bitmanipulation.h */ /* begin file haswell/bitmanipulation.h */
#ifndef SIMDJSON_HASWELL_BITMANIPULATION_H #ifndef SIMDJSON_HASWELL_BITMANIPULATION_H
#define SIMDJSON_HASWELL_BITMANIPULATION_H #define SIMDJSON_HASWELL_BITMANIPULATION_H
@ -2496,7 +2505,7 @@ really_inline bool mul_overflow(uint64_t value1, uint64_t value2,
UNTARGET_REGION UNTARGET_REGION
#endif // SIMDJSON_HASWELL_BITMANIPULATION_H #endif // SIMDJSON_HASWELL_BITMANIPULATION_H
/* end file src/haswell/bitmanipulation.h */ /* end file */
/* haswell/intrinsics.h already included: #include "haswell/intrinsics.h" */ /* haswell/intrinsics.h already included: #include "haswell/intrinsics.h" */
TARGET_HASWELL TARGET_HASWELL
@ -2868,7 +2877,7 @@ namespace simd {
UNTARGET_REGION UNTARGET_REGION
#endif // SIMDJSON_HASWELL_SIMD_H #endif // SIMDJSON_HASWELL_SIMD_H
/* end file src/haswell/bitmanipulation.h */ /* end file */
/* haswell/bitmanipulation.h already included: #include "haswell/bitmanipulation.h" */ /* haswell/bitmanipulation.h already included: #include "haswell/bitmanipulation.h" */
/* haswell/implementation.h already included: #include "haswell/implementation.h" */ /* haswell/implementation.h already included: #include "haswell/implementation.h" */
@ -2924,7 +2933,7 @@ really_inline simd8<bool> must_be_continuation(simd8<uint8_t> prev1, simd8<uint8
return simd8<int8_t>(is_second_byte | is_third_byte | is_fourth_byte) > int8_t(0); return simd8<int8_t>(is_second_byte | is_third_byte | is_fourth_byte) > int8_t(0);
} }
/* begin file src/generic/buf_block_reader.h */ /* begin file generic/buf_block_reader.h */
// Walks through a buffer in block-sized increments, loading the last part with spaces // Walks through a buffer in block-sized increments, loading the last part with spaces
template<size_t STEP_SIZE> template<size_t STEP_SIZE>
struct buf_block_reader { struct buf_block_reader {
@ -2973,8 +2982,8 @@ UNUSED static char * format_mask(uint64_t mask) {
buf[64] = '\0'; buf[64] = '\0';
return buf; return buf;
} }
/* end file src/generic/buf_block_reader.h */ /* end file */
/* begin file src/generic/json_string_scanner.h */ /* begin file generic/json_string_scanner.h */
namespace stage1 { namespace stage1 {
struct json_string_block { struct json_string_block {
@ -3102,8 +3111,8 @@ really_inline error_code json_string_scanner::finish(bool streaming) {
} }
} // namespace stage1 } // namespace stage1
/* end file src/generic/json_string_scanner.h */ /* end file */
/* begin file src/generic/json_scanner.h */ /* begin file generic/json_scanner.h */
namespace stage1 { namespace stage1 {
/** /**
@ -3207,9 +3216,9 @@ really_inline error_code json_scanner::finish(bool streaming) {
} }
} // namespace stage1 } // namespace stage1
/* end file src/generic/json_scanner.h */ /* end file */
/* begin file src/generic/json_minifier.h */ /* begin file generic/json_minifier.h */
// This file contains the common code every implementation uses in stage1 // This file contains the common code every implementation uses in stage1
// It is intended to be included multiple times and compiled multiple times // It is intended to be included multiple times and compiled multiple times
// We assume the file in which it is included already includes // We assume the file in which it is included already includes
@ -3283,12 +3292,12 @@ error_code json_minifier::minify(const uint8_t *buf, size_t len, uint8_t *dst, s
} }
} // namespace stage1 } // namespace stage1
/* end file src/generic/json_minifier.h */ /* end file */
WARN_UNUSED error_code implementation::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept { 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); return haswell::stage1::json_minifier::minify<128>(buf, len, dst, dst_len);
} }
/* begin file src/generic/utf8_lookup2_algorithm.h */ /* begin file generic/utf8_lookup2_algorithm.h */
// //
// Detect Unicode errors. // Detect Unicode errors.
// //
@ -3714,8 +3723,8 @@ namespace utf8_validation {
} }
using utf8_validation::utf8_checker; using utf8_validation::utf8_checker;
/* end file src/generic/utf8_lookup2_algorithm.h */ /* end file */
/* begin file src/generic/json_structural_indexer.h */ /* begin file generic/json_structural_indexer.h */
// This file contains the common code every implementation uses in stage1 // This file contains the common code every implementation uses in stage1
// It is intended to be included multiple times and compiled multiple times // It is intended to be included multiple times and compiled multiple times
// We assume the file in which it is included already includes // We assume the file in which it is included already includes
@ -3891,7 +3900,7 @@ error_code json_structural_indexer::index(const uint8_t *buf, size_t len, parser
} }
} // namespace stage1 } // namespace stage1
/* end file src/generic/json_structural_indexer.h */ /* end file */
WARN_UNUSED error_code implementation::stage1(const uint8_t *buf, size_t len, parser &parser, bool streaming) const noexcept { 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); return haswell::stage1::json_structural_indexer::index<128>(buf, len, parser, streaming);
} }
@ -3902,18 +3911,18 @@ WARN_UNUSED error_code implementation::stage1(const uint8_t *buf, size_t len, pa
UNTARGET_REGION UNTARGET_REGION
#endif // SIMDJSON_HASWELL_STAGE1_FIND_MARKS_H #endif // SIMDJSON_HASWELL_STAGE1_FIND_MARKS_H
/* end file src/generic/json_structural_indexer.h */ /* end file */
#endif #endif
#if SIMDJSON_IMPLEMENTATION_WESTMERE #if SIMDJSON_IMPLEMENTATION_WESTMERE
/* begin file src/westmere/stage1_find_marks.h */ /* begin file westmere/stage1_find_marks.h */
#ifndef SIMDJSON_WESTMERE_STAGE1_FIND_MARKS_H #ifndef SIMDJSON_WESTMERE_STAGE1_FIND_MARKS_H
#define SIMDJSON_WESTMERE_STAGE1_FIND_MARKS_H #define SIMDJSON_WESTMERE_STAGE1_FIND_MARKS_H
/* begin file src/westmere/bitmask.h */ /* begin file westmere/bitmask.h */
#ifndef SIMDJSON_WESTMERE_BITMASK_H #ifndef SIMDJSON_WESTMERE_BITMASK_H
#define SIMDJSON_WESTMERE_BITMASK_H #define SIMDJSON_WESTMERE_BITMASK_H
/* begin file src/westmere/intrinsics.h */ /* begin file westmere/intrinsics.h */
#ifndef SIMDJSON_WESTMERE_INTRINSICS_H #ifndef SIMDJSON_WESTMERE_INTRINSICS_H
#define SIMDJSON_WESTMERE_INTRINSICS_H #define SIMDJSON_WESTMERE_INTRINSICS_H
@ -3924,7 +3933,7 @@ UNTARGET_REGION
#endif // _MSC_VER #endif // _MSC_VER
#endif // SIMDJSON_WESTMERE_INTRINSICS_H #endif // SIMDJSON_WESTMERE_INTRINSICS_H
/* end file src/westmere/intrinsics.h */ /* end file */
TARGET_WESTMERE TARGET_WESTMERE
namespace simdjson { namespace simdjson {
@ -3949,13 +3958,13 @@ really_inline uint64_t prefix_xor(const uint64_t bitmask) {
UNTARGET_REGION UNTARGET_REGION
#endif // SIMDJSON_WESTMERE_BITMASK_H #endif // SIMDJSON_WESTMERE_BITMASK_H
/* end file src/westmere/intrinsics.h */ /* end file */
/* begin file src/westmere/simd.h */ /* begin file westmere/simd.h */
#ifndef SIMDJSON_WESTMERE_SIMD_H #ifndef SIMDJSON_WESTMERE_SIMD_H
#define SIMDJSON_WESTMERE_SIMD_H #define SIMDJSON_WESTMERE_SIMD_H
/* simdprune_tables.h already included: #include "simdprune_tables.h" */ /* simdprune_tables.h already included: #include "simdprune_tables.h" */
/* begin file src/westmere/bitmanipulation.h */ /* begin file westmere/bitmanipulation.h */
#ifndef SIMDJSON_WESTMERE_BITMANIPULATION_H #ifndef SIMDJSON_WESTMERE_BITMANIPULATION_H
#define SIMDJSON_WESTMERE_BITMANIPULATION_H #define SIMDJSON_WESTMERE_BITMANIPULATION_H
@ -4042,7 +4051,7 @@ really_inline bool mul_overflow(uint64_t value1, uint64_t value2,
UNTARGET_REGION UNTARGET_REGION
#endif // SIMDJSON_WESTMERE_BITMANIPULATION_H #endif // SIMDJSON_WESTMERE_BITMANIPULATION_H
/* end file src/westmere/bitmanipulation.h */ /* end file */
/* westmere/intrinsics.h already included: #include "westmere/intrinsics.h" */ /* westmere/intrinsics.h already included: #include "westmere/intrinsics.h" */
@ -4399,7 +4408,7 @@ namespace simd {
UNTARGET_REGION UNTARGET_REGION
#endif // SIMDJSON_WESTMERE_SIMD_INPUT_H #endif // SIMDJSON_WESTMERE_SIMD_INPUT_H
/* end file src/westmere/bitmanipulation.h */ /* end file */
/* westmere/bitmanipulation.h already included: #include "westmere/bitmanipulation.h" */ /* westmere/bitmanipulation.h already included: #include "westmere/bitmanipulation.h" */
/* westmere/implementation.h already included: #include "westmere/implementation.h" */ /* westmere/implementation.h already included: #include "westmere/implementation.h" */
@ -4455,7 +4464,7 @@ really_inline simd8<bool> must_be_continuation(simd8<uint8_t> prev1, simd8<uint8
return simd8<int8_t>(is_second_byte | is_third_byte | is_fourth_byte) > int8_t(0); return simd8<int8_t>(is_second_byte | is_third_byte | is_fourth_byte) > int8_t(0);
} }
/* begin file src/generic/buf_block_reader.h */ /* begin file generic/buf_block_reader.h */
// Walks through a buffer in block-sized increments, loading the last part with spaces // Walks through a buffer in block-sized increments, loading the last part with spaces
template<size_t STEP_SIZE> template<size_t STEP_SIZE>
struct buf_block_reader { struct buf_block_reader {
@ -4504,8 +4513,8 @@ UNUSED static char * format_mask(uint64_t mask) {
buf[64] = '\0'; buf[64] = '\0';
return buf; return buf;
} }
/* end file src/generic/buf_block_reader.h */ /* end file */
/* begin file src/generic/json_string_scanner.h */ /* begin file generic/json_string_scanner.h */
namespace stage1 { namespace stage1 {
struct json_string_block { struct json_string_block {
@ -4633,8 +4642,8 @@ really_inline error_code json_string_scanner::finish(bool streaming) {
} }
} // namespace stage1 } // namespace stage1
/* end file src/generic/json_string_scanner.h */ /* end file */
/* begin file src/generic/json_scanner.h */ /* begin file generic/json_scanner.h */
namespace stage1 { namespace stage1 {
/** /**
@ -4738,9 +4747,9 @@ really_inline error_code json_scanner::finish(bool streaming) {
} }
} // namespace stage1 } // namespace stage1
/* end file src/generic/json_scanner.h */ /* end file */
/* begin file src/generic/json_minifier.h */ /* begin file generic/json_minifier.h */
// This file contains the common code every implementation uses in stage1 // This file contains the common code every implementation uses in stage1
// It is intended to be included multiple times and compiled multiple times // It is intended to be included multiple times and compiled multiple times
// We assume the file in which it is included already includes // We assume the file in which it is included already includes
@ -4814,12 +4823,12 @@ error_code json_minifier::minify(const uint8_t *buf, size_t len, uint8_t *dst, s
} }
} // namespace stage1 } // namespace stage1
/* end file src/generic/json_minifier.h */ /* end file */
WARN_UNUSED error_code implementation::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept { 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); return westmere::stage1::json_minifier::minify<64>(buf, len, dst, dst_len);
} }
/* begin file src/generic/utf8_lookup2_algorithm.h */ /* begin file generic/utf8_lookup2_algorithm.h */
// //
// Detect Unicode errors. // Detect Unicode errors.
// //
@ -5245,8 +5254,8 @@ namespace utf8_validation {
} }
using utf8_validation::utf8_checker; using utf8_validation::utf8_checker;
/* end file src/generic/utf8_lookup2_algorithm.h */ /* end file */
/* begin file src/generic/json_structural_indexer.h */ /* begin file generic/json_structural_indexer.h */
// This file contains the common code every implementation uses in stage1 // This file contains the common code every implementation uses in stage1
// It is intended to be included multiple times and compiled multiple times // It is intended to be included multiple times and compiled multiple times
// We assume the file in which it is included already includes // We assume the file in which it is included already includes
@ -5422,7 +5431,7 @@ error_code json_structural_indexer::index(const uint8_t *buf, size_t len, parser
} }
} // namespace stage1 } // namespace stage1
/* end file src/generic/json_structural_indexer.h */ /* end file */
WARN_UNUSED error_code implementation::stage1(const uint8_t *buf, size_t len, parser &parser, bool streaming) const noexcept { 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); return westmere::stage1::json_structural_indexer::index<64>(buf, len, parser, streaming);
} }
@ -5433,13 +5442,13 @@ WARN_UNUSED error_code implementation::stage1(const uint8_t *buf, size_t len, pa
UNTARGET_REGION UNTARGET_REGION
#endif // SIMDJSON_WESTMERE_STAGE1_FIND_MARKS_H #endif // SIMDJSON_WESTMERE_STAGE1_FIND_MARKS_H
/* end file src/generic/json_structural_indexer.h */ /* end file */
#endif #endif
/* end file src/generic/json_structural_indexer.h */ /* end file */
/* begin file src/stage2_build_tape.cpp */ /* begin file stage2_build_tape.cpp */
#include <cassert> #include <cassert>
#include <cstring> #include <cstring>
/* begin file src/jsoncharutils.h */ /* begin file jsoncharutils.h */
#ifndef SIMDJSON_JSONCHARUTILS_H #ifndef SIMDJSON_JSONCHARUTILS_H
#define SIMDJSON_JSONCHARUTILS_H #define SIMDJSON_JSONCHARUTILS_H
@ -6774,8 +6783,8 @@ const uint64_t mantissa_128[] = {0x419ea3bd35385e2d,
} // namespace simdjson } // namespace simdjson
#endif #endif
/* end file src/jsoncharutils.h */ /* end file */
/* begin file src/document_parser_callbacks.h */ /* begin file document_parser_callbacks.h */
#ifndef SIMDJSON_DOCUMENT_PARSER_CALLBACKS_H #ifndef SIMDJSON_DOCUMENT_PARSER_CALLBACKS_H
#define SIMDJSON_DOCUMENT_PARSER_CALLBACKS_H #define SIMDJSON_DOCUMENT_PARSER_CALLBACKS_H
@ -6920,7 +6929,7 @@ really_inline void parser::end_scope(uint32_t depth) noexcept {
} // namespace dom } // namespace dom
#endif // SIMDJSON_DOCUMENT_PARSER_CALLBACKS_H #endif // SIMDJSON_DOCUMENT_PARSER_CALLBACKS_H
/* end file src/document_parser_callbacks.h */ /* end file */
using namespace simdjson; using namespace simdjson;
@ -6931,12 +6940,12 @@ void found_bad_string(const uint8_t *buf);
#endif #endif
#if SIMDJSON_IMPLEMENTATION_ARM64 #if SIMDJSON_IMPLEMENTATION_ARM64
/* begin file src/arm64/stage2_build_tape.h */ /* begin file arm64/stage2_build_tape.h */
#ifndef SIMDJSON_ARM64_STAGE2_BUILD_TAPE_H #ifndef SIMDJSON_ARM64_STAGE2_BUILD_TAPE_H
#define SIMDJSON_ARM64_STAGE2_BUILD_TAPE_H #define SIMDJSON_ARM64_STAGE2_BUILD_TAPE_H
/* arm64/implementation.h already included: #include "arm64/implementation.h" */ /* arm64/implementation.h already included: #include "arm64/implementation.h" */
/* begin file src/arm64/stringparsing.h */ /* begin file arm64/stringparsing.h */
#ifndef SIMDJSON_ARM64_STRINGPARSING_H #ifndef SIMDJSON_ARM64_STRINGPARSING_H
#define SIMDJSON_ARM64_STRINGPARSING_H #define SIMDJSON_ARM64_STRINGPARSING_H
@ -6983,7 +6992,7 @@ really_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8
}; };
} }
/* begin file src/generic/stringparsing.h */ /* begin file generic/stringparsing.h */
// This file contains the common code every implementation uses // This file contains the common code every implementation uses
// It is intended to be included multiple times and compiled multiple times // It is intended to be included multiple times and compiled multiple times
// We assume the file in which it is include already includes // We assume the file in which it is include already includes
@ -7105,14 +7114,14 @@ WARN_UNUSED really_inline uint8_t *parse_string(const uint8_t *src, uint8_t *dst
} }
} // namespace stringparsing } // namespace stringparsing
/* end file src/generic/stringparsing.h */ /* end file */
} // namespace arm64 } // namespace arm64
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_ARM64_STRINGPARSING_H #endif // SIMDJSON_ARM64_STRINGPARSING_H
/* end file src/generic/stringparsing.h */ /* end file */
/* begin file src/arm64/numberparsing.h */ /* begin file arm64/numberparsing.h */
#ifndef SIMDJSON_ARM64_NUMBERPARSING_H #ifndef SIMDJSON_ARM64_NUMBERPARSING_H
#define SIMDJSON_ARM64_NUMBERPARSING_H #define SIMDJSON_ARM64_NUMBERPARSING_H
@ -7145,7 +7154,7 @@ static inline uint32_t parse_eight_digits_unrolled(const char *chars) {
#define SWAR_NUMBER_PARSING #define SWAR_NUMBER_PARSING
/* begin file src/generic/numberparsing.h */ /* begin file generic/numberparsing.h */
namespace numberparsing { namespace numberparsing {
@ -7714,18 +7723,18 @@ really_inline bool parse_number(UNUSED const uint8_t *const src,
} }
} // namespace numberparsing } // namespace numberparsing
/* end file src/generic/numberparsing.h */ /* end file */
} // namespace arm64 } // namespace arm64
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_ARM64_NUMBERPARSING_H #endif // SIMDJSON_ARM64_NUMBERPARSING_H
/* end file src/generic/numberparsing.h */ /* end file */
namespace simdjson { namespace simdjson {
namespace arm64 { namespace arm64 {
/* begin file src/generic/atomparsing.h */ /* begin file generic/atomparsing.h */
namespace atomparsing { namespace atomparsing {
really_inline uint32_t string_to_uint32(const char* str) { return *reinterpret_cast<const uint32_t *>(str); } really_inline uint32_t string_to_uint32(const char* str) { return *reinterpret_cast<const uint32_t *>(str); }
@ -7775,8 +7784,8 @@ really_inline bool is_valid_null_atom(const uint8_t *src, size_t len) {
} }
} // namespace atomparsing } // namespace atomparsing
/* end file src/generic/atomparsing.h */ /* end file */
/* begin file src/generic/stage2_build_tape.h */ /* begin file generic/stage2_build_tape.h */
// This file contains the common code every implementation uses for stage2 // This file contains the common code every implementation uses for stage2
// It is intended to be included multiple times and compiled multiple times // It is intended to be included multiple times and compiled multiple times
// We assume the file in which it is include already includes // We assume the file in which it is include already includes
@ -8226,8 +8235,8 @@ WARN_UNUSED error_code implementation::parse(const uint8_t *buf, size_t len, par
} }
return code; return code;
} }
/* end file src/generic/stage2_build_tape.h */ /* end file */
/* begin file src/generic/stage2_streaming_build_tape.h */ /* begin file generic/stage2_streaming_build_tape.h */
namespace stage2 { namespace stage2 {
struct streaming_structural_parser: structural_parser { struct streaming_structural_parser: structural_parser {
@ -8382,22 +8391,22 @@ finish:
error: error:
return parser.error(); return parser.error();
} }
/* end file src/generic/stage2_streaming_build_tape.h */ /* end file */
} // namespace arm64 } // namespace arm64
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_ARM64_STAGE2_BUILD_TAPE_H #endif // SIMDJSON_ARM64_STAGE2_BUILD_TAPE_H
/* end file src/generic/stage2_streaming_build_tape.h */ /* end file */
#endif #endif
#if SIMDJSON_IMPLEMENTATION_FALLBACK #if SIMDJSON_IMPLEMENTATION_FALLBACK
/* begin file src/fallback/stage2_build_tape.h */ /* begin file fallback/stage2_build_tape.h */
#ifndef SIMDJSON_FALLBACK_STAGE2_BUILD_TAPE_H #ifndef SIMDJSON_FALLBACK_STAGE2_BUILD_TAPE_H
#define SIMDJSON_FALLBACK_STAGE2_BUILD_TAPE_H #define SIMDJSON_FALLBACK_STAGE2_BUILD_TAPE_H
/* fallback/implementation.h already included: #include "fallback/implementation.h" */ /* fallback/implementation.h already included: #include "fallback/implementation.h" */
/* begin file src/fallback/stringparsing.h */ /* begin file fallback/stringparsing.h */
#ifndef SIMDJSON_FALLBACK_STRINGPARSING_H #ifndef SIMDJSON_FALLBACK_STRINGPARSING_H
#define SIMDJSON_FALLBACK_STRINGPARSING_H #define SIMDJSON_FALLBACK_STRINGPARSING_H
@ -8426,7 +8435,7 @@ really_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8
return { src[0] }; return { src[0] };
} }
/* begin file src/generic/stringparsing.h */ /* begin file generic/stringparsing.h */
// This file contains the common code every implementation uses // This file contains the common code every implementation uses
// It is intended to be included multiple times and compiled multiple times // It is intended to be included multiple times and compiled multiple times
// We assume the file in which it is include already includes // We assume the file in which it is include already includes
@ -8548,19 +8557,19 @@ WARN_UNUSED really_inline uint8_t *parse_string(const uint8_t *src, uint8_t *dst
} }
} // namespace stringparsing } // namespace stringparsing
/* end file src/generic/stringparsing.h */ /* end file */
} // namespace fallback } // namespace fallback
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_FALLBACK_STRINGPARSING_H #endif // SIMDJSON_FALLBACK_STRINGPARSING_H
/* end file src/generic/stringparsing.h */ /* end file */
/* begin file src/fallback/numberparsing.h */ /* begin file fallback/numberparsing.h */
#ifndef SIMDJSON_FALLBACK_NUMBERPARSING_H #ifndef SIMDJSON_FALLBACK_NUMBERPARSING_H
#define SIMDJSON_FALLBACK_NUMBERPARSING_H #define SIMDJSON_FALLBACK_NUMBERPARSING_H
/* jsoncharutils.h already included: #include "jsoncharutils.h" */ /* jsoncharutils.h already included: #include "jsoncharutils.h" */
/* begin file src/fallback/bitmanipulation.h */ /* begin file fallback/bitmanipulation.h */
#ifndef SIMDJSON_FALLBACK_BITMANIPULATION_H #ifndef SIMDJSON_FALLBACK_BITMANIPULATION_H
#define SIMDJSON_FALLBACK_BITMANIPULATION_H #define SIMDJSON_FALLBACK_BITMANIPULATION_H
@ -8637,7 +8646,7 @@ really_inline bool mul_overflow(uint64_t value1, uint64_t value2, uint64_t *resu
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_FALLBACK_BITMANIPULATION_H #endif // SIMDJSON_FALLBACK_BITMANIPULATION_H
/* end file src/fallback/bitmanipulation.h */ /* end file */
#include <cmath> #include <cmath>
#include <limits> #include <limits>
@ -8660,7 +8669,7 @@ static inline uint32_t parse_eight_digits_unrolled(const char *chars) {
#define SWAR_NUMBER_PARSING #define SWAR_NUMBER_PARSING
/* begin file src/generic/numberparsing.h */ /* begin file generic/numberparsing.h */
namespace numberparsing { namespace numberparsing {
@ -9229,19 +9238,19 @@ really_inline bool parse_number(UNUSED const uint8_t *const src,
} }
} // namespace numberparsing } // namespace numberparsing
/* end file src/generic/numberparsing.h */ /* end file */
} // namespace fallback } // namespace fallback
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_FALLBACK_NUMBERPARSING_H #endif // SIMDJSON_FALLBACK_NUMBERPARSING_H
/* end file src/generic/numberparsing.h */ /* end file */
namespace simdjson { namespace simdjson {
namespace fallback { namespace fallback {
/* begin file src/generic/atomparsing.h */ /* begin file generic/atomparsing.h */
namespace atomparsing { namespace atomparsing {
really_inline uint32_t string_to_uint32(const char* str) { return *reinterpret_cast<const uint32_t *>(str); } really_inline uint32_t string_to_uint32(const char* str) { return *reinterpret_cast<const uint32_t *>(str); }
@ -9291,8 +9300,8 @@ really_inline bool is_valid_null_atom(const uint8_t *src, size_t len) {
} }
} // namespace atomparsing } // namespace atomparsing
/* end file src/generic/atomparsing.h */ /* end file */
/* begin file src/generic/stage2_build_tape.h */ /* begin file generic/stage2_build_tape.h */
// This file contains the common code every implementation uses for stage2 // This file contains the common code every implementation uses for stage2
// It is intended to be included multiple times and compiled multiple times // It is intended to be included multiple times and compiled multiple times
// We assume the file in which it is include already includes // We assume the file in which it is include already includes
@ -9742,8 +9751,8 @@ WARN_UNUSED error_code implementation::parse(const uint8_t *buf, size_t len, par
} }
return code; return code;
} }
/* end file src/generic/stage2_build_tape.h */ /* end file */
/* begin file src/generic/stage2_streaming_build_tape.h */ /* begin file generic/stage2_streaming_build_tape.h */
namespace stage2 { namespace stage2 {
struct streaming_structural_parser: structural_parser { struct streaming_structural_parser: structural_parser {
@ -9898,21 +9907,21 @@ finish:
error: error:
return parser.error(); return parser.error();
} }
/* end file src/generic/stage2_streaming_build_tape.h */ /* end file */
} // namespace fallback } // namespace fallback
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_FALLBACK_STAGE2_BUILD_TAPE_H #endif // SIMDJSON_FALLBACK_STAGE2_BUILD_TAPE_H
/* end file src/generic/stage2_streaming_build_tape.h */ /* end file */
#endif #endif
#if SIMDJSON_IMPLEMENTATION_HASWELL #if SIMDJSON_IMPLEMENTATION_HASWELL
/* begin file src/haswell/stage2_build_tape.h */ /* begin file haswell/stage2_build_tape.h */
#ifndef SIMDJSON_HASWELL_STAGE2_BUILD_TAPE_H #ifndef SIMDJSON_HASWELL_STAGE2_BUILD_TAPE_H
#define SIMDJSON_HASWELL_STAGE2_BUILD_TAPE_H #define SIMDJSON_HASWELL_STAGE2_BUILD_TAPE_H
/* haswell/implementation.h already included: #include "haswell/implementation.h" */ /* haswell/implementation.h already included: #include "haswell/implementation.h" */
/* begin file src/haswell/stringparsing.h */ /* begin file haswell/stringparsing.h */
#ifndef SIMDJSON_HASWELL_STRINGPARSING_H #ifndef SIMDJSON_HASWELL_STRINGPARSING_H
#define SIMDJSON_HASWELL_STRINGPARSING_H #define SIMDJSON_HASWELL_STRINGPARSING_H
@ -9955,7 +9964,7 @@ really_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8
}; };
} }
/* begin file src/generic/stringparsing.h */ /* begin file generic/stringparsing.h */
// This file contains the common code every implementation uses // This file contains the common code every implementation uses
// It is intended to be included multiple times and compiled multiple times // It is intended to be included multiple times and compiled multiple times
// We assume the file in which it is include already includes // We assume the file in which it is include already includes
@ -10077,15 +10086,15 @@ WARN_UNUSED really_inline uint8_t *parse_string(const uint8_t *src, uint8_t *dst
} }
} // namespace stringparsing } // namespace stringparsing
/* end file src/generic/stringparsing.h */ /* end file */
} // namespace haswell } // namespace haswell
} // namespace simdjson } // namespace simdjson
UNTARGET_REGION UNTARGET_REGION
#endif // SIMDJSON_HASWELL_STRINGPARSING_H #endif // SIMDJSON_HASWELL_STRINGPARSING_H
/* end file src/generic/stringparsing.h */ /* end file */
/* begin file src/haswell/numberparsing.h */ /* begin file haswell/numberparsing.h */
#ifndef SIMDJSON_HASWELL_NUMBERPARSING_H #ifndef SIMDJSON_HASWELL_NUMBERPARSING_H
#define SIMDJSON_HASWELL_NUMBERPARSING_H #define SIMDJSON_HASWELL_NUMBERPARSING_H
@ -10126,7 +10135,7 @@ static inline uint32_t parse_eight_digits_unrolled(const char *chars) {
#define SWAR_NUMBER_PARSING #define SWAR_NUMBER_PARSING
/* begin file src/generic/numberparsing.h */ /* begin file generic/numberparsing.h */
namespace numberparsing { namespace numberparsing {
@ -10695,7 +10704,7 @@ really_inline bool parse_number(UNUSED const uint8_t *const src,
} }
} // namespace numberparsing } // namespace numberparsing
/* end file src/generic/numberparsing.h */ /* end file */
} // namespace haswell } // namespace haswell
@ -10703,13 +10712,13 @@ really_inline bool parse_number(UNUSED const uint8_t *const src,
UNTARGET_REGION UNTARGET_REGION
#endif // SIMDJSON_HASWELL_NUMBERPARSING_H #endif // SIMDJSON_HASWELL_NUMBERPARSING_H
/* end file src/generic/numberparsing.h */ /* end file */
TARGET_HASWELL TARGET_HASWELL
namespace simdjson { namespace simdjson {
namespace haswell { namespace haswell {
/* begin file src/generic/atomparsing.h */ /* begin file generic/atomparsing.h */
namespace atomparsing { namespace atomparsing {
really_inline uint32_t string_to_uint32(const char* str) { return *reinterpret_cast<const uint32_t *>(str); } really_inline uint32_t string_to_uint32(const char* str) { return *reinterpret_cast<const uint32_t *>(str); }
@ -10759,8 +10768,8 @@ really_inline bool is_valid_null_atom(const uint8_t *src, size_t len) {
} }
} // namespace atomparsing } // namespace atomparsing
/* end file src/generic/atomparsing.h */ /* end file */
/* begin file src/generic/stage2_build_tape.h */ /* begin file generic/stage2_build_tape.h */
// This file contains the common code every implementation uses for stage2 // This file contains the common code every implementation uses for stage2
// It is intended to be included multiple times and compiled multiple times // It is intended to be included multiple times and compiled multiple times
// We assume the file in which it is include already includes // We assume the file in which it is include already includes
@ -11210,8 +11219,8 @@ WARN_UNUSED error_code implementation::parse(const uint8_t *buf, size_t len, par
} }
return code; return code;
} }
/* end file src/generic/stage2_build_tape.h */ /* end file */
/* begin file src/generic/stage2_streaming_build_tape.h */ /* begin file generic/stage2_streaming_build_tape.h */
namespace stage2 { namespace stage2 {
struct streaming_structural_parser: structural_parser { struct streaming_structural_parser: structural_parser {
@ -11366,22 +11375,22 @@ finish:
error: error:
return parser.error(); return parser.error();
} }
/* end file src/generic/stage2_streaming_build_tape.h */ /* end file */
} // namespace haswell } // namespace haswell
} // namespace simdjson } // namespace simdjson
UNTARGET_REGION UNTARGET_REGION
#endif // SIMDJSON_HASWELL_STAGE2_BUILD_TAPE_H #endif // SIMDJSON_HASWELL_STAGE2_BUILD_TAPE_H
/* end file src/generic/stage2_streaming_build_tape.h */ /* end file */
#endif #endif
#if SIMDJSON_IMPLEMENTATION_WESTMERE #if SIMDJSON_IMPLEMENTATION_WESTMERE
/* begin file src/westmere/stage2_build_tape.h */ /* begin file westmere/stage2_build_tape.h */
#ifndef SIMDJSON_WESTMERE_STAGE2_BUILD_TAPE_H #ifndef SIMDJSON_WESTMERE_STAGE2_BUILD_TAPE_H
#define SIMDJSON_WESTMERE_STAGE2_BUILD_TAPE_H #define SIMDJSON_WESTMERE_STAGE2_BUILD_TAPE_H
/* westmere/implementation.h already included: #include "westmere/implementation.h" */ /* westmere/implementation.h already included: #include "westmere/implementation.h" */
/* begin file src/westmere/stringparsing.h */ /* begin file westmere/stringparsing.h */
#ifndef SIMDJSON_WESTMERE_STRINGPARSING_H #ifndef SIMDJSON_WESTMERE_STRINGPARSING_H
#define SIMDJSON_WESTMERE_STRINGPARSING_H #define SIMDJSON_WESTMERE_STRINGPARSING_H
@ -11426,7 +11435,7 @@ really_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8
}; };
} }
/* begin file src/generic/stringparsing.h */ /* begin file generic/stringparsing.h */
// This file contains the common code every implementation uses // This file contains the common code every implementation uses
// It is intended to be included multiple times and compiled multiple times // It is intended to be included multiple times and compiled multiple times
// We assume the file in which it is include already includes // We assume the file in which it is include already includes
@ -11548,15 +11557,15 @@ WARN_UNUSED really_inline uint8_t *parse_string(const uint8_t *src, uint8_t *dst
} }
} // namespace stringparsing } // namespace stringparsing
/* end file src/generic/stringparsing.h */ /* end file */
} // namespace westmere } // namespace westmere
} // namespace simdjson } // namespace simdjson
UNTARGET_REGION UNTARGET_REGION
#endif // SIMDJSON_WESTMERE_STRINGPARSING_H #endif // SIMDJSON_WESTMERE_STRINGPARSING_H
/* end file src/generic/stringparsing.h */ /* end file */
/* begin file src/westmere/numberparsing.h */ /* begin file westmere/numberparsing.h */
#ifndef SIMDJSON_WESTMERE_NUMBERPARSING_H #ifndef SIMDJSON_WESTMERE_NUMBERPARSING_H
#define SIMDJSON_WESTMERE_NUMBERPARSING_H #define SIMDJSON_WESTMERE_NUMBERPARSING_H
@ -11598,7 +11607,7 @@ static inline uint32_t parse_eight_digits_unrolled(const char *chars) {
#define SWAR_NUMBER_PARSING #define SWAR_NUMBER_PARSING
/* begin file src/generic/numberparsing.h */ /* begin file generic/numberparsing.h */
namespace numberparsing { namespace numberparsing {
@ -12167,7 +12176,7 @@ really_inline bool parse_number(UNUSED const uint8_t *const src,
} }
} // namespace numberparsing } // namespace numberparsing
/* end file src/generic/numberparsing.h */ /* end file */
} // namespace westmere } // namespace westmere
@ -12175,13 +12184,13 @@ really_inline bool parse_number(UNUSED const uint8_t *const src,
UNTARGET_REGION UNTARGET_REGION
#endif // SIMDJSON_WESTMERE_NUMBERPARSING_H #endif // SIMDJSON_WESTMERE_NUMBERPARSING_H
/* end file src/generic/numberparsing.h */ /* end file */
TARGET_WESTMERE TARGET_WESTMERE
namespace simdjson { namespace simdjson {
namespace westmere { namespace westmere {
/* begin file src/generic/atomparsing.h */ /* begin file generic/atomparsing.h */
namespace atomparsing { namespace atomparsing {
really_inline uint32_t string_to_uint32(const char* str) { return *reinterpret_cast<const uint32_t *>(str); } really_inline uint32_t string_to_uint32(const char* str) { return *reinterpret_cast<const uint32_t *>(str); }
@ -12231,8 +12240,8 @@ really_inline bool is_valid_null_atom(const uint8_t *src, size_t len) {
} }
} // namespace atomparsing } // namespace atomparsing
/* end file src/generic/atomparsing.h */ /* end file */
/* begin file src/generic/stage2_build_tape.h */ /* begin file generic/stage2_build_tape.h */
// This file contains the common code every implementation uses for stage2 // This file contains the common code every implementation uses for stage2
// It is intended to be included multiple times and compiled multiple times // It is intended to be included multiple times and compiled multiple times
// We assume the file in which it is include already includes // We assume the file in which it is include already includes
@ -12682,8 +12691,8 @@ WARN_UNUSED error_code implementation::parse(const uint8_t *buf, size_t len, par
} }
return code; return code;
} }
/* end file src/generic/stage2_build_tape.h */ /* end file */
/* begin file src/generic/stage2_streaming_build_tape.h */ /* begin file generic/stage2_streaming_build_tape.h */
namespace stage2 { namespace stage2 {
struct streaming_structural_parser: structural_parser { struct streaming_structural_parser: structural_parser {
@ -12838,13 +12847,13 @@ finish:
error: error:
return parser.error(); return parser.error();
} }
/* end file src/generic/stage2_streaming_build_tape.h */ /* end file */
} // namespace westmere } // namespace westmere
} // namespace simdjson } // namespace simdjson
UNTARGET_REGION UNTARGET_REGION
#endif // SIMDJSON_WESTMERE_STAGE2_BUILD_TAPE_H #endif // SIMDJSON_WESTMERE_STAGE2_BUILD_TAPE_H
/* end file src/generic/stage2_streaming_build_tape.h */ /* end file */
#endif #endif
/* end file src/generic/stage2_streaming_build_tape.h */ /* end file */
/* end file src/generic/stage2_streaming_build_tape.h */ /* end file */

View File

@ -1,5 +1,5 @@
/* auto-generated on Sun Apr 19 11:36:20 PDT 2020. Do not edit! */ /* auto-generated on Mon Apr 20 11:05:12 PDT 2020. Do not edit! */
/* begin file include/simdjson.h */ /* begin file simdjson.h */
#ifndef SIMDJSON_H #ifndef SIMDJSON_H
#define 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). * Check the [README.md](https://github.com/lemire/simdjson/blob/master/README.md#simdjson--parsing-gigabytes-of-json-per-second).
*/ */
/* begin file include/simdjson/compiler_check.h */ /* begin file simdjson/compiler_check.h */
#ifndef SIMDJSON_COMPILER_CHECK_H #ifndef SIMDJSON_COMPILER_CHECK_H
#define SIMDJSON_COMPILER_CHECK_H #define SIMDJSON_COMPILER_CHECK_H
@ -45,10 +45,10 @@
#endif #endif
#endif // SIMDJSON_COMPILER_CHECK_H #endif // SIMDJSON_COMPILER_CHECK_H
/* end file include/simdjson/compiler_check.h */ /* end file */
// Public API // Public API
/* begin file include/simdjson/simdjson_version.h */ /* begin file simdjson/simdjson_version.h */
// /include/simdjson/simdjson_version.h automatically generated by release.py, // /include/simdjson/simdjson_version.h automatically generated by release.py,
// do not change by hand // do not change by hand
#ifndef SIMDJSON_SIMDJSON_VERSION_H #ifndef SIMDJSON_SIMDJSON_VERSION_H
@ -75,17 +75,17 @@ enum {
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_SIMDJSON_VERSION_H #endif // SIMDJSON_SIMDJSON_VERSION_H
/* end file include/simdjson/simdjson_version.h */ /* end file */
/* begin file include/simdjson/error.h */ /* begin file simdjson/error.h */
#ifndef SIMDJSON_ERROR_H #ifndef SIMDJSON_ERROR_H
#define SIMDJSON_ERROR_H #define SIMDJSON_ERROR_H
/* begin file include/simdjson/common_defs.h */ /* begin file simdjson/common_defs.h */
#ifndef SIMDJSON_COMMON_DEFS_H #ifndef SIMDJSON_COMMON_DEFS_H
#define SIMDJSON_COMMON_DEFS_H #define SIMDJSON_COMMON_DEFS_H
#include <cassert> #include <cassert>
/* begin file include/simdjson/portability.h */ /* begin file simdjson/portability.h */
#ifndef SIMDJSON_PORTABILITY_H #ifndef SIMDJSON_PORTABILITY_H
#define SIMDJSON_PORTABILITY_H #define SIMDJSON_PORTABILITY_H
@ -242,7 +242,7 @@ static inline void aligned_free_char(char *mem_block) {
} }
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_PORTABILITY_H #endif // SIMDJSON_PORTABILITY_H
/* end file include/simdjson/portability.h */ /* end file */
namespace simdjson { namespace simdjson {
@ -367,7 +367,7 @@ constexpr size_t DEFAULT_MAX_DEPTH = 1024;
#if (!SIMDJSON_CPLUSPLUS17) #if (!SIMDJSON_CPLUSPLUS17)
SIMDJSON_PUSH_DISABLE_ALL_WARNINGS SIMDJSON_PUSH_DISABLE_ALL_WARNINGS
/* begin file include/simdjson/nonstd/string_view.hpp */ /* begin file simdjson/nonstd/string_view.hpp */
// Copyright 2017-2019 by Martin Moene // Copyright 2017-2019 by Martin Moene
// //
// string-view lite, a C++17-like string_view for C++98 and later. // string-view lite, a C++17-like string_view for C++98 and later.
@ -1897,7 +1897,7 @@ nssv_RESTORE_WARNINGS()
#endif // nssv_HAVE_STD_STRING_VIEW #endif // nssv_HAVE_STD_STRING_VIEW
#endif // NONSTD_SV_LITE_H_INCLUDED #endif // NONSTD_SV_LITE_H_INCLUDED
/* end file include/simdjson/nonstd/string_view.hpp */ /* end file */
SIMDJSON_POP_DISABLE_WARNINGS SIMDJSON_POP_DISABLE_WARNINGS
namespace std { namespace std {
@ -1906,7 +1906,7 @@ namespace std {
#endif // if (SIMDJSON_CPLUSPLUS < 201703L) #endif // if (SIMDJSON_CPLUSPLUS < 201703L)
#endif // SIMDJSON_COMMON_DEFS_H #endif // SIMDJSON_COMMON_DEFS_H
/* end file include/simdjson/nonstd/string_view.hpp */ /* end file */
#include <string> #include <string>
#include <utility> #include <utility>
@ -2136,8 +2136,8 @@ inline const std::string &error_message(int error) noexcept;
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_ERROR_H #endif // SIMDJSON_ERROR_H
/* end file include/simdjson/nonstd/string_view.hpp */ /* end file */
/* begin file include/simdjson/padded_string.h */ /* begin file simdjson/padded_string.h */
#ifndef SIMDJSON_PADDED_STRING_H #ifndef SIMDJSON_PADDED_STRING_H
#define SIMDJSON_PADDED_STRING_H #define SIMDJSON_PADDED_STRING_H
@ -2277,8 +2277,8 @@ inline char *allocate_padded_buffer(size_t length) noexcept;
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_PADDED_STRING_H #endif // SIMDJSON_PADDED_STRING_H
/* end file include/simdjson/padded_string.h */ /* end file */
/* begin file include/simdjson/implementation.h */ /* begin file simdjson/implementation.h */
#ifndef SIMDJSON_IMPLEMENTATION_H #ifndef SIMDJSON_IMPLEMENTATION_H
#define SIMDJSON_IMPLEMENTATION_H #define SIMDJSON_IMPLEMENTATION_H
@ -2286,7 +2286,7 @@ inline char *allocate_padded_buffer(size_t length) noexcept;
#include <string> #include <string>
#include <atomic> #include <atomic>
#include <vector> #include <vector>
/* begin file include/simdjson/document.h */ /* begin file simdjson/document.h */
#ifndef SIMDJSON_DOCUMENT_H #ifndef SIMDJSON_DOCUMENT_H
#define SIMDJSON_DOCUMENT_H #define SIMDJSON_DOCUMENT_H
@ -2295,7 +2295,7 @@ inline char *allocate_padded_buffer(size_t length) noexcept;
#include <string> #include <string>
#include <limits> #include <limits>
#include <sstream> #include <sstream>
/* begin file include/simdjson/simdjson.h */ /* begin file simdjson/simdjson.h */
/** /**
* @file * @file
* @deprecated We'll be removing this file so it isn't confused with the top level simdjson.h * @deprecated We'll be removing this file so it isn't confused with the top level simdjson.h
@ -2305,7 +2305,7 @@ inline char *allocate_padded_buffer(size_t length) noexcept;
#endif // SIMDJSON_H #endif // SIMDJSON_H
/* end file include/simdjson/simdjson.h */ /* end file */
namespace simdjson { namespace simdjson {
namespace dom { namespace dom {
@ -3634,7 +3634,7 @@ public:
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_DOCUMENT_H #endif // SIMDJSON_DOCUMENT_H
/* end file include/simdjson/simdjson.h */ /* end file */
namespace simdjson { namespace simdjson {
@ -3864,8 +3864,8 @@ extern SIMDJSON_DLLIMPORTEXPORT internal::atomic_ptr<const implementation> activ
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_IMPLEMENTATION_H #endif // SIMDJSON_IMPLEMENTATION_H
/* end file include/simdjson/simdjson.h */ /* end file */
/* begin file include/simdjson/document_stream.h */ /* begin file simdjson/document_stream.h */
#ifndef SIMDJSON_DOCUMENT_STREAM_H #ifndef SIMDJSON_DOCUMENT_STREAM_H
#define SIMDJSON_DOCUMENT_STREAM_H #define SIMDJSON_DOCUMENT_STREAM_H
@ -4012,16 +4012,16 @@ private:
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_DOCUMENT_STREAM_H #endif // SIMDJSON_DOCUMENT_STREAM_H
/* end file include/simdjson/document_stream.h */ /* end file */
// // Deprecated API // // Deprecated API
/* begin file include/simdjson/jsonparser.h */ /* begin file simdjson/jsonparser.h */
// TODO Remove this -- deprecated API and files // TODO Remove this -- deprecated API and files
#ifndef SIMDJSON_JSONPARSER_H #ifndef SIMDJSON_JSONPARSER_H
#define SIMDJSON_JSONPARSER_H #define SIMDJSON_JSONPARSER_H
/* begin file include/simdjson/parsedjson.h */ /* begin file simdjson/parsedjson.h */
// TODO Remove this -- deprecated API and files // TODO Remove this -- deprecated API and files
#ifndef SIMDJSON_PARSEDJSON_H #ifndef SIMDJSON_PARSEDJSON_H
@ -4037,8 +4037,8 @@ using ParsedJson [[deprecated("Use dom::parser instead")]] = dom::parser;
} // namespace simdjson } // namespace simdjson
#endif #endif
/* end file include/simdjson/parsedjson.h */ /* end file */
/* begin file include/simdjson/jsonioutil.h */ /* begin file simdjson/jsonioutil.h */
#ifndef SIMDJSON_JSONIOUTIL_H #ifndef SIMDJSON_JSONIOUTIL_H
#define SIMDJSON_JSONIOUTIL_H #define SIMDJSON_JSONIOUTIL_H
@ -4064,7 +4064,7 @@ inline padded_string get_corpus(const char *path) {
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_JSONIOUTIL_H #endif // SIMDJSON_JSONIOUTIL_H
/* end file include/simdjson/jsonioutil.h */ /* end file */
namespace simdjson { namespace simdjson {
@ -4174,8 +4174,8 @@ dom::parser build_parsed_json(const char *buf) noexcept = delete;
} // namespace simdjson } // namespace simdjson
#endif #endif
/* end file include/simdjson/jsonioutil.h */ /* end file */
/* begin file include/simdjson/parsedjson_iterator.h */ /* begin file simdjson/parsedjson_iterator.h */
// TODO Remove this -- deprecated API and files // TODO Remove this -- deprecated API and files
#ifndef SIMDJSON_PARSEDJSON_ITERATOR_H #ifndef SIMDJSON_PARSEDJSON_ITERATOR_H
@ -4188,7 +4188,7 @@ dom::parser build_parsed_json(const char *buf) noexcept = delete;
#include <limits> #include <limits>
#include <stdexcept> #include <stdexcept>
/* begin file include/simdjson/internal/jsonformatutils.h */ /* begin file simdjson/internal/jsonformatutils.h */
#ifndef SIMDJSON_INTERNAL_JSONFORMATUTILS_H #ifndef SIMDJSON_INTERNAL_JSONFORMATUTILS_H
#define SIMDJSON_INTERNAL_JSONFORMATUTILS_H #define SIMDJSON_INTERNAL_JSONFORMATUTILS_H
@ -4254,7 +4254,7 @@ inline std::ostream& operator<<(std::ostream& out, const escape_json_string &une
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_INTERNAL_JSONFORMATUTILS_H #endif // SIMDJSON_INTERNAL_JSONFORMATUTILS_H
/* end file include/simdjson/internal/jsonformatutils.h */ /* end file */
namespace simdjson { namespace simdjson {
@ -4507,10 +4507,10 @@ public:
} // namespace simdjson } // namespace simdjson
#endif #endif
/* end file include/simdjson/internal/jsonformatutils.h */ /* end file */
// // Inline functions // // Inline functions
/* begin file include/simdjson/inline/document.h */ /* begin file simdjson/inline/document.h */
#ifndef SIMDJSON_INLINE_DOCUMENT_H #ifndef SIMDJSON_INLINE_DOCUMENT_H
#define SIMDJSON_INLINE_DOCUMENT_H #define SIMDJSON_INLINE_DOCUMENT_H
@ -5679,8 +5679,8 @@ inline std::string_view internal::tape_ref::get_string_view() const noexcept {
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_INLINE_DOCUMENT_H #endif // SIMDJSON_INLINE_DOCUMENT_H
/* end file include/simdjson/inline/document.h */ /* end file */
/* begin file include/simdjson/inline/document_stream.h */ /* begin file simdjson/inline/document_stream.h */
#ifndef SIMDJSON_INLINE_DOCUMENT_STREAM_H #ifndef SIMDJSON_INLINE_DOCUMENT_STREAM_H
#define SIMDJSON_INLINE_DOCUMENT_STREAM_H #define SIMDJSON_INLINE_DOCUMENT_STREAM_H
@ -5961,8 +5961,8 @@ inline error_code document_stream::json_parse() noexcept {
} // namespace dom } // namespace dom
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_INLINE_DOCUMENT_STREAM_H #endif // SIMDJSON_INLINE_DOCUMENT_STREAM_H
/* end file include/simdjson/inline/document_stream.h */ /* end file */
/* begin file include/simdjson/inline/error.h */ /* begin file simdjson/inline/error.h */
#ifndef SIMDJSON_INLINE_ERROR_H #ifndef SIMDJSON_INLINE_ERROR_H
#define SIMDJSON_INLINE_ERROR_H #define SIMDJSON_INLINE_ERROR_H
@ -6101,8 +6101,8 @@ really_inline simdjson_result<T>::simdjson_result() noexcept
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_INLINE_ERROR_H #endif // SIMDJSON_INLINE_ERROR_H
/* end file include/simdjson/inline/error.h */ /* end file */
/* begin file include/simdjson/inline/padded_string.h */ /* begin file simdjson/inline/padded_string.h */
#ifndef SIMDJSON_INLINE_PADDED_STRING_H #ifndef SIMDJSON_INLINE_PADDED_STRING_H
#define SIMDJSON_INLINE_PADDED_STRING_H #define SIMDJSON_INLINE_PADDED_STRING_H
@ -6242,8 +6242,8 @@ inline simdjson_result<padded_string> padded_string::load(const std::string &fil
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_INLINE_PADDED_STRING_H #endif // SIMDJSON_INLINE_PADDED_STRING_H
/* end file include/simdjson/inline/padded_string.h */ /* end file */
/* begin file include/simdjson/inline/parsedjson_iterator.h */ /* begin file simdjson/inline/parsedjson_iterator.h */
#ifndef SIMDJSON_INLINE_PARSEDJSON_ITERATOR_H #ifndef SIMDJSON_INLINE_PARSEDJSON_ITERATOR_H
#define SIMDJSON_INLINE_PARSEDJSON_ITERATOR_H #define SIMDJSON_INLINE_PARSEDJSON_ITERATOR_H
@ -6717,7 +6717,7 @@ bool dom::parser::Iterator::relative_move_to(const char *pointer,
} // namespace simdjson } // namespace simdjson
#endif // SIMDJSON_INLINE_PARSEDJSON_ITERATOR_H #endif // SIMDJSON_INLINE_PARSEDJSON_ITERATOR_H
/* end file include/simdjson/inline/parsedjson_iterator.h */ /* end file */
#endif // SIMDJSON_H #endif // SIMDJSON_H
/* end file include/simdjson/inline/parsedjson_iterator.h */ /* end file */

View File

@ -4,6 +4,7 @@
# target_link_libraries(my-program simdjson-include-source) gives you the header and source # target_link_libraries(my-program simdjson-include-source) gives you the header and source
# directories. It does not specify any compiler flags. # directories. It does not specify any compiler flags.
# #
add_library(simdjson-include-source INTERFACE) add_library(simdjson-include-source INTERFACE)
target_link_libraries(simdjson-include-source INTERFACE simdjson-headers) target_link_libraries(simdjson-include-source INTERFACE simdjson-headers)
target_include_directories(simdjson-include-source INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>) target_include_directories(simdjson-include-source INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)

View File

@ -139,7 +139,6 @@ if(NOT (MSVC AND MSVC_VERSION LESS 1920))
# Compile tests that *should fail* # Compile tests that *should fail*
add_cpp_test(readme_examples_will_fail_with_exceptions_off WILL_FAIL COMPILE_ONLY LABELS acceptance SOURCES readme_examples.cpp) add_cpp_test(readme_examples_will_fail_with_exceptions_off WILL_FAIL COMPILE_ONLY LABELS acceptance SOURCES readme_examples.cpp)
target_compile_definitions(readme_examples_will_fail_with_exceptions_off PRIVATE SIMDJSON_EXCEPTIONS=0) target_compile_definitions(readme_examples_will_fail_with_exceptions_off PRIVATE SIMDJSON_EXCEPTIONS=0)
endif() endif()

View File

@ -159,5 +159,5 @@ print("modified "+doxyfile+", a backup was made")
scriptlocation = os.path.dirname(os.path.abspath(__file__)) scriptlocation = os.path.dirname(os.path.abspath(__file__))
print("Please run the tests before issuing a release, do make test && make amalgamate \n") print("Please run the tests before issuing a release, do make test && make amalgamate_test \n")
print("to issue release, enter \n git commit -a && git push && git tag -a v"+toversionstring(*newversion)+" -m \"version "+toversionstring(*newversion)+"\" && git push --tags \n") print("to issue release, enter \n git commit -a && git push && git tag -a v"+toversionstring(*newversion)+" -m \"version "+toversionstring(*newversion)+"\" && git push --tags \n")