diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2017-09-25 19:16:17 -0700 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2017-09-25 19:31:18 -0700 |
commit | a567f12d76b97c6336b4e3ef34767440182eade6 (patch) | |
tree | 756b9b0c9d258ef3f46ec9026d70a78451055529 /tests/fuzz_parse.dict | |
parent | a569e6a737714d33fe30284abcc2f1af1f856127 (diff) |
Implement move support for xml_document
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.
Diffstat (limited to 'tests/fuzz_parse.dict')
0 files changed, 0 insertions, 0 deletions