Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/miloyip/rapidjson.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-09-16Minor refactoring before optimization trialMilo Yip
2014-09-16Minor optimizations in BigIntegerMilo Yip
2014-09-16Added missing filesMilo Yip
2014-09-16Extract classes into various files.Milo Yip
2014-09-16Minor code cleaningMilo Yip
2014-09-16Trimming leading/trailing zeros and correct underflow caseMilo Yip
2014-09-15Fix round towards evenmiloyip
2014-09-15Limit significand to 17 digits for fast pathmiloyip
Should fix gcc debug error in tranvis. May need further refactoring.
2014-09-14Remove unused BigInteger::operator+=(const BigInteger&)Milo Yip
2014-09-14Fix normal-subnormal boundary and add more boundary cases in unit tests.Milo Yip
2014-09-14Add 32-bit support for custom strtodMilo Yip
2014-09-14Makes gcc x64 runnable, but failed on one case. [ci skip]Milo Yip
2014-09-13Make custom strtod work for denormal numbers and some boundary cases [ci skip]Milo Yip
2014-09-12Implementing custom strtod, fail on some cases [ci skip]Milo Yip
2014-09-10Extract conversion code to strtod.h [ci skip]Milo Yip
2014-09-10Prepare custom strtod data. (cannot pass unit test) [ci skip]miloyip
2014-09-05Optimize ParseNumber()miloyip
2014-09-05Merge master and implement kParseFullPrecisionMilo Yip
2014-09-05Refactor ParseNumber for two modes (incomplete)Milo Yip
2014-09-04finally fixing `Reader::ParseString()`Kosta
It was a copy-n-paste error for the last argument of `Key()` and `String()`...
2014-09-04more changesKosta
2014-09-04fix for `Reader::ParseString()` implementation plus some minor code cleanups ↵Kosta
and additions
2014-09-04reunified `ParseKey`, `ParseString`, and `ParseStringOrKey` againKosta
2014-09-04fix `simplereader.cpp` and the `Key()->String()` forwarding in ↵Kosta
`BaseReaderHandler`
2014-09-04add `Key()` method to `Writer` and `PrettyWriter`Kosta
2014-09-04add `Key()` method to the `Handler` conceptKosta
For more details see: https://github.com/miloyip/rapidjson/issues/132 This commit tries to minimize the required code changes and forwards the `Handler::Key()` calls to `Handler::String()` wherever possible in order to not break existing code; or at least not code deriving from `BaseReaderHandler` when implementing a custom `Handler`.
2014-09-03Check "fast path cases in disguise" in strtodmiloyip
2014-09-03Merge pull request #128 from pah/feature/cxx11-moveMilo Yip
Initial C++11 move support
2014-09-03Merge pull request #127 from pah/feature/value-different-allocatorsMilo Yip
GenericValue: accept values with different allocators for read-only access
2014-09-02Fallback strtod() when not able to do fast-pathmiloyip
This shall generate best possible precision (if strtod() is correctly implemented). Need more unit tests and performance tests. May add an option for accepting precision error. Otherwise LUT in Pow10() can be reduced.
2014-09-02Merge pull request #130 from pah/fixes/capacity-growthMilo Yip
GenericValue: reduce growth factor for array/object reallocations
2014-09-01fixed a compiler error not caught by VS2012...Kosta
2014-09-01allow the short string optimization to store one more characterKosta
The `ShortString` can represent zero-terminated strings up to `MaxSize` chars (excluding the terminating zero) and store a value to determine the length of the contained string in the last character `str[LenPos]` by storing `MaxSize - length` there. If the string to store has the maximal length of `MaxSize` (excluding the terminating zero) then `str[LenPos]` will store `0` and therefore act as the string terminator as well. For getting the string length back from that value just use `MaxSize - str[LenPos]`. This allows to store `11`-chars strings in 32-bit mode and `15`-chars strings in 64-bit mode inline (for `UTF8`-encoded strings).
2014-09-01GenericValue: round up during capacity growthPhilipp A. Hartmann
Suggested-by: @miloyip
2014-09-01code cleanup for `StringEqual()`Kosta
Instead of replicating the functionality of `GetString()` and `GetStringLength()` in `StringEqual()` it now calls these methods instead.
2014-09-01short string optimizationKosta
Since the payload (the `Data` union) of the current implementation of `GenericValue` is `12 bytes` (32 bit) or `16 bytes` (64 bit) it could store `UTF8`-encoded strings up to `10` or `14` chars plus the `terminating zero` character plus the string length: ``` C++ struct ShortString { enum { MaxSize = sizeof(GenericValue::String) / sizeof(Ch) - sizeof(unsigned char) }; Ch str[MaxSize]; unsigned char length; }; // at most as many bytes as "String" above => 12 bytes in 32-bit mode, 16 bytes in 64-bit mode ``` This is achieved by introducing additional `kInlineStrFlag` and `kShortStringFlag` flags. When setting a new string value in `SetStringRaw(s, alloc)` it is first checked if the string is short enough to fit into the `inline string buffer` and if so the given source string will be copied into the new `ShortString` target instead of allocating additional memory for it.
2014-09-01GenericValue: reduce growth factor for array/object reallocationsPhilipp A. Hartmann
As mentioned by @kosta-github in http://git.io/0gkYSg, the currently used growth factor of 2 is suboptimal for memory performance. An extensive discussion can be found at [1]. This patch reduces the array/object capacity growth factor to 1.5, as many C++ implementations have chosen to use. In order to avoid floating-point arithmetics for computing the new capacity, I did not add any customization parameter for the factor and used a shift+add instead. [1] https://github.com/facebook/folly/blob/master/folly/docs/FBVector.md
2014-09-01GenericStringRef: add NOEXCEPT, add ASSERTPhilipp A. Hartmann
* constructor from array is RAPIDJSON_NOEXCEPT * constructor from plain pointer missed an assert
2014-09-01GenericValue: add some more RAPIDJSON_NOEXCEPTPhilipp A. Hartmann
* Move() * RawAssign() * SetStringRaw()
2014-08-31GenericValue: fix comparison of (Ui|I)nt64 numbersPhilipp A. Hartmann
Some 64-bit integers cannot be represented losslessly as a double. Due to a typo in the operator==, the comparison has been performed after a double conversion in too many cases.
2014-08-31GenericValue: add RAPIDJSON_NOEXCEPTPhilipp A. Hartmann
Added basic detection of `noexcept` support for some compilers, added corresponding RAPIDJSON_NOEXCEPT annotations to * non-allocating constructors * (move) assignment * Swap
2014-08-31GenericValue: add rvalue-ref overloads to AddMember/PushBackPhilipp A. Hartmann
Directly allows temporary GenericValues as parameters: v.AddMember("foo", Value(s.c_str(),alloc), alloc);
2014-08-31always define RAPIDJSON_HAS_STDSTRING (default: 0)Philipp A. Hartmann
2014-08-31detect rvalue reference support (RAPIDJSON_HAS_CXX11_RVALUE_REFS)Philipp A. Hartmann
2014-08-31rapidjson.h: add RAPIDJSON_GNUC as GCC version shortcutPhilipp A. Hartmann
2014-08-31meta.h: disallow direct inclusionPhilipp A. Hartmann
2014-08-31always include "meta.h", as it is not only used for member iteratorsPhilipp A. Hartmann
2014-08-31GenericValue: add move constructor/move assignmentPhilipp A. Hartmann
When C++11 is enabled, several algorithms will fail, if GenericValue is neither copyable, nor movable. Cherry-picked from 8005b55.
2014-08-31GenericValue: add explicit operator!=(const Ch*)Philipp A. Hartmann
MSVC'2005 needs an explicit overload for operator!=(const Ch*) after the addition of the IsGenericValue SFINAE restrictions.
2014-08-31GenericValue: add and use IsGenericValue meta functionPhilipp A. Hartmann
This commit adds an IsGenericValue meta function to match arbitrary instantiations of the GenericValue template (or derived classes). This meta function is used in the SFINAE-checks to avoid matching the generic APIs (operator=,==,!=; AddMember, PushBack) for instances of the main template. This avoids ambiguities with the GenericValue overloads.