This is the mail archive of the gcc@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: Idea for export Implemnation


> Ok but what about libraries?  Will there be no shared template
> instations
> for libraries?

I think there is the problem that you want the libraries to be read-only
and reasonably small, while included templates could possibly be expanded
for a very large set of classes.  OTOH, for speed of compilation, you
want class instantiations compiled only once.

Therefore, I propose that the libraries contain only the textual form
of the templates, and a unique key.
The key could, for example, consist of an URL for the archive file at
the time of its creation, the exact time of its creation, and the
qualified name of the template function.
This key, along with the target triple and compilation flags, is used to
index into a database to look if code for template for the desired class
exists.  If no match is found, a new code is compiled on the fly.
Thus, the database acts only as a cache.


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