www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4697] New: std.demangle doesn't work correctly

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4697

           Summary: std.demangle doesn't work correctly
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: necroment gmail.com



import std.demangle, std.stdio;

void main() {
    auto a = (float x, char y) { return 0; };
    auto b = [ 1, 2, 3 ];
    auto c = 3.5;

    writeln(demangle(a.mangleof));
    writeln(demangle(b.mangleof));
    writeln(demangle(c.mangleof));
    writeln(demangle("_D3std4math3cosFNaNbeZe"));
    writeln(demangle("_D3std3utf6toUTF8FG4awZAa"));
    writeln(demangle("_D3std6string7sformatFAaYAa"));
}

output:

DFfaZi
Ai
d
_D3std4math3cosFNaNbeZe
char[] std.utf.toUTF8(char[4], dchar)
char[] std.string.sformat(char[], ...)

So it does unmangle some of the symbols, but it's very limited currently.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 20 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4697


Sean Kelly <sean invisibleduck.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sean invisibleduck.org



---
demangle now handles the _D symbols below, but not the .mangleof strings.  This
is by design, since the .mangleof strings aren't complete symbol names per the
spec.  I suppose a function should be added to handle the .mangleof strings
though.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 11 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4697


SomeDude <lovelydear mailmetrash.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lovelydear mailmetrash.com



PDT ---
2.059:

PS E:\DigitalMars\dmd2\samples> rdmd bug.d
void bug.main().pure nothrow  safe int function(float, char)* a
void bug.main().int[] b
void bug.main().double c
pure nothrow real std.math.cos(real)
char[] std.utf.toUTF8(char[4], dchar)
char[] std.string.sformat(char[], ...)
PS E:\DigitalMars\dmd2\samples>

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 21 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4697


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |andrej.mitrovich gmail.com
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 21 2012