This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran] Add a global symbol table
- From: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: Paul Brook <paul at codesourcery dot com>
- Cc: fortran at gcc dot gnu dot org, patch <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 29 Jun 2004 19:39:39 +0200
- Subject: Re: [gfortran] Add a global symbol table
- References: <40DC79D0.30402@physik.uni-muenchen.de> <200406280115.15704.paul@codesourcery.com>
Paul Brook wrote:
> We already have a global namespace for intrinsic subroutines. See
> gfc_intrinsic_namespace in intrinsic.c.
> Could/Should this be be merged with your proposal?
I hadn't seen that before. Looking over it, I don't think they should be
merged (at least not at this time), for several reasons:
1. a namespace is overkill for the purpose of the global symbol table.
(If we were to store formal argumetn lists in it, we would still have to
have formal namespaces associated with each global symbols, so I see no
possible future savings in arranging those names in a namespace)
2. with my patch to common handling, I have started to separate out the
names of COMMONs from the rest of symbol handling, I don't think
gfc_intrinsic_namespace could be extended to this without evil work on
how the way symbols are handled there, or forfeiting the purpose of that
other patch.
3. the namespace for intrinsics is overkill, at least it appears to be
so to the extent I looked at the code. AFAICT it is only used to store
the name of the intrinsic. I haven't yet thought through if it were
preferable to store those names in the global symbol table, but this can
be done after my patch is in.
For this, I think my patch is reasonable even in spite of the existence
of gfc_intrinsic_namespace, and doesn't collide with a rethinking how
the names/symbols of intrinsics should be stored. I will commit after
applying the patch to a clean tree and testing.
- Tobi