On 28/03/2008, Kjell Godo <[EMAIL PROTECTED]> wrote: > It seems to me that Cola contains a compiler C. > C takes the source code for Cola and compiles it to generate Cola.exe. > So within C there must be code to generate machine code. > You are making the next version of Squeak right? > > Like Corman Lisp has got an assembler inside of it. > > A completely opaque one. Nothing in there is commented at all. > > So this Cola Squeak would have an assembler inside of it > or something. And you could see the code for the assembler > inside of the running Cola Squeak. Just like you can see > the Squeak compiler within Squeak. Which also seems to > be quite opaque. I wish there was a book just about the > Squeak compiler. Can you suggest any? > > So I am guessing that the running Cola Squeak will have the > compiler and assembler within it. And you will be able to > see them and modify them and then generate a new Cola.exe. > > Instead of sticking byte codes into ByteArrays you would > be sticking machine code into lisp code vectors which I am > assuming are just ByteArrays. > > Why doesn't Smalltalk do machine code vectors like Lisp does? > > Would that make the debugger not work anymore? > > I think the SmalltalkMT has debugger problems because it is > all compiled into machine code. > > So reflective means that you can see the compiler and assembler > inside of the running Cola Squeak just like you can see the > byte code compiler inside of regular Squeak. > > Is this in fact what is going on inside of Cola? > Will it be a machine coded version of Squeak ala Lisp? > Lisp can do both interpreted and compiled to machine code. > Will Cola be ported to Windows? Which Linux does it run on? > How might one go about trying to understand how it works? > Why wasn't Cola coded up in Squeak? I should think that > Squeak could generate machine code just as easily as C++. > Even better. >
Good point. A native code compiler can be implemented in any language. Since COLA is a compiler itself, it can omit using C compilers or any routines provided by C compiler for generating machine code. Btw, there is a native compiler in squeak - Exupery which can generate native code. Yes, debugging the machine code adds complexity to compiler/debugger, but this can be done one way or another. The only bad side of native code, comparing to byte code, that it's not portable. So, in case if image compiled methods contain native code, you need to recompile them when starting image in different platform, which means that you need a bootstrapping compiler already present for given platform. -- Best regards, Igor Stasenko AKA sig. _______________________________________________ fonc mailing list [email protected] http://vpri.org/mailman/listinfo/fonc
