[squeak-dev] Bootstrapping (Subversion (was: Re: Perl is to CPAN as Squeak is to (what)?))

Yoshiki Ohshima yoshiki at vpri.org
Sun Jun 29 09:09:42 UTC 2008


> I would also note that those annoying Linux folks might just have a
> point here. If we had followed these guidelines consistently over the
> last few years, we would not have ended up with the mess of lost
> author initials, untraceable changes, and unidentified licensing that
> we are faced with today.

  At least this time around, the licencing part isn't question.  We
are making progress^^;

  BTW, there was a discussion about a month ago (I basically read them
just recently), and Bert was asking that how hard it is to do
bootstrap from source.  I know many of you have thought about the
actual bootstrapping.  That would go something like:

  - Write a compiler in another language.  That can generates the bits
    that are same as CompiledMethods.  For a class definition, it
    creates (yes) the network of pointers.

  - The compiler sticks the class definitions, method dictionaries,
    subclass structure, and compiled methods into a big "int*" array.
    The goal is to make that something just run, so for example, the
    stuff managed by ClassDescription (instanceVariable names and
    organization) don't have to be compiled.  Stuff like the source
    pointer is not needed at this stage.

  - There should be a support for IdentityDictionary, Array, Symbol
    and String. and for the latter two, a way to create instances
    would be needed.  SystemDictionary and Undeclared would be the
    instances of IdentityDictionary that should be created and gets
    into the int* array.  The symbol table that manages the instances
    of Symbol is needed during the compilation, but it probably
    doesn't have to go into the int* array, as we can recreate it in
    the next initialization stage.

  - During the compilation, we may have some garbage, but of course we
    just leave them in the int* array.  A class may get many
    subclasses.  The subclasses array of the class may be assigned
    many times, but we just cr

  - In this senario, nil, true, false aren't needed, I believe (as
    CompiledMethods don't hold onto them). However, it would be nice
    to "create" them early and store in the int* array.

  - A few more necessary instances that go to special objects array is
    created.  Perhaps only Processor and active context would be
    needed.

  - The int* array is saved into a file with the header.

  - Now launch the image with a regular VM.  The active context goes
    over a list of classes and initialize them.

  - Compile all sources again so that they get proper source pointer.
    (Or, scan the sources and set the source pointers properly).

  - Create a project, enter and save the image normally.

  - Load more code. and keep it going.

  How feasible is it to do?  Or, do somebody have some idea that how
many contexts would we need to create "manually"?  What other
instances are needed?  How much code rewriting would be necessary?

  Yes, there are other ways of doing it.  For example, if we make the
kernel part is fairly small (like 500k), we can have a program that
holds onto the bytes as constant and write out to disk.  This would be
enough to persuade these people.  We can load all the rest onto it
later.  (But if this is the case, I'd ask myself that if 300k is ok
why not 20MB?  That was the artificial distinction Andreas mentioned,
I believe.)

-- Yoshiki



More information about the Squeak-dev mailing list