[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]

Re: [zzdev] systems programming Clang



On 20000831T231548+0300, Tuomas Lukka wrote:
> The language probably shouldn't include abstraction mechanisms but rather
> meta-abstraction mechanisms to allow the coder to create new abstractions
> easily. This would be basically code generation combined with reflection.
> These would be Plato libraries connecting with the compiler code.
> 
> The compiler, BTW, should probably be written in Plato (or initially
> Thales), not Java.

You are now using the terminology
   Aristotle - systems
   Plato - appli(cations/tudes)
right?

> Oh, that's actually not true: to do that, we just make our own memory
> allocator and a schema for the memory inside that area. Garbage collection 
> will need to be completely synchronized so that no pointers to that are
> are saved anywhere except in that area.

That's inefficient as we cannot use machine registers or the C stack
at all!  The problem with C is that we cannot portably extract the root
set and reliably detect pointers.  The scheme you propose is fine for
an interpreter (I've used the idea in my ongoing personal Attoscheme
project) but not for a systems compiler.

> The systems programming Clang should work with several *different*
> platforms from the beginning: doing one platform first will give no end of
> trouble when moving.

Well, ultimately I'd like to do native code generation in any case, but
you may be right about doing an absolutely portable version at start.
(But for that, using an intermediate VM [think of P-code] may be a
better idea.)

-- 
%%% Antti-Juhani Kaijanaho % gaia@xxxxxx % http://www.iki.fi/gaia/ %%%