On 28/08/2009, at 7:12 PM, Igor Šwarz wrote:

> How did you made the spaghetti stack using LLVM ?


He probably didn't.  Note the simple call:

%foo = call i32 @foo(i32 1, i32 2, i32 3)       ; <i32> [#uses=1]

This means closures aren't supported, and therefore also
no fthreads. However supporting these shouldn't be hard.

The problem is Erick is driving off the early bound, unoptimised
code, at which point the only safe way to support fthreads and
closures is to implement closures for ALL calls. After optimisation
etc has run, you can tell whether you need a closure or the machine
stack will suffice (and most functions would have been inlined
away anyhow).

Another thing probably not supported running off early bound code
is polymorphic functions .. more precisely, schema (aka templates).
These are monomorphised by the optimisation process, another reason
to drive LLVM off the back side of the front end.

Erick is trying to make a REPOL loop work AND support LLVM. The latter
should be quite possible. The former is going to be very hard because
Felix doesn't even support separate compilation: it was designed from
the ground up as a whole program analyser.

However it isn't impossible to "trick" the system by running a whole  
program,
and then when you type in a line .. running the whole thing with that  
line added
again (or something like that).

More precisely, you'd throw out side effecting calls such as print  
statements
but keep the definitions.

To do that, Erick will need some way to tell what needs to be kept and  
what doesn't,
but that doesn't sound too hard (although reality might be different):  
keep everything
except procedure calls :)



--
john skaller
skal...@users.sourceforge.net





------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to