Bryce Kampjes bryce@kampjes.demon.co.uk wrote:
But the OOP mask can be done for free by using addressing modes. Even RISCs include loads and stores with a small constant offset. Just add the tag to the constant offset. Chances are that an offset is already used to point to the instance variable being fetched.
Mm. I guess that could be made to work ok, particularly via a translator that can keep track of accumulating offets. In the old days an ARM could handle it because it simply ignored the bottom two bits of an address unless fetching a byte :-)
Another successfully used tag scheme is to use the top bit to mark SmallInts. Arithmetic is quite simple and overflow checking stays easy. It does limit your effective address space to half though.
tim