Extracting native code from C
Eric L. Dorman
dormane at spawar.navy.mil
Wed Mar 13 18:08:40 UTC 2002
Henrik Gedenryd wrote:
>
> Anthony Hannan wrote:
>
> > Below is a small C program that copies some of its machine code to
> > dynamic memory and executes it. It works on my Linux-i86. I was
> > thinking we could use this technique to dynamically translate bytecodes
> > into native code, without using machine-dependent assembly language.
>
> I've toyed with the idea but haven't at all thought of an actual a way for
> doing it. This technique would allow us to have a platform-independent JIT
> written in Smalltalk. No yucky C++ which seems to be where the JIT guys
> spend their lives.
>
> In short: it would be very cool if you pulled it off!
Just a note, GNU Smalltalk uses GNU Lightning, which by my reading
uses a generic machine model that compiles through the library to
platform-specific machine language (x86, ppc, sparc). Might be somewhat
suboptimal on all platforms but be faster than interpretation.
rgds,
Eric Dorman
SPAWARSYSCEN-SD
More information about the Squeak-dev
mailing list
|