On Sat, Sep 15, 2001 at 12:39:39AM +0300, Jarkko Hietaniemi wrote:
> > It will be hard to use one format for both native and portable.
>
> Not one format, but a set of closely related formats with well-defined
> transformations between them.
After thinking about implementing this for a bit, I'm becoming
dubious about the value of allowing any instance of Parrot to read
the native bytecode of every other Parrot out there. Do we really
want the non-native byteloader to be capable of reading everything
from little-endian 16-bit to 64-bit mixed-endian? What about 36-bit?
(PDP-6 port, anyone? :>)
I propose two encodings per Parrot: portable and native. Portable
is big-endian 32-bit words. Native is, of course, whatever makes
sense for the local machine. If you want to share bytecode between
machines, you pass the "create portable bytecode" switch to the
assembler.
- Damien