Scribit Jonathan S. Shapiro dies 27/03/2008 hora 15:23: > 2. Include the ASTs (or equivalent) in the static archive > library that accompanies the dynamic library. Generate > any missing code at static link time or (if the linker > supports link-once semantics) at module compile time. > > Issue: This has an unintended consequence: any instance that > is pre-instantiated by the library now becomes part of > the link layer interface contract, because the runtime > system cannot instantiate it at run time.
Isn't it possible for the static linker to always instantiate all instances that it needs, even if they have already been somehow? That's what you obtain with C++ templates, AFAICT (except that they're not instantianted at link time, but at compile time). On the other hand, being able to provide pre-instantiated instances could be a useful optimization WRT code size, compared to C++ templates. A library could then provide some useful pre-instantiations for types it provides. And if some instances are known to be used among a vast project, you can create a library to make those instances available. Even if that's an unintended consequence, it seems to have interesting virtues. Hopefully, Pierre -- [EMAIL PROTECTED] OpenPGP 0xD9D50D8A
signature.asc
Description: Digital signature
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
