Skip to content

Conversation

scolin
Copy link
Contributor

@scolin scolin commented Apr 18, 2016

Hi,
this commit adds the ability to use loadBinaryFile at leisure, without having global state problems thereafter. The algorithm to do so is imho simple enough, without causing vid or ckey overflow if one is to save/reload the same file many times over several executions (the overflow problem could most probably arise realistically on 32bit OCaml, but I'd rather be cautious).

I did not add a test in the test suite, because cilly does not load/save binary files unfortunately. 😐

scolin added 2 commits April 14, 2016 20:08
This commit is in preparation to making the loading of several binary files
possible: for that visitCilFile is needed.
We add the ability to load several binary files at any moment, by inspecting
the binary file, computing a new mapping of its varinfo vid and compinfo
ckey fields so that they are compatible with the current nextGlobalVID and
nextCompinfoKey, and applying the mapping to the loaded file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant