lightning
[Top][All Lists]
Advanced

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

Re: [Lightning] Compiling C to Lightning


From: Ludovic Courtès
Subject: Re: [Lightning] Compiling C to Lightning
Date: Tue, 23 Aug 2005 11:11:58 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

Hi,

Paolo Bonzini <address@hidden> writes:

> I think Ludovic does not want that, but rather something similar to `c 
> (which was based on lcc).  Starting from TinyCC to get a working parser, 
> could be an idea.

What's `c?  Pointers?  Googling for it proved to be hard.  ;-)

Basically, I'd like to be able to generate a sequence of `jit_'
instructions from C code (or a subset of C).  There are many good
reasons for it, one of them being that it's usually easier to write C
code than assembly.

Another good reason is that high-level language run-times may already be
written in C.  For instance, Guile's run-time library defines a number
of macros for accessing Scheme objects, like `SCM_CAR ()', etc.  Suppose
you want to dynamically compile code that performs an `SCM_CAR ()' on a
run-time object.  Either you look at an `SCM_CAR ()' expansion and
re-implement it in Lightning assembly, which is tedious, error-prone,
and unmaintainable.  Or you have a tool that directly generates a
sequence of `jit_' insns from the macro expansion.

Of course, the ultimate tool would be a GCC back-end that produces
Lightning assembly...

How did you address similar issues in OCaml and GNU Smalltalk?

Thanks,
Ludovic.




reply via email to

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