gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gm2] Modula-2 news


From: Waldek Hebisch
Subject: Re: [Gm2] Modula-2 news
Date: Thu, 18 May 2006 00:04:22 +0200 (CEST)

Gaius Mulley wrote:
> Ed Smith-Rowland <address@hidden> writes:
> 
> Hi,
> 
> > I noticed that Waldeck Hebisch and others got GNU Pascal to work under
> > gcc-4.0 and gcc-4.1.
> 
> ahh, I hadn't noticed this, thanks.  Last time I looked GNU Pascal was
> using gcc-3.4.  This will be extremely useful and they will have had to
> solve the loss of SET_TYPE data type as a base back end data type.
> I suspect they may have solved it via gimple.. and this could be
> really useful for GM2..
> 

I have just re-added the code that backend folks removed. I had to expand
set constructors in a gimpilifier hook. For 4.1 port I also added another
hook which expands set constructors initializing global variables
(gimplifier hook only sees expression inside functions). IIRC the rest
of set code in the backend just worked. Note that GNU Pascal expands all
set operations into calls to the runtime library, so most of the backend
just have to pass trough set type. Non-trivial part is emitting debug
info, handling set constructors (done via hooks), layout_type and 
some type dependent tweaks to calling conventions.

> > If it isn't already too late it might be a good idea to talk to them.
> > I was going to ask but work flared up and I know next to nothing about
> > gcc internals.  Merging Modula2 would have been a great way to learn
> > though. ;-)
> 
> very true!  I'd welcome any help.. :-)
> 

You may look at `plant.[ch]' files in recent GNU Pascal. The files
together are less then 600 lines and encapsulate most of GIMPLE specific
stuff.  The idea is that you replace `expand_something' by `plant_something'.
The plant_something variant remembers all trees passed as arguments and
builds tree representation of the whole function.  

-- 
                              Waldek Hebisch
address@hidden 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]