Reusable and replaceable compiler parts
Stephen J. McConnell
mcconnell at dpml.net
Mon Aug 27 00:55:59 PDT 2007
Ted wrote:
> I'm curious--what part of JSR 277's charter do you think directly yields a
> result of a modular compiler? It seems something of a stretch to make that
> connection, so I'm curious as to the logic at work there. (No offense
> intended; I'm genuinely curious.)
Ted,
The 277 charter does not directly deal with anything specific concerning
modularization of a compiler. However, JSR 277 (and the 294 sister JSR)
deals with the more general subject of modularization.
The Module Project is currently working on specifications, low-level JRE
services, and tools - that may make a substantive difference to the way in
which functional modularization is delivered within the JRE. Of particular
importance is the relationship between runtime module loading and
ServiceLoader which is used as a service extension point across a number of
javax packages (tools, imageio, management, naming) and internal
implementation classes.
The significant link between "compiler modularization" and 277 is in the
potential improvements in runtime integrity that 277-based modularization
can deliver over and above the current JRE extension mechanisms. The
compiler project is to some extent ahead of the game here in that the Tools
API is a relatively recent addition that leverages ServiceLoader as a core
extension mechanism - and as a consequence the incorporation of module-based
service loading into ServiceLoader would deliver a significant expansion to
the potential scale of extensions (because it directly addresses scalability
of the extension mechanism and elimination of class conflict through module
isolation).
I should point out that the relationship between 277 and ServiceLoader and
the overall subject of service location via modules (or module identifiers)
is not currently defined (although there is an internal strawman document
within the expert group dealing with the subject). As such, my comments
should be viewed as speculative - however, I expect to see more concrete
details on this subject as more documentation and code-drops come out of the
Module Project.
Cheers, Steve.
--------------------------
Stephen J. McConnell
mailto:mcconnell at dpml.net
http://www.dpml.net
More information about the compiler-dev
mailing list