[M3devel] LINUXLIBC6
Hendrik Boom
hendrik at topoi.pooq.com
Mon May 21 23:10:45 CEST 2012
On Mon, May 21, 2012 at 02:43:17PM -0400, Hendrik Boom wrote:
> On Mon, May 21, 2012 at 07:50:49AM +0000, Jay K wrote:
> >
> > Nevermind..I'm not making a clear point..
>
> Maybe this point will do:
>
> So regardless of whether the production compiler generates machine code
> or anythine else, it would be possible to have a single, portable
> interpreter written in C to use as a bootstrap tool to avoid having to
> bootstrap from machine-dependent machine code whenever installing (or
> packaging) foor another platform? The build-dependency of the real
> Modula 3 compiler could then be itself OR the interpreter.
>
> And the interpreter could be made to interpret some kind of efficient,
> intermediate code that is easy to interpret fast. Does the existing
> codebase have anything that sould be used for this? OR could easily be
> changed into this?
>
> -- hendrik
C--, I believe, is implemented as a compiler for several platforms, and
also as an interpreter. So generating C-- code would satisfy our
requirements for a bootstrap. If we want to hook into a run-time
system that has at least thought seriously about the issues of
garbage-collection and stack-walking, this might be it. But I don't
know to what extent these essential features have beein implemented.
OCAML also had an interpreter and compilers to several machine codes.
This would seem to be a viable mechanism.
I've been using an OCAML-written Algol W compiler using the interpreted
OCAML implementation, and it still compiles Algol W to C faster than
the C compiler translates its output code to machine code.
-- hendrik
More information about the M3devel
mailing list