On 25 April 2010 20:46, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
    - what is the representation that you use to convert it to assembly?    byteocde or ast    if AST which one? RBAst?
A NativeBoost package using AsmJit library (http://www.squeaksource.com/AsmJit) for generating native code. Its been ported from AsmJit project (http://code.google.com/p/asmjit/) written in C.
I was more thinking if you analyze the method AST and automatically generate x86. But I think that you do it by hand right :)
Yup. Translating smalltalk code into native code requires an abstraction layer, i'm yet missing :) I know what you asking, like, if you can code like this: myNativeMethod: foo with: bar <native> ^ foo readByte + bar * self (I following this way , but in another project - Moebius ;) ). Sure, it can be possible to use it. And i slowly moving in that direction. The infrastructure in Moebius is following: (a)(Smalltalk parser) -> (b)(Native intermediate instructions generator (compiler)) -> (c)(Native code translator) -> (d)(AsmJit) I having a, b and d , but c is still not complete. And sure thing, one can use it for own purposes , since Moebius implemented purely in smalltalk, and works in Squeak/Pharo, so potentially it can be retargeted to anything else.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.