[squeak-dev] Re: The method trailer format

Andreas Raab andreas.raab at gmx.de
Sat Dec 12 21:24:35 UTC 2009


Igor Stasenko wrote:
> k = 111110
> the trailer is encoded source pointer. Total trailer size is 5-bytes
> 
> k = 111101
> the trailer is encoded source pointer. Total trailer size is 6-bytes
> 
> k = 111100
> the trailer is encoded source pointer. Total trailer size is 7-bytes
> 
> k = 111011
> the trailer is encoded source pointer. Total trailer size is 8-bytes

That's a bit wasteful. You can use a variable length encoding at no 
const for the usual range of source pointers (i.e., use the high-level 
bit to mean that there's another byte to come; this gives you 28 bits 
range in 4 bytes). Keep the other patterns reserved; you don't know what 
you might want them for at a later point.

Cheers,
   - Andreas



More information about the Squeak-dev mailing list