Using CCodeGenerator for something beyond Plugins
Marcel Weiher
marcel at metaobject.com
Wed Mar 20 07:24:46 UTC 2002
On Tuesday, March 19, 2002, at 11:38 PM, Ned Konz wrote:
> I'm interested in using the Slang support (CCodeGenerator/TParseNode and
> friends) for emitting C for embedded systems.
>
> However, the existing classes won't work for more general cases, where
> there
> may be more than one object of a particular class. The Plugins convert
> instance variables into globals and throw away self.
Sad, isn't it?
> I was wondering whether anyone has come up with versions of these that
> differ
> from the Plugin versions as follows:
>
> * instance variables become structure members rather than globals
> * don't throw away self; instead pass as initial pointer argument
Well, I've done an Objective-C converter that does this. It turns the
Smalltalk objects into Objective-C objects and Smalltalk message sends
into Objective-C message sends.
If this sounds helpful, I can try and dig it up.
> Oh yes, and I'm generating the Smalltalk with the scripting system. It
> promises to be an interesting system: draw state diagrams, drag tiles
> into
> scripts, then hit the "generate C" button...
Very, very interesting!
Marcel
--
Marcel Weiher Metaobject Software Technologies
marcel at metaobject.com www.metaobject.com
Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.
More information about the Squeak-dev
mailing list
|