On Wed, 22 Nov 2000 14:15:57 -0500, Dan Sugalski wrote:

>>We bootstrap on perl5 to get a bytecode stream, and then that bytecode
>>stream had better stay supported.
>
>Yup. It's one way to ensure backwards compatibility... :)

I assume a byte is still 8 bits? So you have a max of 256 different (1
byte) opcodes? What if Perl6 has more than 256 instructions (as it
probably will)? Will somebody choose the important ones, which get a
one-byte opcode, and the rest get an escape byte + one (or more) opcode
bytes, à la Z80 machine code?

But what if you choose wrong, forgat a really important one, and this
instruction gets a multibyte representation? We're stuck with it
forever...?

I have had some thoughts on "dynamic opcodes", where the meaning of
opcode bytes needn't be fixed, but can be dynamically assigned,
depending on how often they occur (for example). A bit like how a
Huffman compressor may choose shorter representations for the most
occurring byte patterns.

Just some wild thinking.

-- 
        Bart.

Reply via email to