demangle doesn't work with __ModuleInfoZ __initZ __arrayZ

David Nadlinger see at klickverbot.at
Mon May 27 09:18:33 PDT 2013


On Monday, 27 May 2013 at 15:22:21 UTC, Peter Alexander wrote:
> Am I the only person that worries greatly about the length of 
> symbols in D?

No, I do as well. My units of measurement project suffered from 
very non-negligible code bloat due to symbol name length, and 
even if that was a rather extraordinary endeavor to begin with, 
"normal" D code is affected just as well. For example, try this 
one from the std.algorithm unit tests:

———
_D3std5range4308__T3ZipTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTkZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std9algorithm987__T6joinerTS3std9algorithm182__T16cartesianProductTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ16cartesianProduct744__T9MapResultS2353std9algorithm182__T16cartesianProductTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ16cartesianProduct16__funcliteral177TS3std5range472__T3ZipTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTkZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatZ3ZipZ9MapResultZ6joinerFS3std9algorithm182__T16cartesianProductTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ16cartesianProduct744__T9MapResultS2353std9algorithm182__T16cartesianProductTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ16cartesianProduct16__funcliteral177TS3std5range472__T3ZipTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTkZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatZ3ZipZ9MapResultZ6ResultTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatTS3std5range2008__T6RepeatTS3std9algorithm987__T6joinerTS3std9algorithm182__T16cartesianProductTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ16cartesianProduct744__T9MapResultS2353std9algorithm182__T16cartesianProductTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ16cartesianProduct16__funcliteral177TS3std5range472__T3ZipTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTkZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatZ3ZipZ9MapResultZ6joinerFS3std9algorithm182__T16cartesianProductTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ16cartesianProduct744__T9MapResultS2353std9algorithm182__T16cartesianProductTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ16cartesianProduct16__funcliteral177TS3std5range472__T3ZipTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTkZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatZ3ZipZ9MapResultZ6ResultZ6RepeatZ3Zip8opAssignMFNcS3std5range4308__T3ZipTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTkZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std9algorithm987__T6joinerTS3std9algorithm182__T16cartesianProductTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ16cartesianProduct744__T9MapResultS2353std9algorithm182__T16cartesianProductTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ16cartesianProduct16__funcliteral177TS3std5range472__T3ZipTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTkZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatZ3ZipZ9MapResultZ6joinerFS3std9algorithm182__T16cartesianProductTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ16cartesianProduct744__T9MapResultS2353std9algorithm182__T16cartesianProductTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ16cartesianProduct16__funcliteral177TS3std5range472__T3ZipTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTkZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatZ3ZipZ9MapResultZ6ResultTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatTS3std5range2008__T6RepeatTS3std9algorithm987__T6joinerTS3std9algorithm182__T16cartesianProductTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ16cartesianProduct744__T9MapResultS2353std9algorithm182__T16cartesianProductTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ16cartesianProduct16__funcliteral177TS3std5range472__T3ZipTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTkZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatZ3ZipZ9MapResultZ6joinerFS3std9algorithm182__T16cartesianProductTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ16cartesianProduct744__T9MapResultS2353std9algorithm182__T16cartesianProductTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ16cartesianProduct16__funcliteral177TS3std5range472__T3ZipTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTkZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatZ3ZipZ9MapResultZ6ResultZ6RepeatZ3ZipZS3std5range4308__T3ZipTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTkZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std9algorithm987__T6joinerTS3std9algorithm182__T16cartesianProductTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ16cartesianProduct744__T9MapResultS2353std9algorithm182__T16cartesianProductTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ16cartesianProduct16__funcliteral177TS3std5range472__T3ZipTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTkZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatZ3ZipZ9MapResultZ6joinerFS3std9algorithm182__T16cartesianProductTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ16cartesianProduct744__T9MapResultS2353std9algorithm182__T16cartesianProductTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ16cartesianProduct16__funcliteral177TS3std5range472__T3ZipTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTkZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatZ3ZipZ9MapResultZ6ResultTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatTS3std5range2008__T6RepeatTS3std9algorithm987__T6joinerTS3std9algorithm182__T16cartesianProductTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ16cartesianProduct744__T9MapResultS2353std9algorithm182__T16cartesianProductTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ16cartesianProduct16__funcliteral177TS3std5range472__T3ZipTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTkZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatZ3ZipZ9MapResultZ6joinerFS3std9algorithm182__T16cartesianProductTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ16cartesianProduct744__T9MapResultS2353std9algorithm182__T16cartesianProductTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ16cartesianProduct16__funcliteral177TS3std5range472__T3ZipTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTkZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatTS3std5range91__T6RepeatTS3std5range57__T8SequenceVAyaa1_6eTS3std8typecons12__T5TupleTiZ5TupleZ8SequenceZ6RepeatZ3ZipZ9MapResultZ6ResultZ6RepeatZ3Zip
———

That's 13 kilobytes of data for a single symbol name! And the 
whole file also crashes the MinGW as when debug info generation 
is enabled, with the following rather hilarious error message:

"Fatal error: can't close 
N:/Build/Work/ldc2-llvm3.3-release/runtime/phobos_std_algorithm_debug.o: 
File too big"

So, yes, your guess on Twitter a few days ago was correct.

David


More information about the Digitalmars-d mailing list