Closed m4b closed 7 years ago
I hate coveralls spamming this and other PRs; is there anything we can do about it?
This will fail; that test entry_split
in function is failing again. Dunno how to fix it. Since entry point is basically a requirement for functions now, it might be inapplicable.
@flanfly I think I should stop around here. There are some things I'd like to continue with but I think this PR is getting too big and it's probably a good stopping point anyway.
I will remove the into iterator impl from VertexGraph in favor of a Labels associated trait + method using the hashtable iterator to match the mutable versions, and call that directly instead of into_iter where appropriate.
I'll then write up the gist of the new function API and also provide some examples (probably should add this to docs as well)
Ok @flanfly, I fixed the last test, and added a cont
function method to the api for more flexibility (I think it's actually good it's there, hard to see how they will be used/constructed in the future).
I would like to see this reviewed+merged soon if possible/when you have time.
I think it's pretty solid at this point, modulo any concerns you have of course.
@flanfly It looks like OSX build stalled on QT, not sure why.
So we ready to merge this?
Thanks for the hard work and your patience!
NP!
This PR:
Function API
Examples
Iteration is much easier, whether it's the call graph of the program, the cfg of the function, the basic blocks of the function, or the statements of the basic block, etc.
For example, the difference is striking in some places:
after:
Iterating a basic block and its statements is natural and easy now, e.g.:
Similarly,
entry_point
is now a basic block, and is guaranteed to exist (unless you construct a function usingFunction::undefined
- don't do that!)