1- /* auto-generated on Mon Dec 16 19:07:18 EST 2019. Do not edit! */
1+ /* auto-generated on Wed Dec 18 14:39:04 UTC 2019. Do not edit! */
22#include " simdjson.h"
33
44/* used for http://dmalloc.com/ Dmalloc - Debug Malloc Library */
@@ -497,7 +497,7 @@ const std::map<int, const std::string> error_strings = {
497497 {NUMBER_ERROR, " Problem while parsing a number" },
498498 {UTF8_ERROR, " The input is not valid UTF-8" },
499499 {UNITIALIZED, " Unitialized" },
500- {EMPTY, " Empty" },
500+ {EMPTY, " Empty: no JSON found " },
501501 {UNESCAPED_CHARS, " Within strings, some characters must be escaped, we "
502502 " found unescaped characters" },
503503 {UNCLOSED_STRING, " A string is opened, but never closed." },
@@ -1061,7 +1061,7 @@ int json_parse(const char *buf, size_t len, ParsedJson &pj,
10611061 realloc);
10621062}
10631063
1064- Architecture find_best_supported_implementation () {
1064+ Architecture find_best_supported_architecture () {
10651065 constexpr uint32_t haswell_flags =
10661066 instruction_set::AVX2 | instruction_set::PCLMULQDQ |
10671067 instruction_set::BMI1 | instruction_set::BMI2;
@@ -1077,13 +1077,20 @@ Architecture find_best_supported_implementation() {
10771077 if (supports & instruction_set::NEON)
10781078 return Architecture::ARM64;
10791079
1080- return Architecture::NONE;
1080+ return Architecture::UNSUPPORTED;
1081+ }
1082+
1083+ Architecture parse_architecture (char *architecture) {
1084+ if (!strcmp (architecture, " HASWELL" )) { return Architecture::HASWELL; }
1085+ if (!strcmp (architecture, " WESTMERE" )) { return Architecture::WESTMERE; }
1086+ if (!strcmp (architecture, " ARM64" )) { return Architecture::ARM64; }
1087+ return Architecture::UNSUPPORTED;
10811088}
10821089
10831090// Responsible to select the best json_parse implementation
10841091int json_parse_dispatch (const uint8_t *buf, size_t len, ParsedJson &pj,
10851092 bool realloc) {
1086- Architecture best_implementation = find_best_supported_implementation ();
1093+ Architecture best_implementation = find_best_supported_architecture ();
10871094 // Selecting the best implementation
10881095 switch (best_implementation) {
10891096#ifdef IS_X86_64
0 commit comments