Adding a new imediate type

Colin Putney cputney at
Tue Jan 3 15:31:07 UTC 2006

Hans-Martin Mosner wrote:

> One thing that always comes up when talking about immediate classes are 
> immediate floats. But with a 32 bit object pointer they are mostly 
> useless. Immediate fixed-point numbers might have some use but would be 
> pretty application specific. For a system with many communicating object 
> spaces I envisioned using immediate objects for Symbols, having the 
> actual Symbol storage in a separate object space. But there are many 
> other possible solutions for this, so it does not require additional 
> immediate objects.

Immediate timestamps would be another interesting option. We could have 
the same sort of split between immediate and boxed timestamps as is used 
for SmallInteger and LargeInteger - timestamps farther from the 
reference date would be boxed.

What would b really cool though, (and I don't know if Martin's work 
allows for this) would be user-definable immediates. Adding a tag bit 
allows for 2 more immediate classes. With the right primitives, one 
could define a class, designate it as immediate and write methods that 
manipulate the bits of the object references, much the way SmallInteger 
does. There would probably have to be some machinery similar to the way 
compact classes are managed.


More information about the Squeak-dev mailing list