H. S. Teoh via Digitalmars-d wrote in message
news:mailman.4366.1405642929.2907.digitalmar...@puremagic.com...
Hmm. How to generate a unique id? It must be module-wide, but not
program-wide, because otherwise you get a different mangling depending
on the order of imports. It must not
H. S. Teoh via Digitalmars-d wrote in message
news:mailman.4230.1405534833.2907.digitalmar...@puremagic.com...
But maybe some of the DMD experts can speak up about this. ;-)
This is fairly well known, the same thing exists for static variables and
nested functions etc. I think there is
Slight correction : it is not a mangling of variable that is a
problem (local variables don't have any mangling) but mangling of
the function itself (it naively uses variable name for mangled
name generation). Should use something like unique id instead.
On Thursday, 17 July 2014 at 10:03:08 UTC, Daniel Murphy wrote:
The solution is also fairly straightforward - give each local
declaration a unique name (for mangling only). It probably
requires some minor structural changes in dmd.
As an aside, these names should be independent of
I opened a number of bugs regarding ambiguities while writing
core.demangle. They're all tagged with some searchable keyword
too, though I can't recall what it is.
On Thu, Jul 17, 2014 at 10:15:56AM +, Dicebot via Digitalmars-d wrote:
Slight correction : it is not a mangling of variable that is a problem
(local variables don't have any mangling) but mangling of the function
itself (it naively uses variable name for mangled name generation).
Should
Something like reduced hash from mangled name of parent scope +
incremental ID for each new stack instance.
On Wednesday, 16 July 2014 at 17:24:27 UTC, H. S. Teoh via
Digitalmars-d wrote:
Today I was investigating this bug:
https://issues.dlang.org/show_bug.cgi?id=10619
and found that the problem appears to be an ambiguous mangling
of local variables declared in nested scopes. ...
Amazing how
On Wed, Jul 16, 2014 at 05:36:45PM +, Ivan Kazmenko via Digitalmars-d wrote:
On Wednesday, 16 July 2014 at 17:24:27 UTC, H. S. Teoh via Digitalmars-d
wrote:
Today I was investigating this bug:
https://issues.dlang.org/show_bug.cgi?id=10619
and found that the problem appears to be an