On 25-Sep-06, at 5:57 PM, David Griswold wrote:
Sorry, I'm not familiar with the Squeak VM, but why does Slang translate into untagged C arithmetic?
Dave, Slang _is_ the simulator effectively. It's just the Smalltalk code written in a pidgin sorta-C that can be executed to simulate the VM. Since it's just Smalltalk (albeit rather uglified Smalltalk) we just get to use the obvious integer overflow capabilities without thinking about it. Well, much. It does bop us on the nose occasionally when we forget that it will be turned into C.
Last case I can remember is when trying to make it possible to have 64 bit filepointers but still manage on OSs that don't use them.
We use the bottom bit as the tag for SmallInt and leave the bottom two 0 for oops so there is no fiddling to extract addresses. There have been occasional attempts to use the second tag bit for an extra immediate but so far no change has been adopted. The latest VM code is (we think) clean for 64bit machines but a number of the vm plugins are not yet reworked and some platform specific code may still assume 32bit machines.
I have to doubt that 64bit integers would be fast on all new machines. A substantial subset of 'all new machines' use ARM processors and they're still 32bit...... :-)
tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Attitudes are contagious. Mine might kill you