1. 01 Sep, 2014 3 commits
    • Kosta's avatar
      code cleanup for `StringEqual()` · b92d0ebd
      Kosta authored
      Instead of replicating the functionality of `GetString()` and `GetStringLength()` in `StringEqual()` it now calls these methods instead.
      b92d0ebd
    • Kosta's avatar
      short string optimization · 3caa86c9
      Kosta authored
      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.
      3caa86c9
    • Milo Yip's avatar
      Merge pull request #129 from pah/bug/compare-uint64-double · 2a4e0555
      Milo Yip authored
      Failing comparisons between certain (Ui|I)nt64 numbers
      2a4e0555
  2. 31 Aug, 2014 2 commits
  3. 30 Aug, 2014 7 commits
  4. 28 Aug, 2014 6 commits
  5. 27 Aug, 2014 2 commits
  6. 26 Aug, 2014 3 commits
  7. 23 Aug, 2014 2 commits
  8. 21 Aug, 2014 5 commits
  9. 20 Aug, 2014 8 commits
  10. 19 Aug, 2014 2 commits