I'm too tired to write this properly, but it's satisfying enough to do before I quit. If you've been following my progress, you'll know that I've been trying to solve Dave's mxr-dehydra challenge, looking for all possible methods that SetParent could be in
privatePrevAccessible->SetParent(this) (which is really
nsPIAccessible->SetParent(nsIAccessible*)). As Dave discovered the hard way, there are two. Using my code, which builds a SQLite database of the tree's type info while you build, I can do it in a fraction of a second:
sqlite> select members.mtname, members.mdecl, members.mdef from impl, members where impl.tbase="nsPIAccessible" and impl.tconcrete=members.mtname and mname="SetParent(nsIAccessible*)"; mtname|mdecl|mdef nsAccessible|/home/dave/mozilla-central/src/accessible/src/base/nsAccessible.h:111|/home/dave/mozilla-central/src/accessible/src/base/nsAccessible.cpp:460 nsHTMLListBulletAccessible|/home/dave/mozilla-central/src/accessible/src/html/nsHTMLTextAccessible.h:110|/home/dave/mozilla-central/src/accessible/src/html/nsHTMLTextAccessible.cpp:338
This shows the declaration and definition of
nsHTMLListBulletAccessbile::SetParent. I've written a dehydra script to generate .sql files for everything that gets compiled, and then a script to assemble these into a simple database (~45M) that can be queried about any class/type, member, or inheritance relationship in the tree.
I've run into all sorts of strange edge cases over the past two days, but it's getting pretty close. The cases I've tested work, which isn't the same as saying it works. I'm going to try and iron out some more of the bugs I know about, and then move on to solving the problem of how to map tokenized source to the output of
process_function(), which breaks down all the variables, assignments, function calls within the code. The thought of it overwhelms me tonight, and it's enough to make me want to quit for the weekend. But I'm quitting with a smile on my face :).