Re: Adding other languages to GCC (Eliot Moss)
Sun, 7 Feb 1993 17:55:38 GMT

          From comp.compilers

Related articles
GCC as back-end summary davids@ICSI.Berkeley.EDU (1993-01-29)
re: Adding other languages to GCC David.Chase@Eng.Sun.COM (1993-02-05)
Re: Adding other languages to GCC (1993-02-07)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (Eliot Moss)
Keywords: GCC, design
Organization: Dept of Comp and Info Sci, Univ of Mass (Amherst)
References: 93-02-011 93-02-054
Date: Sun, 7 Feb 1993 17:55:38 GMT

David.Chase@Eng.Sun.COM (David Chase) said:
> I studied this once, around about gcc 1.2x. One caveat that RMS did
> not provide is that if your language has substantially different
> features from C -- for instance, nested functions, or garbage
> collection, or closures, or continuations -- then the rest of the
> back-end may not "correctly" generate the code that you want. That is,
> it was designed (and so far, tested) for languages like C.

[ etc. ]

While David is basically right, nested function support (static chains)
came with gcc 2.0 and higher (it's in gcc's extensions to C). Also, our
Modula-3 work addresses the issue of garbage collection. Full closures and
continuations would still be a problem, and the orientation is towards
static typing rather than dynamic/tagged languages such as LISP, Scheme,
ML, etc.

Adding support for exception handling and gc did involve some subtleties,
but my take on it is that the coding was not that hard. What was hard was
coming to the proper understand of what needed to be done. The incremental
change to the back end is not all that large. Amer Diwan, who did the
work, can expand on this point I'm sure. There is a group of us trying to
work out language independent expcetion handling support from the tree
stage on, and the main challenges are doing it across language,
architectures, and operating systems, but I think we've basically got it
in hand.
J. Eliot B. Moss, Associate Professor Visiting Associate Professor
Department of Computer Science School of Computer Science
Lederle Graduate Research Center Carnegie Mellon University
University of Massachusetts 5000 Forbes Avenue
Amherst, MA 01003 Pittsburgh, PA 15213-3891
(413) 545-4206, 545-1249 (fax) (412) 268-6767, 681-5739 (fax)

Post a followup to this message

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