Re: OO compiler design ?

Patrik Reali <reali@inf.ethz.ch>
20 Feb 1997 00:11:09 -0500

          From comp.compilers

Related articles
[4 earlier articles]
Re: OO compiler design ? krotoff@boy.nmd.msu.ru (Alexander Krotoff) (1997-01-22)
Re: OO compiler design ? stephen@lila.york.ac.uk (1997-01-25)
Re: OO compiler design ? trondro@sn.no (Trond Ronde) (1997-01-29)
Re: OO compiler design ? SCHMIDTG@iccgcc.cle.ab.com (1997-02-02)
Re: OO compiler design ? stephen@lila.york.ac.uk (1997-02-07)
Re: OO compiler design ? p.froehlich@link-m.de (1997-02-11)
Re: OO compiler design ? reali@inf.ethz.ch (Patrik Reali) (1997-02-20)
| List of all articles for this month |
From: Patrik Reali <reali@inf.ethz.ch>
Newsgroups: comp.compilers
Date: 20 Feb 1997 00:11:09 -0500
Organization: Computersysteme, ETH-Zurich
References: 97-01-136 97-01-237 97-02-049 97-02-062
Keywords: OOP

Fri 07.02.1997 stephen@lila.york.ac.uk (stephen) wrote:
  > I'd Be Interested To Know Of Any Opinions Of Wirth's Oberon Book, Which
  > From A Casual Glance Looks Very Clear. What Does A More Detailed
  > Examination Reveal?


p.froehlich@link-m.de wrote:
> In terms of object-oriented compiler design the book does teach you
> nothing. The compiler is written in the standard imperative
> "Modula-2" fashion, without using type-extension anywhere. It is a
> good single-pass compiler design, though. And the language design is
> even better... :-)


Yes I agree. But usually we used to rewrite the compiler taking
advantage of the new features in the language to make the compiler
better. I don't know why this has not been done.


> OP2, the standard "portable" Oberon-2 compiler distributed with
> Oberon V4 implementations, is also written in an imperative style
> without using type-extension.


The ETH System 3 Oberon System also uses OP2. I think that this choice
has to do with efficiency. Declaring a new type for every symbol mode
(e.g. Vars, procedures, types, modules) with its own fields would lead
to more memory fragmentation, and OP2 is already very memory consuming
(too much??)


> BTW: I plan writing an Oberon-2 compiler later this year using an
> OO approach. The result of this project will be freely distributable,
> but until then...


I'm also starting a new project of rewriting the compiler using Active
Oberon, a new language extension that supports methods, concurrency
and data protection, but this will take some time. I'll be taking
advantage of the concurrency features of the language, and that will
force me to use information hiding and to access all the data through
methods, to have mutual exclusion and consistency of the data.


Bye
  Patrik


--
Patrik Reali, Institute for Computer Systems, ETH Zurich
phone: ++41 1 632 73 23
e-mail: reali@inf.ethz.ch
www: "http://www-cs.inf.ethz.ch/~reali"
--


Post a followup to this message

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