|xml as intermediate representation email@example.com (tanuj) (2005-09-17)|
|Re: xml as intermediate representation Juergen.Kahrs@vr-web.de (=?ISO-8859-1?Q?J=FCrgen_Kahrs?=) (2005-09-17)|
|Re: xml as intermediate representation firstname.lastname@example.org (Jeff Kenton) (2005-09-22)|
|Re: xml as intermediate representation email@example.com (TOUATI Sid) (2005-09-22)|
|Re: xml as intermediate representation firstname.lastname@example.org (Chris Dollin) (2005-09-23)|
|Re: xml as intermediate representation email@example.com (Vidar Hokstad) (2005-09-23)|
|Re: xml as intermediate representation firstname.lastname@example.org (Alexey Demakov) (2005-09-27)|
|Re: xml as intermediate representation email@example.com (Vidar Hokstad) (2005-09-27)|
|Re: xml as intermediate representation firstname.lastname@example.org (TOUATI Sid) (2005-09-30)|
|From:||"Vidar Hokstad" <email@example.com>|
|Date:||27 Sep 2005 09:44:04 -0400|
> [I agree that if you're going to pass stuff from phase to phase, XML
> is as good a way to do it as any because of all the tools. But I
> have my doubts about plug and play phases. The compilers I wrote
> depend on shared data structures like symbol tables, and if you're going
> to have independent phases, you're going to have to pass that shared
> data from phase to phase, too, greatly bulking up the process. -John]
There's quite a few things you can do without additional information,
depending on how the intermediate representation is structured. Things
like instrumenting function entry/exits for instance would require
only "local" information for many languages.
But even if you do need to pass additional information on, I'm not
sure it would be a problem. Note that I would not push for anyone
making XML the only way to pass information between phases, but as an
relatively simple way to be able to plug in functionality that
otherwise have a tendency to tie you closely in to both the compiler
writers preferred language and data model.
Having a command line switch to make the compiler stop after a
specific phase and dump data, or start at a specific phase and load
data would give a tremendous amount of flexibility, and for that XML
is suitable because of the large amount of tools that can help you
process that data.
Consider the amount of effort people have been willing to go through
(things like gcc-xml and OpenC++) to achieve what you'd get "for free"
if compilers were more likely to have good support for
serialising/deserialising part or all of their internal
If you're able to defer full integration of your tools into the
compiler proper until you know whether or not it'll be worth the
effort it significantly lowers the barrier to do interesting things...
Return to the
Search the comp.compilers archives again.