|
From: Ian P. <ian...@in...> - 2004-04-08 23:52:51
|
Hi Ian,
On 09 Apr 2004, at 01:27, Ian Piumarta wrote:
>> Hm... this would actually be a strong argument against introducing
>> more
>> immediates. They would have similar properties wouldn't they?
>
> Yes, absolutely. (At least in the lower magnitudes of the
> price/performance equation.)
No, not necessarily.
We have an array containing the classes for each tag combination (init
from splObj at startup, ensure remap during GC) then (for a 2-bit tag
field):
Interp
instVars: '... immediateClasses ...'
Interp>>classOf: anObj
| tag |
self inline: true.
^(tag _ anObj bitAnd: 3) == 0
ifTrue: [self classHeaderOf: anObj]
ifFalse: [immediateClasses at: tag]
or something similar. Costs the same as if we only had one tag bit
(with ClassSmallInt sucked out of splObj).
Cheers,
Ian
|