|
From: Ian P. <ian...@in...> - 2004-04-09 10:41:37
|
[subject line changed to reduce the stress on Craig's mail client ;-] Hi Anthony, > Also, I haven't heard anyone mention refactoring the bytecodes (eg. > getting rid of doubleExtendedDoAnythingBytecode). I bet a JIT would > prefer an alternative encoding. I think you know that's true. ;) To get anywhere with even the simplest code analysis, the first thing a JIT will do is to convert the bytecodes into a "canonical form" where there's only 1 form of each operation and (probably) all bytecodes are the same size (e.g., a word for each operation containing 1 byte of opcode and up to 3 bytes of operands). This kind of transformation reduces 253 or so bytecodes down to about 20 or so "canonical" operations. > Code in the block and its outer > methods access these changeable values by sending get and set messages > to the ValueHolder. Is the only reason to send messages to these things the lack of bytecodes to encode the additional indirections? (Type: "load/store/pop free var N from enclosing environment at level M".) Or have I missed something? > If we change the > bytecodes, maybe we should add the ValueHolder create, get, and set > messages, and the createBlockClosure message as special common selector > bytecodes. Certainly. (Or maybe we could do even better...) Cheers, Ian |