Compare commits

...

3 Commits

Author SHA1 Message Date
Daniel Lemire 2cc3b4c650 Moving it to 0.6.1. 2020-11-03 22:16:07 -05:00
Daniel Lemire 146191d791 Using decimal notation. 2020-11-03 22:09:42 -05:00
Daniel Lemire 80db053be3 Fixing build errors under legacy libc++. 2020-11-03 21:57:23 -05:00
7 changed files with 38 additions and 23 deletions
+2 -2
View File
@@ -7,8 +7,8 @@ project(simdjson
set(PROJECT_VERSION_MAJOR 0) set(PROJECT_VERSION_MAJOR 0)
set(PROJECT_VERSION_MINOR 6) set(PROJECT_VERSION_MINOR 6)
set(PROJECT_VERSION_PATCH 0) set(PROJECT_VERSION_PATCH 1)
set(SIMDJSON_SEMANTIC_VERSION "0.6.0" CACHE STRING "simdjson semantic version") set(SIMDJSON_SEMANTIC_VERSION "0.6.1" CACHE STRING "simdjson semantic version")
set(SIMDJSON_LIB_VERSION "4.0.0" CACHE STRING "simdjson library version") set(SIMDJSON_LIB_VERSION "4.0.0" CACHE STRING "simdjson library version")
set(SIMDJSON_LIB_SOVERSION "4" CACHE STRING "simdjson library soversion") set(SIMDJSON_LIB_SOVERSION "4" CACHE STRING "simdjson library soversion")
set(SIMDJSON_GITHUB_REPOSITORY https://github.com/simdjson/simdjson) set(SIMDJSON_GITHUB_REPOSITORY https://github.com/simdjson/simdjson)
+1 -1
View File
@@ -38,7 +38,7 @@ PROJECT_NAME = simdjson
# could be handy for archiving the generated documentation or if some version # could be handy for archiving the generated documentation or if some version
# control system is used. # control system is used.
PROJECT_NUMBER = "0.6.0" PROJECT_NUMBER = "0.6.1"
# Using the PROJECT_BRIEF tag one can provide an optional one line description # Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a # for a project that appears at the top of each page and should give viewer a
+3 -2
View File
@@ -292,8 +292,9 @@ simdjson_really_inline bool compute_float_64(int64_t power, uint64_t i, bool neg
// one digit. // one digit.
static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) { static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) {
*outDouble = simdjson::internal::from_chars((const char *)ptr); *outDouble = simdjson::internal::from_chars((const char *)ptr);
// We do not accept infinite values. // We do not accept infinite values. Yes, there is a std::isfinite function, but
if (!std::isfinite(*outDouble)) { // it appears to be broken in legacy libc++.
if ((*outDouble > 1.7976931348623157e308) || (*outDouble < -1.7976931348623157e308)) {
return false; return false;
} }
return true; return true;
+2 -2
View File
@@ -4,7 +4,7 @@
#define SIMDJSON_SIMDJSON_VERSION_H #define SIMDJSON_SIMDJSON_VERSION_H
/** The version of simdjson being used (major.minor.revision) */ /** The version of simdjson being used (major.minor.revision) */
#define SIMDJSON_VERSION 0.6.0 #define SIMDJSON_VERSION 0.6.1
namespace simdjson { namespace simdjson {
enum { enum {
@@ -19,7 +19,7 @@ enum {
/** /**
* The revision (major.minor.REVISION) of simdjson being used. * The revision (major.minor.REVISION) of simdjson being used.
*/ */
SIMDJSON_VERSION_REVISION = 0 SIMDJSON_VERSION_REVISION = 1
}; };
} // namespace simdjson } // namespace simdjson
+8 -3
View File
@@ -1,4 +1,4 @@
/* auto-generated on Fri 23 Oct 2020 09:30:48 EDT. Do not edit! */ /* auto-generated on Tue 3 Nov 2020 22:14:23 EST. Do not edit! */
/* begin file src/simdjson.cpp */ /* begin file src/simdjson.cpp */
#include "simdjson.h" #include "simdjson.h"
@@ -922,8 +922,13 @@ format. Returns an iterator pointing past-the-end of the decimal representation.
*/ */
char *to_chars(char *first, const char *last, double value) { char *to_chars(char *first, const char *last, double value) {
static_cast<void>(last); // maybe unused - fix warning static_cast<void>(last); // maybe unused - fix warning
// Use signbit(value) instead of (value < 0) since signbit works for -0. // It would be better to use signbit(value) instead of (value < 0) since signbit works for -0.
if (std::signbit(value)) { //if(std::signbit(value)) {
// value = -value;
// *first++ = '-';
//}
// However, under older libc++, std::signbit causes build errors, so falling back:
if((value < 0) || (value == -0)){
value = -value; value = -value;
*first++ = '-'; *first++ = '-';
} }
+15 -11
View File
@@ -1,4 +1,4 @@
/* auto-generated on Fri 23 Oct 2020 09:30:48 EDT. Do not edit! */ /* auto-generated on Tue 3 Nov 2020 22:14:23 EST. Do not edit! */
/* begin file include/simdjson.h */ /* begin file include/simdjson.h */
#ifndef SIMDJSON_H #ifndef SIMDJSON_H
#define SIMDJSON_H #define SIMDJSON_H
@@ -2009,7 +2009,7 @@ SIMDJSON_DISABLE_UNDESIRED_WARNINGS
#define SIMDJSON_SIMDJSON_VERSION_H #define SIMDJSON_SIMDJSON_VERSION_H
/** The version of simdjson being used (major.minor.revision) */ /** The version of simdjson being used (major.minor.revision) */
#define SIMDJSON_VERSION 0.6.0 #define SIMDJSON_VERSION 0.6.1
namespace simdjson { namespace simdjson {
enum { enum {
@@ -2024,7 +2024,7 @@ enum {
/** /**
* The revision (major.minor.REVISION) of simdjson being used. * The revision (major.minor.REVISION) of simdjson being used.
*/ */
SIMDJSON_VERSION_REVISION = 0 SIMDJSON_VERSION_REVISION = 1
}; };
} // namespace simdjson } // namespace simdjson
@@ -10076,8 +10076,9 @@ simdjson_really_inline bool compute_float_64(int64_t power, uint64_t i, bool neg
// one digit. // one digit.
static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) { static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) {
*outDouble = simdjson::internal::from_chars((const char *)ptr); *outDouble = simdjson::internal::from_chars((const char *)ptr);
// We do not accept infinite values. // We do not accept infinite values. Yes, there is a std::isfinite function, but
if (!std::isfinite(*outDouble)) { // it appears to be broken in legacy libc++.
if ((*outDouble > 1.7976931348623157e308) || (*outDouble < -1.7976931348623157e308)) {
return false; return false;
} }
return true; return true;
@@ -15896,8 +15897,9 @@ simdjson_really_inline bool compute_float_64(int64_t power, uint64_t i, bool neg
// one digit. // one digit.
static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) { static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) {
*outDouble = simdjson::internal::from_chars((const char *)ptr); *outDouble = simdjson::internal::from_chars((const char *)ptr);
// We do not accept infinite values. // We do not accept infinite values. Yes, there is a std::isfinite function, but
if (!std::isfinite(*outDouble)) { // it appears to be broken in legacy libc++.
if ((*outDouble > 1.7976931348623157e308) || (*outDouble < -1.7976931348623157e308)) {
return false; return false;
} }
return true; return true;
@@ -21669,8 +21671,9 @@ simdjson_really_inline bool compute_float_64(int64_t power, uint64_t i, bool neg
// one digit. // one digit.
static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) { static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) {
*outDouble = simdjson::internal::from_chars((const char *)ptr); *outDouble = simdjson::internal::from_chars((const char *)ptr);
// We do not accept infinite values. // We do not accept infinite values. Yes, there is a std::isfinite function, but
if (!std::isfinite(*outDouble)) { // it appears to be broken in legacy libc++.
if ((*outDouble > 1.7976931348623157e308) || (*outDouble < -1.7976931348623157e308)) {
return false; return false;
} }
return true; return true;
@@ -27001,8 +27004,9 @@ simdjson_really_inline bool compute_float_64(int64_t power, uint64_t i, bool neg
// one digit. // one digit.
static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) { static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) {
*outDouble = simdjson::internal::from_chars((const char *)ptr); *outDouble = simdjson::internal::from_chars((const char *)ptr);
// We do not accept infinite values. // We do not accept infinite values. Yes, there is a std::isfinite function, but
if (!std::isfinite(*outDouble)) { // it appears to be broken in legacy libc++.
if ((*outDouble > 1.7976931348623157e308) || (*outDouble < -1.7976931348623157e308)) {
return false; return false;
} }
return true; return true;
+7 -2
View File
@@ -914,8 +914,13 @@ format. Returns an iterator pointing past-the-end of the decimal representation.
*/ */
char *to_chars(char *first, const char *last, double value) { char *to_chars(char *first, const char *last, double value) {
static_cast<void>(last); // maybe unused - fix warning static_cast<void>(last); // maybe unused - fix warning
// Use signbit(value) instead of (value < 0) since signbit works for -0. // It would be better to use signbit(value) instead of (value < 0) since signbit works for -0.
if (std::signbit(value)) { //if(std::signbit(value)) {
// value = -value;
// *first++ = '-';
//}
// However, under older libc++, std::signbit causes build errors, so falling back:
if((value < 0) || (value == -0)){
value = -value; value = -value;
*first++ = '-'; *first++ = '-';
} }