Skip to content
Snippets Groups Projects
  1. Oct 26, 2017
  2. Oct 21, 2017
    • Arseny Kapoulkine's avatar
      Clarify a note about compact hash behavior during move · 3af93a39
      Arseny Kapoulkine authored
      After move some nodes in the hash table can have keys that point to
      other; this makes the table somewhat larger but this does not impact
      correctness.
      
      The reason is that for us to access a key in the hash table, there
      should be a compact_pointer/string object with the state indicating that
      it is stored in a hash table, and with the address matching the key. For
      this to happen, we had to have put this object into this state which
      would mean that we'd overwrite the hash entry with the new, correct
      value.
      
      When nodes/pages are being removed, we do not clean up keys from the
      hash table - it's safe for the same reason, and thus move doesn't
      introduce additional contracts here.
      3af93a39
    • Arseny Kapoulkine's avatar
      tests: Add more move tests · b0fc587a
      Arseny Kapoulkine authored
      We now check that appending a child to a moved document performs no
      allocations - this is already the case, but if we neglected to copy the
      allocator state this test would fail.
      b0fc587a
  3. Sep 26, 2017
    • Arseny Kapoulkine's avatar
      tests: Adjust move coverage tests · 50bc0d5a
      Arseny Kapoulkine authored
      Large test wasn't testing shared parent condition properly - add one
      more level of hierarchy so that it works as expected.
      50bc0d5a
    • Arseny Kapoulkine's avatar
      tests: Add more move tests · 26ead385
      Arseny Kapoulkine authored
      Add a test that checks that static buffer pointer was moved correctly
      by checking if offset_debug still works.
      26ead385
    • Arseny Kapoulkine's avatar
      tests: Add more move tests · 402b967f
      Arseny Kapoulkine authored
      Make sure we have coverage for empty documents and for large documents
      that trigger compact_shared_parent != root for some pages.
      402b967f
    • Arseny Kapoulkine's avatar
      tests: Add more document move tests · faba4786
      Arseny Kapoulkine authored
      Verify that move doesn't allocate and that it preserves structures
      required for tree memory management and append_buffer in tact.
      faba4786
    • Arseny Kapoulkine's avatar
      Fix -Wshadow warning · febf25d1
      Arseny Kapoulkine authored
      febf25d1
    • Arseny Kapoulkine's avatar
      tests: Add basic move tests · 6eb7519d
      Arseny Kapoulkine authored
      These just verify that move ctor/assignment operator work as expected in
      simple cases - there are a number of ways in which the internal
      structure can be incorrect...
      6eb7519d
    • Arseny Kapoulkine's avatar
      Implement move support for xml_document · a567f12d
      Arseny Kapoulkine authored
      This change implements the initial version of move construction and
      assignment support for documents.
      
      When moving a document to another document, we always make sure move
      target is in "clean" state (empty document), and proceed by relocating
      all structures in the most efficient way possible.
      
      Complications arise from the fact that the root (document) node is
      embedded into xml_document object, so all pointers to it have to change;
      this includes parent pointers of all first-level children as well as
      allocator pointers in all memory pages and previous pointer in the first
      on-heap memory page.
      
      Additionally, compact mode makes everything even more complicated
      because some of the pointers we need to update are stored in the hash
      table (in fact, document first_child pointer is very likely to be there;
      some parent pointers in first-level children will be using
      compact_shared_parent but some won't be) which requires allocating a new
      hash table which can fail.
      
      Some details of this process are not fully fleshed out, especially for
      compact mode; and this definitely requires many tests.
      a567f12d
  4. Sep 25, 2017
  5. Aug 30, 2017
  6. Aug 22, 2017
    • Arseny Kapoulkine's avatar
      docs: Update encoding conversion description · 4f2ad720
      Arseny Kapoulkine authored
      We support Latin-1 and automatically detect it by parsing the encoding
      from document declaration; both of these were omitted from the
      description of the automatic detection.
      
      Additionally, the description has been rewritten to be more concise and
      a bit more abstract - there's no need to specify the algorithm precisely
      here.
      
      Fixes #158.
      4f2ad720
  7. Aug 20, 2017
  8. Aug 18, 2017
    • Arseny Kapoulkine's avatar
      scripts: Disable LTCG for VS2017 · f423cec1
      Arseny Kapoulkine authored
      Using LTCG restricts the resulting .lib files to a specific compiler
      version, causing version conflicts when the compiler gets updated
      without changing the toolset version. VS2017 now has two incompatible
      compilers, 15.0 and 15.3, both of which use toolset v141...
      f423cec1
  9. Jul 18, 2017
    • Arseny Kapoulkine's avatar
      Fix Clang/C2 compatibility · 77d7e603
      Arseny Kapoulkine authored
      Clang/C2 does not implement __builtin_expect; additionally we need to
      work around deprecation warnings for fopen by disabling them.
      77d7e603
  10. Jun 29, 2017
  11. Jun 23, 2017
  12. Jun 22, 2017
  13. Jun 21, 2017
  14. Jun 19, 2017
  15. Jun 17, 2017
Loading