lightning
[Top][All Lists]
Advanced

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

[Lightning] how does one implement exceptions?


From: Mate Nagy
Subject: [Lightning] how does one implement exceptions?
Date: Sun, 23 Nov 2008 00:18:47 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Hiho,
 so I'm toying with my Lisp interpreter (yes, another one...), and
thought of using Lightning as a JIT solution. I have no previous
experience with JIT or Lightning, so bear with me :)

 I have mostly read the Lightning info pages and documentation I saw,
and I haven't found any hints on how people would implement exceptions
with this toolset. At the very least, this would require something like
setjmp/longjmp, or access to stack frames (reading return IPs, and
doing lookups in tables based on them, oslt). I haven't found anything
in the docs that looked like these..  (Based on what I've read in the
mailing list archives, another alternative would be doing a full
conversion into CPS, having all stack frames in the heap etc.. but I'd
like to avoid this if at all possible.)

 Actually, it seemed to me that Lightning doesn't even let one have
direct access to the stack pointer and push/pop operations (I suppose
for platform independence reasons). At least with the naive ways I can
come up with, this makes it hard to generate code for a language with
full lexical scoping and closure support, in such a way that the
generated code used the process' own stack. (Using another memory area
for a custom data stack is a solution for this, of course.)

 So, does anyone have any pointers for me regarding these issues?
Thanks,
 Mate




reply via email to

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