Re: Pros and cons of high-level intermediate languages

maniattb@cs.rpi.edu (Bill Maniatty)
Fri, 7 Aug 1992 21:21:35 GMT

          From comp.compilers

Related articles
[26 earlier articles]
Re: Pros and cons of high-level intermediate languages rjbodkin@theory.lcs.mit.edu (Ronald Bodkin) (1992-08-04)
Re: Pros and cons of high-level intermediate languages optima!kwalker@cs.arizona.edu (1992-08-04)
Re: Pros and cons of high-level intermediate languages chased@rbbb.Eng.Sun.COM (1992-08-04)
Re: Pros and cons of high-level intermediate languages nfsun!gchamber@uunet.UU.NET (1992-08-04)
Re: Pros and cons of high-level intermediate languages moss@cs.umass.edu (1992-08-05)
Re: Pros and cons of high-level intermediate languages chased@rbbb.Eng.Sun.COM (1992-08-07)
Re: Pros and cons of high-level intermediate languages maniattb@cs.rpi.edu (1992-08-07)
Re: Pros and cons of high-level intermediate languages diamond@jit.dec.com (1992-08-10)
| List of all articles for this month |
Newsgroups: comp.compilers
From: maniattb@cs.rpi.edu (Bill Maniatty)
Organization: Compilers Central
Date: Fri, 7 Aug 1992 21:21:35 GMT
References: 92-07-064 92-08-019
Keywords: translator, design

nfsun!gchamber@uunet.UU.NET (Glenn Chambers) writes:
|> >[Somebody suggested that it might be possible to define some extensions to
|> >C that would make it easier to garbage collect. Any thoughts? -John]


|> Adding a '#pragma flush-registers' to deal with the optimizer seems to be
|> the only actual extension to the language that I can see. One would put
|> this just before a call to any function that could perform memory
|> allocation


It's been a while since I got down and dirty with the hardware, but if I
remember correctly Ansi C has a ``volatile'' qualifier that looks like it
would meet your needs. The volatile qualifier tells the compiler not to
buffer that data object in a register and is useful for handling data
objects subject to update by other processes. Please note that there
would be a substantial loss in optimization, which could queer timing
dependent code. You could simply have the code generator emit code with
the volatile qualifier, ie:


volatile static const char *ptr;


|> Is there some simpler and cheaper technique I'm unaware of?


I'm not a garbage collection expert, so I can't help you there. I can
tell you that the weak type checking in C makes it possible to do really
nasty things with pointers, and you'd have to be careful about the code
you emit.


Bill
--
| maniattb@cs.rpi.edu - in real life Bill Maniatty
--


Post a followup to this message

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