|
From: John R. <jr...@bi...> - 2017-09-01 14:03:56
|
>> If you are considering translating the entire program and caching it, I >> think that would be much faster, > > Mhm, but then you have the problem of finding all the code that is part of > the program, which is equivalent to solving the halting problem. In practice is it not that hard; I've done it twice. Transitive closure of lexical calls, using as roots the .e_entry and all the function symbols, goes a long way. The rest is covered by C++ virtual function tables (or equivalent), and recognizing the code for 'switch' statements. (Yeah, that's ugly+heuristic+compiler-dependent, but it works well enough after a few iterations.) -- |