Igor Stasenko schrieb:
> 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?
>>     
Well, "next version of Squeak" is probably not the right expression.
COLA is an approach to implementing the target system (whatever that may
be) consistently down to the lowest layers (machine code / hardware). If
I understand the code correctly, the current incarnation of compilers
use the platform's C compiler for static code generation, but include
dynamic code generation as well.
> 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.
>
>   
It should be reasonably possible to implement a bytecode interpreter /
JIT compiler within the COLA framework. Then you'd have the advantages
of both worlds. Of course, the complete architecture would have to be
designed in such a way that platform-independent objects with associated
bytecode methods can be handled separately from the platform-dependent code.
But unlike the current Squeak VM, where the platform- and CPU-dependent
part is statically compiled and immutable, with COLA the
platform-dependent part is just as malleable as the platform-independent
part.

Cheers,
Hans-Martin

_______________________________________________
fonc mailing list
[email protected]
http://vpri.org/mailman/listinfo/fonc

Reply via email to