Closed Tisten closed 1 year ago
This looks great 👍
I should note that the backwards compat is written based on "how it ought to work", and I haven't added proper tests for it. :(
Before merging I would like to, at least, discuss "void*" mentioned above.... otherwise consider this merged :)
For my benchmark test (8,5MB of binary data with a lot of pointers in unions), it used to take 1.92 seconds to patch the pointers on my machine. After this change it takes 0.00056 seconds to do the same thing.
Changing the base address which pointer offsets are calculated from to be the header address instead of the instance root. This means that DL_INSTANCE_VERSION needed to be bumped to 2. There is backwards compatibility added so old data can be read and re-saved.
Also added more CMake rules, to simplify building and testing on other platforms than Windows.