[dmd-internals] Correction to name mangling doc

Sean Kelly sean at invisibleduck.org
Thu Aug 18 09:27:34 PDT 2011


Done.  The issue numbers are: 3034, 6525, 6526, 6527.

On May 20, 2011, at 4:24 PM, Walter Bright wrote:

> Please submit these to bugzilla, else they'll get lost in this ancient thread!
> 
> On 5/20/2011 3:59 PM, Sean Kelly wrote:
>> On May 20, 2011, at 3:02 PM, Sean Kelly wrote:
>>> I just ran into this one, and it's an annoyance more than anything else.
>> Here's another one.  An inout(T) function parameter is represented as "NgT" (ie. Wild T, per the ABI).  'N' is already used as the signifier for a FuncAttr, so this function:
>> 
>>     nothrow inout(int) fn(inout(int) x) { return x; }
>> 
>> Is mangled as:
>> 
>>     2fnFNbNgiZNgi
>> 
>> Parsing this, I have to explicitly recognize "Ng" as not a FuncAttr but rather the beginning of an inout parameter type, rewind the parse location (admittedly by one char) and jump out of the FuncAttr parse loop to deal with it.  Couldn't some other label be used to mark an inout parameter so this conflict doesn't exist?  I guess TypeNewArray might have this same problem ("Ne") except that it isn't even used in D2 right now so I suppose that's a non-issue.
>> _______________________________________________
>> dmd-internals mailing list
>> dmd-internals at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/dmd-internals
>> 
>> 
> _______________________________________________
> dmd-internals mailing list
> dmd-internals at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-internals



More information about the dmd-internals mailing list