Lines Matching +full:- +full:r
43 RAPIDJSON_DIAG_OFF(old-style-cast)
45 RAPIDJSON_DIAG_OFF(switch-enum)
135 \brief User-defined kParseDefaultFlags definition.
148 kParseInsituFlag = 1, //!< In-situ(destructive) parsing.
153 kParseCommentsFlag = 32, //!< Allow one-line (//) and multi-line (/**/) comments.
156 …kParseNanAndInfFlag = 256, //!< Allow parsing NaN, Inf, Infinity, -Inf and -Infinity as doubl…
179 /// enabled via kParseNumbersAsStringsFlag, string is not null-terminated (use length)
211 /// enabled via kParseNumbersAsStringsFlag, string is not null-terminated (use length)
271 while ((c = s.Peek()) == ' ' || c == '\n' || c == '\r' || c == '\t') in SkipWhitespace()
276 while (p != end && (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t')) in SkipWhitespace()
282 //! Skip whitespace with SSE 4.2 pcmpistrm instruction, testing 16 8-byte characters at once.
284 // Fast return for single non-whitespace in SkipWhitespace_SIMD()
285 if (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t') in SkipWhitespace_SIMD()
290 // 16-byte align to the next boundary in SkipWhitespace_SIMD()
293 if (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t') in SkipWhitespace_SIMD()
299 static const char whitespace[16] = " \n\r\t"; in SkipWhitespace_SIMD()
304 …const int r = _mm_cmpistri(w, s, _SIDD_UBYTE_OPS | _SIDD_CMP_EQUAL_ANY | _SIDD_LEAST_SIGNIFICANT |… in SkipWhitespace_SIMD() local
305 if (r != 16) // some of characters is non-whitespace in SkipWhitespace_SIMD()
306 return p + r; in SkipWhitespace_SIMD()
311 // Fast return for single non-whitespace in SkipWhitespace_SIMD()
312 if (p != end && (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t')) in SkipWhitespace_SIMD()
318 static const char whitespace[16] = " \n\r\t"; in SkipWhitespace_SIMD()
321 for (; p <= end - 16; p += 16) { in SkipWhitespace_SIMD()
323 …const int r = _mm_cmpistri(w, s, _SIDD_UBYTE_OPS | _SIDD_CMP_EQUAL_ANY | _SIDD_LEAST_SIGNIFICANT |… in SkipWhitespace_SIMD() local
324 if (r != 16) // some of characters is non-whitespace in SkipWhitespace_SIMD()
325 return p + r; in SkipWhitespace_SIMD()
333 //! Skip whitespace with SSE2 instructions, testing 16 8-byte characters at once.
335 // Fast return for single non-whitespace in SkipWhitespace_SIMD()
336 if (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t') in SkipWhitespace_SIMD()
341 // 16-byte align to the next boundary in SkipWhitespace_SIMD()
344 if (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t') in SkipWhitespace_SIMD()
351 static const char whitespaces[4][16] = { C16(' '), C16('\n'), C16('\r'), C16('\t') }; in SkipWhitespace_SIMD()
365 unsigned short r = static_cast<unsigned short>(~_mm_movemask_epi8(x)); in SkipWhitespace_SIMD() local
366 if (r != 0) { // some of characters may be non-whitespace in SkipWhitespace_SIMD()
367 #ifdef _MSC_VER // Find the index of first non-whitespace in SkipWhitespace_SIMD()
369 _BitScanForward(&offset, r); in SkipWhitespace_SIMD()
372 return p + __builtin_ffs(r) - 1; in SkipWhitespace_SIMD()
379 // Fast return for single non-whitespace in SkipWhitespace_SIMD()
380 if (p != end && (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t')) in SkipWhitespace_SIMD()
387 static const char whitespaces[4][16] = { C16(' '), C16('\n'), C16('\r'), C16('\t') }; in SkipWhitespace_SIMD()
395 for (; p <= end - 16; p += 16) { in SkipWhitespace_SIMD()
401 unsigned short r = static_cast<unsigned short>(~_mm_movemask_epi8(x)); in SkipWhitespace_SIMD() local
402 if (r != 0) { // some of characters may be non-whitespace in SkipWhitespace_SIMD()
403 #ifdef _MSC_VER // Find the index of first non-whitespace in SkipWhitespace_SIMD()
405 _BitScanForward(&offset, r); in SkipWhitespace_SIMD()
408 return p + __builtin_ffs(r) - 1; in SkipWhitespace_SIMD()
418 //! Skip whitespace with ARM Neon instructions, testing 16 8-byte characters at once.
420 // Fast return for single non-whitespace in SkipWhitespace_SIMD()
421 if (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t') in SkipWhitespace_SIMD()
426 // 16-byte align to the next boundary in SkipWhitespace_SIMD()
429 if (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t') in SkipWhitespace_SIMD()
436 const uint8x16_t w2 = vmovq_n_u8('\r'); in SkipWhitespace_SIMD()
464 // Fast return for single non-whitespace in SkipWhitespace_SIMD()
465 if (p != end && (*p == ' ' || *p == '\n' || *p == '\r' || *p == '\t')) in SkipWhitespace_SIMD()
472 const uint8x16_t w2 = vmovq_n_u8('\r'); in SkipWhitespace_SIMD()
475 for (; p <= end - 16; p += 16) { in SkipWhitespace_SIMD()
522 //! SAX-style JSON parser. Use \ref Reader for UTF8 encoding and default allocator.
527 non-destructive parsing.
529 For in-situ parsing, the decoded string is directly written to the source
544 …/*! \param stackAllocator Optional allocator for allocating stack memory. (Only use for non-destru…
545 …tack capacity in bytes for storing a single decoded string. (Only use for non-destructive parsing)
604 //! Initialize JSON text token-by-token parsing
642 // ... and extra non-whitespace data is found... in IterativeParseNext()
674 //! Check if token-by-token parsing JSON text is complete
702 explicit ClearStackOnExit(GenericReader& r) : r_(r) {} in ClearStackOnExit()
873 if (RAPIDJSON_LIKELY(Consume(is, 'r') && Consume(is, 'u') && Consume(is, 'e'))) { in ParseTrue()
913 codepoint -= '0'; in ParseHex4()
915 codepoint -= 'A' - 10; in ParseHex4()
917 codepoint -= 'a' - 10; in ParseHex4()
971 size_t length = s.PutEnd(head) - 1;
980 SizeType length = static_cast<SizeType>(stackStream.Length()) - 1;
998 0, 0,'\r', 0,'\t', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, in ParseStringToStream()
1029 // Handle UTF-16 surrogate pair in ParseStringToStream()
1036 … codepoint = (((codepoint - 0xD800) << 10) | (codepoint2 - 0xDC00)) + 0x10000; in ParseStringToStream()
1051 os.Put('\0'); // null-terminate the string in ParseStringToStream()
1054 …LIKELY(static_cast<unsigned>(c) < 0x20)) { // RFC 4627: unescaped = %x20-21 / %x23-5B / %x5D-10FFFF in ParseStringToStream()
1076 // StringStream -> StackStream<char>
1104 unsigned short r = static_cast<unsigned short>(_mm_movemask_epi8(x)); in ScanCopyUnescapedString() local
1105 if (RAPIDJSON_UNLIKELY(r != 0)) { // some of characters is escaped in ScanCopyUnescapedString()
1109 _BitScanForward(&offset, r); in ScanCopyUnescapedString()
1112 length = static_cast<SizeType>(__builtin_ffs(r) - 1); in ScanCopyUnescapedString()
1129 // InsituStringStream -> InsituStringStream
1167 unsigned short r = static_cast<unsigned short>(_mm_movemask_epi8(x)); in ScanCopyUnescapedString() local
1168 if (RAPIDJSON_UNLIKELY(r != 0)) { // some of characters is escaped in ScanCopyUnescapedString()
1172 _BitScanForward(&offset, r); in ScanCopyUnescapedString()
1175 length = static_cast<size_t>(__builtin_ffs(r) - 1); in ScanCopyUnescapedString()
1215 unsigned short r = static_cast<unsigned short>(_mm_movemask_epi8(x)); in SkipUnescapedString() local
1216 if (RAPIDJSON_UNLIKELY(r != 0)) { // some of characters is escaped in SkipUnescapedString()
1220 _BitScanForward(&offset, r); in SkipUnescapedString()
1223 length = static_cast<size_t>(__builtin_ffs(r) - 1); in SkipUnescapedString()
1233 // StringStream -> StackStream<char>
1293 // InsituStringStream -> InsituStringStream
1484 bool minus = Consume(s, '-'); in ParseNumber()
1486 // Parse int: zero / ( digit1-9 *DIGIT ) in ParseNumber()
1496 i = static_cast<unsigned>(s.TakePush() - '0'); in ParseNumber()
1507 i = i * 10 + static_cast<unsigned>(s.TakePush() - '0'); in ParseNumber()
1512 if (RAPIDJSON_UNLIKELY(i >= 429496729)) { // 2^32 - 1 = 4294967295 in ParseNumber()
1519 i = i * 10 + static_cast<unsigned>(s.TakePush() - '0'); in ParseNumber()
1533 … d = (minus ? -std::numeric_limits<double>::infinity() : std::numeric_limits<double>::infinity()); in ParseNumber()
1561 i64 = i64 * 10 + static_cast<unsigned>(s.TakePush() - '0'); in ParseNumber()
1566 …DJSON_UNLIKELY(i64 >= RAPIDJSON_UINT64_C2(0x19999999, 0x99999999))) // 2^64 - 1 = 1844674407370955… in ParseNumber()
1572 i64 = i64 * 10 + static_cast<unsigned>(s.TakePush() - '0'); in ParseNumber()
1580 d = d * 10 + (s.TakePush() - '0'); in ParseNumber()
1584 // Parse frac = decimal-point 1*DIGIT in ParseNumber()
1595 // Use i64 to store significand in 64-bit architecture in ParseNumber()
1600 if (i64 > RAPIDJSON_UINT64_C2(0x1FFFFF, 0xFFFFFFFF)) // 2^53 - 1 for fast path in ParseNumber()
1603 i64 = i64 * 10 + static_cast<unsigned>(s.TakePush() - '0'); in ParseNumber()
1604 --expFrac; in ParseNumber()
1612 // Use double to store significand in 32-bit architecture in ParseNumber()
1620 d = d * 10.0 + (s.TakePush() - '0'); in ParseNumber()
1621 --expFrac; in ParseNumber()
1643 else if (Consume(s, '-')) in ParseNumber()
1647 exp = static_cast<int>(s.Take() - '0'); in ParseNumber()
1649 // (exp + expFrac) must not underflow int => we're detecting when -exp gets in ParseNumber()
1653 // -(exp * 10 + 9) + expFrac >= INT_MIN in ParseNumber()
1654 // <=> exp <= (expFrac - INT_MIN - 9) / 10 in ParseNumber()
1659 exp = exp * 10 + static_cast<int>(s.Take() - '0'); in ParseNumber()
1667 int maxExp = 308 - expFrac; in ParseNumber()
1669 exp = exp * 10 + static_cast<int>(s.Take() - '0'); in ParseNumber()
1679 exp = -exp; in ParseNumber()
1689 const size_t length = s.Tell() - startOffset; in ParseNumber()
1699 while (numCharsToCopy--) { in ParseNumber()
1704 const SizeType length = static_cast<SizeType>(dstStream.Length()) - 1; in ParseNumber()
1719 // Use > max, instead of == inf, to fix bogus warning -Wfloat-equal in ParseNumber()
1726 cont = handler.Double(minus ? -d : d); in ParseNumber()
1845 // current state x one lookahead token -> new state in Predict()
2058 // Must be non-compound value. Or it would be ObjectInitial or ArrayInitial state. in Transit()
2066 // Must be non-compound value. Or it would be ObjectInitial or ArrayInitial state. in Transit()
2145 // The IterativeParsingStartState is not enumerated in this switch-case. in Transit()
2148 // The IterativeParsingFinishState is not enumerated in this switch-case either. in Transit()
2153 // Must be non-compound value. Or it would be ObjectInitial or ArrayInitial state. in Transit()
2227 …cator> stack_; //!< A stack for storing decoded string temporarily during non-destructive parsing.