mangleof (signature) question
Frits van Bommel
fvbommel at REMwOVExCAPSs.nl
Wed Jan 2 08:01:06 PST 2008
Ary Borenszweig wrote:
> Hi all,
>
> In Descent I'm using the mangleof, or signature, of a class or function
> to search it in the project, for "go to definition" and other
> functionalities.
>
> The problem I'm facing is that the mangled representation is sometimes
> ambiguous for symbols defined in functions. For example:
I mentioned a similar (or perhaps the same?) issue in
http://d.puremagic.com/issues/show_bug.cgi?id=588#c2. (The issue is
marked as 'resolved' because this wasn't what it was directly about, it
was about a patch to std.demangle; it just happened to run into an
ambiguity concerning nested symbols)
> My questions are: is there any reason for the signature to be ambigous?
It was probably just an oversight when nested symbols (and thus their
mangling) was added to the compiler.
> If so, how can I tell how to search a symbol from that signature? Or
> maybe I should create my own signatures just for searching symbols...
In my bugzilla comment I mentioned that adding a simple terminator
character after identifiers would probably be the easiest fix. Since you
have a fork of the frontend in descent, you could probably implement
that pretty easily.
More information about the Digitalmars-d-learn
mailing list