Re: Pros and cons of high-level intermediate languages

fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
Sat, 25 Jul 1992 10:21:32 GMT

          From comp.compilers

Related articles
[7 earlier articles]
Re: Pros and cons of high-level intermediate languages tmb@idiap.ch (1992-07-23)
Re: Pros and cons of high-level intermediate languages henry@zoo.toronto.edu (1992-07-23)
Re: Pros and cons of high-level intermediate languages tarvydas@tsctrl.guild.org (1992-07-23)
Re: Pros and cons of high-level intermediate languages graham@maths.su.oz.au (1992-07-24)
Re: Pros and cons of high-level intermediate languages acha@CS.CMU.EDU (1992-07-24)
Re: Pros and cons of high-level intermediate languages graham@maths.su.oz.au (1992-07-25)
Re: Pros and cons of high-level intermediate languages fjh@munta.cs.mu.OZ.AU (1992-07-25)
Re: Pros and cons of high-level intermediate languages moss@cs.umass.edu (1992-07-25)
Re: Pros and cons of high-level intermediate languages jfc@athena.mit.edu (1992-07-25)
Re: Pros and cons of high-level intermediate languages scott@bbx.basis.com (1992-07-25)
Re: Pros and cons of high-level intermediate languages sewardj@cs.man.ac.uk (1992-07-26)
Re: Pros and cons of high-level intermediate languages ridoux@irisa.fr (1992-07-27)
Re: Pros and cons of high-level intermediate languages gat@forsight.jpl.nasa.gov (1992-07-29)
[14 later articles]
| List of all articles for this month |
Newsgroups: comp.compilers
From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
Organization: Computer Science, University of Melbourne, Australia
Date: Sat, 25 Jul 1992 10:21:32 GMT
References: 92-07-068 92-07-086
Keywords: storage, C, question

acha@CS.CMU.EDU (Anurag Acharya) writes:


>Wish list:
>
>1. label variables. Any kind of label variables with any resonable
>restrictions
>
> (statically scoped, no jumping to inside blocks etc.). This would
> greatly facilitate compilation of both functional languages and parallel
> languages. It would also facilitate parallelizing compilers for other
> languages. To this, add a C compiler that does not limit the size
> of individual functions and you are close to using C as an assembly
> language


If you are willing to restrict yourself to gcc 2.X then I think that you
will find what you need here. gcc 2.X supports label variables and
reportedly has no limits on function size. Beware though, that many
optimizers (and I think gcc falls in this category) use algorithms that
are O(n^2) time & space or worse, where n is the length of a function, so
you may find that even though there are no arbitrary hard limits,
compilation becomes unacceptably slow. (In the worst case, the compiler
thrashes itself to death for a few hours before running out of virtual
memory :-( ).


>2. A portable way of looking at the stack. Supporting garbage collection
> and call/cc (user-level continuations) would be easier if one could
> traipse up and down the C stack. Currently, such schemes are machine and
> compiler dependent.


>3. Some form of global register assignment. Some annotation scheme that
> allows me to indicate to the C compiler that I would like a particular
> global variable to be stuck in a register (may be a particular register
> if I am willing to give up portability).


Again, if you are willing to restrict youself to gcc 2.X then this
facility is provided. Unfortunately you *have* to specify which particular
register, so porting will require a bit more work with #if's and so forth.
[You could specify that for machine X, use register A1, for machine Y, use
register SI, for any other machines don't use a register - that way the
code will port easily to any machine, and the extra work is only required
if you want it to be efficient.]


--
Fergus Henderson fjh@munta.cs.mu.OZ.AU
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.