On Tuesday 29 May 2001 05:15 pm, Hong Zhang wrote:
> > either each op code knows how many args it has,
>
> I like to do so, otherwise we will lose most of the performance gain.
I would think, though, that some ops would benefit more from varargs.
String assembly comes to mind.
>
> > or we have an end marker (e.g 0xff which is never used as a register
>
> index).
>
> If we have to use variable arguments, I strongly recommend to add one
> "argc" byte immediately following the opcode. Linear scan bytecode will be
> very slow.
Agreed.
> The 16-bit op has both endian issue and alignment issue. Most of RISC
> machine can not access byte-aligned opcode, so we have to add a lot
> of padding. Anyway, it will be fatter and slower than 8-bit opcode.
> I prefer to using escape opcode.
This is a discussion we've had before. It seems if we solve the Unicode
issue, we've solved the bytecode issue, too. Better yet, make all the
opcodes map to UTF-8 characters, so you can write and execute bytecode as
simple strings. ;-)
--
Bryan C. Warnock
[EMAIL PROTECTED]