> On Tue, 20 Nov 2001, Ken Fox wrote: > > It sounds like you want portable byte code. Is that a goal? > I do indeed want portable packfiles, and I thought that was more then a > "goal", I thought that was a "requirement". In an ideal world, I want a > PVM to be intergrated in a webbrowser the same way a JVM is now.
I think we should separate packfile from runtime image file. If we want the runtime can run a mmapped (pack)file, the file can not be portable. We have to deal with endianness, alignment, floating point format etc. > I think we can get the best of both worlds. We, I think, should be able > to get the bytecode format such that it is mmapable on platforms with the > same endiannes and sizeof(INTVAL), and nonmmapable otherwise. There is not much problem on the bytecode side. As we discussed before, the bytecode is a stream of (aligned) 32-bit values. Most platforms can handle 32-bit value efficiently. Other platforms can do simple conversion. I think what you really need to worry about is the file format, such as constant area, linkage table, etc. There is no need to make sizeof(opcode) == sizeof(INTVAL), since constant area can hold anything you need. All you need to do is one more indirection. Hong