Long symbol names (Was: demangle doesn't work with...)

Walter Bright newshound2 at digitalmars.com
Fri Dec 6 15:26:53 PST 2013


On 5/27/2013 11:14 AM, Peter Alexander wrote:
> The symbols typically contain a lot of repeated sub strings. Perhaps there is a
> better mangling scheme that encodes it with some kind of prefix tree?

Rather than a new scheme, a simple and effective approach is to compress using 
lzw. Lzw is nicely reversible, too, though the symbols will look like tty noise 
in the linker maps and the debugger.

One approach is to lzw them only if they exceed a certain length, and to leave a 
prefix that makes some sense to the user, like the function name.



More information about the Digitalmars-d mailing list