Documentation options

Jason Johnson jason.johnson.081 at
Sat Jan 12 19:31:17 UTC 2008

On Jan 2, 2008 9:20 PM, Igor Stasenko <siguctua at> wrote:
> Yes, it is. But if you know, compiled methods are well-known objects
> handled by VM.
> The current format of a CompiledMethod is as follows:
>         header (4 bytes)
>         literals (4 bytes each)
>         bytecodes  (variable)
>         trailer (variable)
> now, suppose you want to add new field, called 'docs' or whatever.
> Where would you put it?

But a better question is *why would you*?  From an OO design point of
view, a CompiledMethod has nothing to do with documentation, it does
not need something like that to do it's job.  Documentation, however
refers to compiled methods.  So the documentation classes should point
to what they document, and you can put a method on CompiledMethod like


     Documentation showFor: self

More information about the Squeak-dev mailing list