Re: Garbage collectable C

chased@rbbb.Eng.Sun.COM (David Chase)
Mon, 10 Aug 1992 23:13:11 GMT

          From comp.compilers

Related articles
Re: Pros and cons of high-level intermediate languages (1992-08-10)
Re: Garbage collectable C chased@rbbb.Eng.Sun.COM (1992-08-10)
Re: Garbage collectable C (1992-08-12)
| List of all articles for this month |

Newsgroups: comp.compilers
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
References: 92-08-038 (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.


Post a followup to this message

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