[Edoc-main] Skip throw() function pointers?
Status: Beta
Brought to you by:
bjcosta
From: Niko R. <nr...@mb...> - 2007-11-23 11:54:40
|
Is it a valid idea to have EDoc++ skip pointers to functions that are specified not to throw? I'm running edoc on a medium sized program (50 kLOC) that uses lots of function pointers for various callback activities. After first processing the easy functions quite fast, it's running into an endless mess of "the special recursion case", slowly consuming more and more memory and taking at least an hour with a single function's call tree. My guess is, there is a serious combinatorial explosion of possible (as far as edoc knows) call graph loops, caused by lots of functions with identical signatures having their address taken and their own call graph again containing function pointer calls. However, most of the functions whose address is taken are declared throw(), and therefore shouldn't be interesting to potential callers from an exception viewpoint. I've tried a simple patch (attached) that simply ignores those functions, and it seems to work fine. The program in question is analysed in 30 seconds. If this is a valid approach, perhaps it could also be used to prune direct and virtual calls to non-throwing functions. But maybe there is some benefit in expanding those functions in the call graph, that I don't see? Of course this wouldn't help if the functions weren't throw(), but I didn't have enough interest to try to figure what else might be wrong, if indeed there is much that can be done without writing an extensive list of suppressions, restructuring the target program or rethinking the way EDoc++ propagates exception information. If you're interested and can give me something simplish to try, I will be happy to. PS. Loving the idea of EDoc++. I think it is really making exceptions in C++ comfortable to work with. It's already found me a bug in an existing program. -- Niko Ritari |