Jump to page: 1 2
Thread overview
[phobos] core.demangle replacing std.demangle?
Sep 10, 2010
Jacob
Sep 10, 2010
Sean Kelly
Sep 10, 2010
Jacob
Sep 10, 2010
David Simcha
Sep 10, 2010
Denis
Sep 10, 2010
Sean Kelly
Sep 11, 2010
Jonathan M Davis
Sep 25, 2010
Rainer Schuetze
Sep 25, 2010
Sean Kelly
Sep 26, 2010
Rainer Schuetze
September 10, 2010
I've noticed that Sean has recently added the core.demangle module to druntime.  Does this mean we can deprecate std.demangle?  I've never used it myself, but I seem to remember people saying on the NG that it is pretty outdated.

-Lars

September 10, 2010
On 10 sep 2010, at 10:12, Lars Tandle Kyllingstad wrote:

> I've noticed that Sean has recently added the core.demangle module to druntime.  Does this mean we can deprecate std.demangle?  I've never used it myself, but I seem to remember people saying on the NG that it is pretty outdated.
> 
> -Lars
> 
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos


I've used the demangler and can verify that the is outdated. These are the bugs I encountered:

std.demangle incorrectly handles template floating point numbers http://d.puremagic.com/issues/show_bug.cgi?id=4323

std.demangle doesn't parse ref, pure, nothrow http://d.puremagic.com/issues/show_bug.cgi?id=3334

I've not used the new demangler in druntime but at least I has code for demangling the function types mentioned in bug 3334.

-- 
/Jacob Carlborg

September 10, 2010
I wasn't sure whether to fix std.demangle now that core.demangle works, or to replace/deprecate it.  At the time I just needed something in druntime and I didn't like how std.demangle did everything via string ops. What do you all think?

Sent from my iPhone

On Sep 10, 2010, at 1:12 AM, Lars Tandle Kyllingstad <lars at kyllingen.net> wrote:

> I've noticed that Sean has recently added the core.demangle module to druntime.  Does this mean we can deprecate std.demangle?  I've never used it myself, but I seem to remember people saying on the NG that it is pretty outdated.
> 
> -Lars
> 
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
September 10, 2010
Seems unnecessary to have two demanglers and since the one in Phobos doesn't work correctly I suggest it should be removed.

On 10 sep 2010, at 16:01, Sean Kelly wrote:

> I wasn't sure whether to fix std.demangle now that core.demangle works, or to replace/deprecate it.  At the time I just needed something in druntime and I didn't like how std.demangle did everything via string ops. What do you all think?
> 
> Sent from my iPhone
> 
> On Sep 10, 2010, at 1:12 AM, Lars Tandle Kyllingstad <lars at kyllingen.net> wrote:
> 
>> I've noticed that Sean has recently added the core.demangle module to druntime.  Does this mean we can deprecate std.demangle?  I've never used it myself, but I seem to remember people saying on the NG that it is pretty outdated.
>> 
>> -Lars
>> 
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos

-- 
/Jacob Carlborg

September 10, 2010
Remove std.demangle and continue maintaining core.demangle.

Andrei

On 9/10/10 9:01 CDT, Sean Kelly wrote:
> I wasn't sure whether to fix std.demangle now that core.demangle works, or to replace/deprecate it.  At the time I just needed something in druntime and I didn't like how std.demangle did everything via string ops. What do you all think?
>
> Sent from my iPhone
>
> On Sep 10, 2010, at 1:12 AM, Lars Tandle Kyllingstad<lars at kyllingen.net>  wrote:
>
>> I've noticed that Sean has recently added the core.demangle module to druntime.  Does this mean we can deprecate std.demangle?  I've never used it myself, but I seem to remember people saying on the NG that it is pretty outdated.
>>
>> -Lars
>>
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
September 10, 2010
I tried to use core.demangle to print human-readable profiling reports and it still seems to fail horribly on some symbols.  The un-demanglable symbols seem to  be really complicated template instantiations, like randomShuffle!(chain!(... .  IIRC there's some fundamental limitation where once a symbol gets huge DMD relies on hashing, so the mangling no longer has an inverse.  Is this true, or is it worth spending some time trying to create a decent test case?

On Fri, Sep 10, 2010 at 10:14 AM, Andrei Alexandrescu <andrei at erdani.com>wrote:

> Remove std.demangle and continue maintaining core.demangle.
>
> Andrei
>
>
> On 9/10/10 9:01 CDT, Sean Kelly wrote:
>
>> I wasn't sure whether to fix std.demangle now that core.demangle works, or to replace/deprecate it.  At the time I just needed something in druntime and I didn't like how std.demangle did everything via string ops. What do you all think?
>>
>> Sent from my iPhone
>>
>> On Sep 10, 2010, at 1:12 AM, Lars Tandle Kyllingstad<lars at kyllingen.net>
>>  wrote:
>>
>>  I've noticed that Sean has recently added the core.demangle module to
>>> druntime.  Does this mean we can deprecate std.demangle?  I've never used it myself, but I seem to remember people saying on the NG that it is pretty outdated.
>>>
>>> -Lars
>>>
>>> _______________________________________________
>>> phobos mailing list
>>> phobos at puremagic.com
>>> http://lists.puremagic.com/mailman/listinfo/phobos
>>>
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
>>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/phobos/attachments/20100910/31b9fa4f/attachment.html>
September 10, 2010
On Fri, Sep 10, 2010 at 8:37 PM, David Simcha <dsimcha at gmail.com> wrote:
> I tried to use core.demangle to print human-readable profiling reports and it still seems to fail horribly on some symbols.? The un-demanglable symbols seem to? be really complicated template instantiations, like randomShuffle!(chain!(... .? IIRC there's some fundamental limitation where once a symbol gets huge DMD relies on hashing, so the mangling no longer has an inverse.? Is this true, or is it worth spending some time trying to create a decent test case?
>

The following issue I reported over a year ago might help: http://d.puremagic.com/issues/show_bug.cgi?id=2238

There is also a small test case.
September 10, 2010
I don't think the compression is mentioned in the ABI, so core.demangle won't handle it correctly.  I'll take a look at the DMD source and see what can be done.  Hopefully there's some easy way for a parser to recognize that a symbol is compressed.

On Sep 10, 2010, at 9:37 AM, David Simcha wrote:

> I tried to use core.demangle to print human-readable profiling reports and it still seems to fail horribly on some symbols.  The un-demanglable symbols seem to  be really complicated template instantiations, like randomShuffle!(chain!(... .  IIRC there's some fundamental limitation where once a symbol gets huge DMD relies on hashing, so the mangling no longer has an inverse.  Is this true, or is it worth spending some time trying to create a decent test case?
> 
> On Fri, Sep 10, 2010 at 10:14 AM, Andrei Alexandrescu <andrei at erdani.com> wrote: Remove std.demangle and continue maintaining core.demangle.
> 
> Andrei
> 
> 
> On 9/10/10 9:01 CDT, Sean Kelly wrote:
> I wasn't sure whether to fix std.demangle now that core.demangle works, or to replace/deprecate it.  At the time I just needed something in druntime and I didn't like how std.demangle did everything via string ops. What do you all think?
> 
> Sent from my iPhone
> 
> On Sep 10, 2010, at 1:12 AM, Lars Tandle Kyllingstad<lars at kyllingen.net>  wrote:
> 
> I've noticed that Sean has recently added the core.demangle module to druntime.  Does this mean we can deprecate std.demangle?  I've never used it myself, but I seem to remember people saying on the NG that it is pretty outdated.
> 
> -Lars
> 
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
> 
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/phobos/attachments/20100910/d575bfe1/attachment-0001.html>
September 10, 2010
David Simcha wrote:
> I tried to use core.demangle to print human-readable profiling reports and it still seems to fail horribly on some symbols.  The un-demanglable symbols seem to  be really complicated template instantiations, like randomShuffle!(chain!(... .  IIRC there's some fundamental limitation where once a symbol gets huge DMD relies on hashing, so the mangling no longer has an inverse.  Is this true, or is it worth spending some time trying to create a decent test case?

If a symbol is to large for the object file format, it gets compressed. If that is to large, a hash (MD5?) is taken (I would assume of the uncompressed symbol). OTOH, anything that is that long is going to be ugly even if you could de-mangle it.

>
> On Fri, Sep 10, 2010 at 10:14 AM, Andrei Alexandrescu <andrei at erdani.com <mailto:andrei at erdani.com>> wrote:
>
>     Remove std.demangle and continue maintaining core.demangle.
>
>     Andrei
>
>
>     On 9/10/10 9:01 CDT, Sean Kelly wrote:
>
>         I wasn't sure whether to fix std.demangle now that
>         core.demangle works, or to replace/deprecate it.  At the time
>         I just needed something in druntime and I didn't like how
>         std.demangle did everything via string ops. What do you all think?
>
>         Sent from my iPhone
>
>         On Sep 10, 2010, at 1:12 AM, Lars Tandle
>         Kyllingstad<lars at kyllingen.net <mailto:lars at kyllingen.net>>
>          wrote:
>
>             I've noticed that Sean has recently added the
>             core.demangle module to
>             druntime.  Does this mean we can deprecate std.demangle?
>              I've never
>             used it myself, but I seem to remember people saying on
>             the NG that it
>             is pretty outdated.
>
>             -Lars
>
>             _______________________________________________
>             phobos mailing list
>             phobos at puremagic.com <mailto:phobos at puremagic.com>
>             http://lists.puremagic.com/mailman/listinfo/phobos
>
>         _______________________________________________
>         phobos mailing list
>         phobos at puremagic.com <mailto:phobos at puremagic.com>
>         http://lists.puremagic.com/mailman/listinfo/phobos
>
>     _______________________________________________
>     phobos mailing list
>     phobos at puremagic.com <mailto:phobos at puremagic.com>
>     http://lists.puremagic.com/mailman/listinfo/phobos
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos

September 10, 2010
On Friday 10 September 2010 19:02:53 Benjamin Shropshire wrote:
> OTOH, anything that is that long is going to be
> ugly even if you could de-mangle it.

True, but templates can get pretty long and ugly (even if they're not quite as bad in D since you don't have allocators and whatnot), and sometimes you need to see what they look like. Now, for a stack trace, you probably don't nee to see what the _exact_ type is once it gets that long and nasty - you can probably figure out which function is meant just fine - but for other uses, it could be a bit annoying to not have long template types completely demangled.

- Jonathan M Davis
« First   ‹ Prev
1 2