> try this (printIt) in a workspace (beware, it will not return and may
> hang the system for good):
> [1 + 1] storeString
Not at all surprising in the current system (assuming a 37-5989-full
image) since this will effectively try to make a store string of the
entire image. In fact it's almost a oneline definition of how to do a
garbage collect mark-phase i.e. start at the current context and mark
everything you can touch, recursivley.
To see for yourself what happens, try [1+1] halt storeString and
follow it through for a while. You'll see as it follows up the sender
chain throught Processes and the ProcessorScheduler, wanders around
the compiled methods, up the class and metaclasses chains, and across
hill and down dale. If you have the patience (and nothing really
useful to do) it will be quite an education.
The interesting question is what one would actually want to be written
out. Where exactly should it stop? Perhaps at any global in the belief
that a reference to (Smalltalk at:#Foo) is enough. How about the
sender chain - how much of that should be captured and what about the
compiledmethods encountered along the way? I had to come up with a
plausible solution some years ago for database usage in a big
financial app but I really wouldn't claim it could count as a perfect
general solution.
tim