This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: RFC: Lose use of $ and . in [cd]tor labels


I've checked in the _GLOBAL_foo changes, but not the config file changes
yet, as there are still some other uses in the C++ frontend to be resolved.

The remaining uses of $/. that could reach assembly are

 $_n for anonymous tagged types
 _$tmp_n for static temporary variables, such as used in initializing a
   global reference variable.

We certainly need some sort of mangling for these, but it needn't use
special characters.

For the latter, it would make sense just to use internal labels; we can
probably do this by giving them names from ASM_GENERATE_INTERNAL_LABEL.
I'll investigate.

This leaves the anonymous types.  Ideally they wouldn't make it into the
assembly at all, thanks to the rule that types with no linkage shall not be
used to declare functions with linkage, but they could still be used in a
local class method that isn't inlined.  Any thoughts as to a good scheme for
mangling them?

---

Another use of $/. which is only seen in debugging info is

 $vf / _vptr$4base for the vtable pointer field; the former is used in
   stabs output to reduce its size.

It seems reasonable to continue using _vptr$ for debugging, following the
Java example, but I'd like to do that regardless of NO_*_IN_LABEL, since it
doesn't appear in labels.  Perhaps just 'vptr$', without the _.

I'm not clear on why the 'base' part is needed; I don't think we use the
name in the compiler, though it might be convenient to have different names
to refer to in the debugger.

The stabs optimization also seems a bit pointless, especially since gdb
fails to reconstruct the original name; we just end up with _vptr$.  So we
save a total of three characters.  I'd like to take it out.

Opinions?

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]