[m-rev.] for review: normalize decl_ids in decl_set

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Nov 1 03:16:56 AEDT 2002


On 31-Oct-2002, Peter Ross <pro at missioncriticalit.com> wrote:
> Avoid a bug where duplicate declarations were not being detected.
> This prevented the compiler from bootstraping with MSVC in the grade
> none.gc.tr.debug.
> 
> compiler/llds_out.m:
> 	Normalize the decl_id used to reference the decl_set before
> 	inserting or looking for the decl_id.

I think this is attacking the symptom rather than the cause.

If feasible, it would be better to change the representation of decl_ids
so that there was no possibility of two different decl_ids referring to
the same declaration.

In particular, rather than keeping the varset for rtti_proc_labels,
it would suffice to just keep the names of the head variables.
Is that sufficient to make the problem go away?  Or do the two
references have different names for the head variables?

Note that the names of the head variables *is* potentially
significant -- some languages allow overloading on argument names,
and we might one day want to target such a language.
Also, even when compiling to C, using consistent names for
a function's parameters can make the generated code more readable.
So if the head variables are not being recorded correctly for
some references, it would be nice to fix that.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list