[squeak-dev] The method trailer format
Michael van der Gulik
mikevdg at gmail.com
Tue Dec 15 08:01:53 UTC 2009
On Sun, Dec 13, 2009 at 4:17 AM, Igor Stasenko <siguctua at gmail.com> wrote:
> Here is my proposal for changing the method trailer in order to be
> able to encode various stuff to trailer.
> Any corrections, suggestions are welcome.
> The kind of compiled method trailer is determined by the last byte of
> compiled method.
> The format is following:
If I were doing this (which, cooincidently, I am at the moment), I
would completely separate source code management from CompiledMethod.
Trash the CompiledMethod trailer and ignore the temp names. Instead,
add a second dictionary to Class which stores the source code pointers
("sourceDictionary" or something). If you don't want source code for a
class, you can make it nil.
What I'm currently working on is a bit more radical. I'm completely
separating source code from it's compiled form. I have PackageSource,
NamespaceSource, ClassSource and MethodSource classes which store
source code (in the image, not using source files) and contain methods
for compiling code, managing code, etc. Then I have Package,
Namespace, Class and CompiledMethod classes which only contain what is
necessary to run the code and relink themselves into a new image.
More information about the Squeak-dev