2014-09-15 14:39 GMT+02:00 Clément Bera <bera.clem...@gmail.com>: > 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. >
Yes, I am aware of that. I remember that from the very beginnings of Squeak. Wasn't Smalltalk/X the one which had a more complete version of that C translation? I did an internship in a French company who had a Smalltalk to C translator done for them a long time ago. > > 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. > It would allow JIT-type compilation experiments than a Slang-to-C chain isn't designed for :) With a lot more work doing the various NB ports, of course. > >> - 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. > I would not suggest replacing C by LLVM-IR for VM work, in part because LLVM-IR is not what I would call a readable source code format... But I do know that even when doing C to C rewritting for embedded compilation, there is some low-level code that you can't write in C. > > > 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. > Keep us posted! Thierry