Adding information in CompiledMethod

Hans-Martin Mosner hmm at heeg.de
Sun Nov 16 22:11:41 UTC 2003


Stef wrote:
> 
> Hi
> 
> Imagine that we want to know (without introducing new declarative
> entities like in Ginsu) that a method belong
> to a certain package. In such hypothesis we need to store this
> information somewhere.
> 
> I would like toknow if this is easy/backward compatible to add an
> instance variable to CompiledMethod?
> 
> Stef

The new bytecode format should allow this easily.
However, you must always consider the code size impact.
I would prefer a compact encoding which could stuff a package number and
source position within that package into one integer, and use that
instead of the current file pointer which just handles 2 files - sources
and changes.
VW has something like that for their parcel source files, and I did a
similar thing for Squeak quite some time ago - remnants of the required
hooks into the SourceFiles machinery are probably still in the image.

Cheers,
Hans-Martin



More information about the Squeak-dev mailing list