On 25/08/2006, at 1:35 AM, Erick Tryzelaar wrote:
> Mark Wotton wrote:
>> Is C++ the only backend available?
>> I'd really like to have a backend generating PicBasic, which is a
>> fairly standard Basic dialect for programming controllers that I
>> happen to have a compiler for... is there a low-level
>> representation of Felix that isn't totally reliant on C++? I'm
>> interested mostly in the synchronous -> asynchronous transformation.
>>
>
> We only do C++ at the moment, but it wouldn't be completely
> impossible to target something else. First off, felix's type system
> is quite generic. As you may know, it does not directly implement
> things like ints and strings, but wraps the C++ values. In order to
> make the standard library retargetable, we'd have to pull out all
> the c++ specific code, and replace it with the code that adapts it
> to another language. So say we were targetting llvm, instead of
> "pod type byte = 'unsigned char';", we'd have "pod type byte =
> 'ubyte';". This would get far more complicated with our libraries,
> because we wrap a bunch of stl stuff, and so we'd have to implement
> our own string functions.
>
> Then there's the actual backend/rtl. I don't have much experience
> with this, but it'd take a lot of re-architecting to get them to
> work with a different language. You'd have to deal with all of the
> fun memory-layout, garbage collection, and etc, and probably a
> whole bunch more things that I'm not aware of.
>
> It certainly is a long-term goal of mine to make retargetting a lot
> easier, but it's going to take a while before we reach that point.
> We're happy to help out though if you want to try :)
Unfortunately, my timeframe's a bit limited - if it's going to be
more than a day's hacking, I'm going to have to do it by hand. It's a
pity, though. I'd probably leave out the GC, though - it's pretty
simple code, and I doubt I can afford the space anyway.
Ah well. Will hack my own lib together and leave it at that, I guess.
Thanks for the thoughtful response.
Mark
--
I'm haunted by the freakish size of Nancy Reagan's head
No way that thing came with her body.
-- Mission of Burma, Nancy Reagan's Head
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language