mangle
Brad Roberts
braddr at puremagic.com
Mon Jul 5 22:21:59 PDT 2010
On 7/3/2010 11:34 AM, Jacob Carlborg wrote:
> On 2010-07-02 18.17, Ellery Newcomer wrote:
>> On 07/01/2010 08:16 PM, Adam Ruppe wrote:
>>> http://dpldocs.info/std.demangle
>>
>> import std.demangle;
>> import std.stdio;
>> void main(){
>>
>> writeln(demangle("_D3std6random156__T11RandomCoverTAiTS3std6random98__T21MersenneTwisterEngineTkVi32Vi624Vi397Vi31Vk2567483615Vi11Vi7Vk2636928640Vi15Vk4022730752Vi18Z21MersenneTwisterEngineZ11RandomCover4saveMFNdZS3std6random156__T11RandomCoverTAiTS3std6random98__T21MersenneTwisterEngineTkVi32Vi624Vi397Vi31Vk2567483615Vi11Vi7Vk2636928640Vi15Vk4022730752Vi18Z21MersenneTwisterEngineZ11RandomCover"));
>>
>>
>> }
>>
>> gives
>>
>> _D3std6random156__T11RandomCoverTAiTS3std6random98__T21MersenneTwisterEngineTkVi32Vi624Vi397Vi31Vk2567483615Vi11Vi7Vk2636928640Vi15Vk4022730752Vi18Z21MersenneTwisterEngineZ11RandomCover4saveMFNdZS3std6random156__T11RandomCoverTAiTS3std6random98__T21MersenneTwisterEngineTkVi32Vi624Vi397Vi31Vk2567483615Vi11Vi7Vk2636928640Vi15Vk4022730752Vi18Z21MersenneTwisterEngineZ11RandomCover
>>
>>
>
> std.demangle is incomplete, missing newer D2 features like return by reference,
> and incorrectly handles floating point numbers in tempaltes. If it encounters
> something it can't demangle it will just return the original mangled name.
Obviously any failures to demangle symbols produced by the compiler is a bug and
should be treated as such.. so.. please file 'em.
Thanks,
Brad
More information about the Digitalmars-d
mailing list