[MLton] Bootstrap with bytecode

Stephen Weeks MLton@mlton.org
Fri, 29 Oct 2004 10:23:59 -0700

> Just curious, but are their plans to bootstrap with the bytecode
> version of the compiler? I'm assuming the bytecode interpreter is
> easier to port than a big C file produced by MLton.

To bootstrap, we would either have to distribute the bytecode or the C

Neither the bytecode nore the C code is particularly readable (at
least the C is ascii though).

Neither the bytecode nor the C code is portable.

Making the bytecode portable is roughly as complicated as making the C
code portable.  The reason for this is that they both hook in at a
very low level (Machine) in the compiler.

Bootstrapping from bytecode could be a way to go in the future if we
design a new bytecode that hooks in much closer to the front end and
is platform independent.  But this isn't even that easy, since there
are platform-specific constants (esp MLton.Platform.{Arch,OS}.host)
that are set at compile time.  Those would have to be reworked to test
at run time.  That seems like a loss to me.