On Tue, 2001-11-20 at 12:19, Ken Fox wrote: > James Mastros wrote: > > In byteswapping the bytecode ... > > > > I propose that we make INTVAL and opcode_t the same size, and gaurrenteed > > to be able to hold a void*. > > It sounds like you want portable byte code. Is that a goal? It seems like > we can have either mmap'able byte code or portable byte code, but not both. > Personally, I'd rather have portable byte code because memory is cheap > and self-modifiying byte code opens up a lot of optimization potential. I > know others disagree.
Hmm. It wouldn't necessarily be portable, though it probably would be on machines with the same size & endianness. So, on an alpha, you'd have: sizeof(INTVAL)=sizeof(opcode_t)=sizeof(void *)=64 bits whereas on x86 (and other 32 bit machines) sizeof(INTVAL)=sizeof(opcode_t)=sizeof(void *)=32 bits and on the Parrot/C-64 VM you'd have sizeof(INTVAL)=sizeof(opcode_t)=sizeof(void *)=16 bits Is that right? Brian > > Are we looking at two different byte code formats? Dan? > > - Ken