This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ patch] Hookize output_vtable_inherit
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: Andreas Schwab <schwab at suse dot de>, Jan Hubicka <jh at suse dot cz>, gcc-patches at gcc dot gnu dot org
- Date: 27 Jul 2003 16:42:45 -0700
- Subject: Re: [C++ patch] Hookize output_vtable_inherit
- References: <20030621190609.GF22092@kam.mff.cuni.cz><1056381527.9720.25.camel@doubledemon.codesourcery.com><20030623181817.GN2327@kam.mff.cuni.cz> <m3y8yjwv6u.fsf@whitebox.as.local> <20030727205518.GA27349@atrey.karlin.mff.cuni.cz>
On Sun, 2003-07-27 at 13:55, Jan Hubicka wrote:
> > Jan Hubicka <jh@suse.cz> writes:
> >
> > >> On Sat, 2003-06-21 at 12:06, Jan Hubicka wrote:
> > >> >
> > >> > Hi,
> > >> > this patch adds hooks to assemble_variable to deal with output_vtable_inherit
> > >> > as discussed earlier. I didn't find pleasant way to discover virtual tables
> > >> > and vtts, so I simply look for them in the list.
> > >>
> > >> That's no good; let's not turn what used to be a constant-time operation
> > >> into a linear-time operation. Add a mark bit if you need one.
> > > OK, here is updated patch. There does not appear to be language
> > > specific decl flag but I can use generic tree flag.
> > > Does this look better?
> > >
> > > (regtested/bootstrapped x86-64)
> > >
> > > Mon Jun 23 20:11:36 CEST 2003 Jan Hubicka <jh@suse.cz>
> > > * class.c (build_vtable): Make vtables.
> > > * cp-tree.h (DECL_VTABLE_OR_VTT_P): New macro.
> > > * decl2.c (output_vtable_inherit): Rename to ...
> > > (prepare_assemble_variable): ... this one; change interface.
> > > (maybe_emit_vtables): Do not call output_vtable_inherit.
> > > * cp-lang.c (LANG_HOOKS_PREPARE_ASSEMBLE_VARIABLE): Define.
> > > * cp-tree.h (prepare_assemble_variable): New.
> >
> > This causes the assembler to barf because it expects the first
> > argument of .vtable_inherit to be already defined, but now the
> > directive is output before the definition. See the selective4 and
> > selective5 tests in the ld testsuite.
>
> OK, then we have two choices, rename prepare_assmble_variable into
> something else (what?) and call it afterwards or drop the feature as it
> was claimed to be useless nowdays anyway.
Drop the feature.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com