[Oberon] Current Oberon System

chris at gcjd.de-web.ws chris at gcjd.de-web.ws
Thu Dec 20 19:18:22 CET 2012


Treutwein Bernhard wrote:
>It compiles Oberon-2 to C (in a difficult form) and from there
>to object code. I think it would be very interesting to modify 
>its front end to go directly to gcc's intermediate code the 
>register transfer language (RTL) and to integrate it completely
>into the compiler collection as has been done for Modula-2 by
>Gaius Mulley. 

I would recommend aagainst this way unless you are experienced with gcc
internals already. ;-)

Several years ago I evaluated this way and unless things have changed
very much since then gcc internals are a mess, documentation is soso and
gcc is a huge and moving target not easy to handle if you have been
exposed to Wirth style. gcc today uses 3 internal representations,
one is SSA form; as far as I know RTL is not SSA.

Probably easier to handle is llvm (llvm.org) which has a well defined
SSA intermediate language <http://llvm.org/docs/LangRef.html> which is
somewhat stable over the years.

There was also a paper about generating SSA by
MARC M. BRANDIS and HANSPETER MÖSSENBÖCK
"Single-Pass Generation of Static Single Assignment Form for Structured
Languages"
which could come in handy.

>The above mentioned documentation for OOC is not for the current 
>release 2.1.11 but for an older one 1.5.1. Anything newer must
>be fished for ...

OOC uses GSSA and has a considerable complexity of his own. While an
interesting concept I would suggest starting from scratch or using Coco
to keep things easy and manageable unless you are doing this fulltime.

Greetings, Christian




More information about the Oberon mailing list