2010/12/3 Paolo Bonzini <bonzini@gnu....>:
> On Fri, Dec 3, 2010 at 10:36, Dok Sander <doksander@yaho...> wrote:
>> I haven't have any luck finding out about a compiler that generated GNU Lightning bytecode. I find this weird that there isn't a GCC version that would do this((like gcc-llvm) So, i'd like to know if such an project exists at all or is under development somewhere?
> GNU Lightning is more suited to creating JIT compilers via templates.
> So, it's a bit like programming in assembly language.
> Paulo Pereira has an interpreter for GNU lightning opcodes that (IIUC)
> compiles and runs the opcodes passed as input.
I hope to work again soon on extra code to possibly create an
intermediate representation, but currently I am working on code
to infer data types and value ranges for my language, so that it
can detect where it does not need to generate float opcodes,
where overflow is not possible, or when it does not need to
generate a fallback to runtime type check dispatch. One example
using a bytecode to lightning translation is:
http://code.google.com/p/exl/source/browse/trunk/lib/elightning.c but maybe looking at gnu smalltalk translator would be easier to
understand (the above one is easy to me because I wrote it :-)
but it requires lightning from my tree in github).