|Re: Pros and cons of high-level intermediate languages firstname.lastname@example.org (1992-08-10)|
|Re: Garbage collectable C chased@rbbb.Eng.Sun.COM (1992-08-10)|
|Re: Garbage collectable C email@example.com (1992-08-12)|
|From:||chased@rbbb.Eng.Sun.COM (David Chase)|
|Organization:||Sun Microsystems, Mt. View, Ca.|
|Date:||Mon, 10 Aug 1992 23:13:11 GMT|
|Keywords:||C, storage, translator|
firstname.lastname@example.org (Norman Diamond) writes:
>[re forcing references to GC-able storage]
>I think the following code might be safer plus avoid some of the register
>pressure. A post-pass over the assembly language is still needed to
>remove the unnecessary fetches (or other implementation-defined access to
>volatiles). Of course, if the translator to C declares register x, then
>this doesn't work.
> #define _GC_USE(x) *(volatile void *)&x;
But this misses the point -- you want x to be in a register, if
possible. Register pressure is (hopefully) best dealt with by the
optimizer (I wish this were more often true). What you say here
guarantees that spilling will occur.
However, it is definitely safer.
Return to the
Search the comp.compilers archives again.