Re: Pros and cons of high-level intermediate languages

optima!kwalker@cs.arizona.edu (Kenneth Walker)
Tue, 4 Aug 1992 18:46:49 GMT

          From comp.compilers

Related articles
[21 earlier articles]
Re: Pros and cons of high-level intermediate languages boehm@parc.xerox.com (1992-07-30)
Re: Pros and cons of high-level intermediate languages graham@maths.su.oz.au (1992-08-02)
Re: Pros and cons of high-level intermediate languages ridoux@irisa.fr (1992-08-04)
Re: Pros and cons of high-level intermediate languages kanze@us-es.sel.de (1992-08-04)
Re: Pros and cons of high-level intermediate languages boehm@parc.xerox.com (1992-08-03)
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: optima!kwalker@cs.arizona.edu (Kenneth Walker)
Organization: Compilers Central
Date: Tue, 4 Aug 1992 18:46:49 GMT
Keywords: C, design
References: 92-08-004

>From article 92-08-004, the moderator 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]


While I have not done this for a compiler itermediate language, I have
done it for an implementation language for the Icon language's run-time
system. The implementation langauge is based on C and has a number of
extensions. One of them is a storage class specifier of "tended"
(analogous to "register") that indicates that the garbage collector is
able to locate the variable.


When a function written in the implementation language is translated into
ordinary C, tended variables are gathered together and placed in a
structure. That structure is automatically linked onto a global list when
the function is entered and removed when the function is exited. The
garbage collector locates the variables by traversing the list.


The representation of the variables in the ordinary C code and the layout
of the structure were designed to meet the needs of a particular langauge
and garbage collector. I'm not sure how well this mechanism can be
generized so that one compiler of extended C can be made to work with many
languages and many garbage collectors.


    Ken Walker / Computer Science Dept / Univ of Arizona / Tucson, AZ 85721
    +1 602 621-4252 kwalker@cs.arizona.edu uunet!arizona!kwalker
--


Post a followup to this message

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