Hello, Note that slang is a subset of smalltalk. The Slang compiler does not allow to compile smalltalk to C. It allows to compile a smalltalk with restricted message sends and classes to C.
2014-09-15 13:28 GMT+02:00 Thierry Goubier <thierry.goub...@gmail.com>: > Hi Phil, > > thanks for the update on Slang to C. Allways significant to have that. > > Two open questions: > > - would a slang to x86 asm via NativeBoost be doable / a nice target? > Yes it would be interesting. However, by having a Slang to C compiler, we're platform-independent, we can compile the C code to x86, x86_64 and ARM quite easily (some part of the VM are already processor dependent, but not so much). Targeting direct machine code implies evolving the Slang compiler for each new assembly code we support. It sounds like a lot of engineering work compared to our resources and the gain. > > - would targetting LLVM-IR be of interest? > > If you compile the C code with Clang instead of gcc, which starts to be the case because of the lack of support for gcc in the latest Mac OS X, you are already using LLVM IR because Clang uses it. As the VM use the GNU C extensions to improve performance, I do not think that targeting directly the LLVM IR would greatly improve performance. So it sounds like quite some engineering work for no gain. However, I think Ronie was interested in doing such work. If he succeeds and reports performance improvement, then we can consider using his compiler to compile the VM. > Thierry > > 2014-09-15 12:29 GMT+02:00 p...@highoctane.be <p...@highoctane.be>: > > Slang has been externalized by Pavel. So, Smalltalk to C works. >> >> Works nicely, even if there were a few glitches (like code generated >> twice at one point). >> Nothing unfixable, I got the beast working. >> >> Allows for things like: write Slang, generate C, compile into DLL, load >> DLL, run C code. All in a single shot. >> >> PavelKrivanek/CCodeGenerator on SmalltalkHub (which looks like super >> slow/zombified). >> >> Phil >> >> >> >> >> >> >> >> On Mon, Sep 15, 2014 at 11:28 AM, Santiago Bragagnolo < >> santiagobragagn...@gmail.com> wrote: >> >>> I may be wrong, but I think the closest thing out there is Slang. Is >>> the pseudo smalltalk used to develop the VM. >>> >>> Also there is a project for generating C for arduino, (a project related >>> with EToys), but i am not sure about how complete is. >>> >>> >>> >>> 2014-09-15 11:04 GMT+02:00 kilon alios <kilon.al...@gmail.com>: >>> >>>> Is there a way to convert code from pharo to c or c++ ? Does pettit >>>> parser or other parsers offer such support ? >>>> >>> >>> >> >