serialization and rematerialization of CompiledMethods, assistance needed!

Chris Muller afunkyobject at yahoo.com
Tue Feb 26 19:28:44 UTC 2002


Thank you Tim, Bob, John, Stephen and everyone else for your great responses. 
I feel a bit more informed about it, but still wondering a bit about:

  - In VisualAge, I'm able to store and retrieve CompiledMethods just fine
because the literals and pointer variables are actually *instance variables* of
the class CompiledMethod.  If the CompiledMethod in Squeak only holds
"references" to the literals (since it inherits from ByteArray, I presume this
to be a memory-location-integer-reference to the String literal, and not the
String itself), then how do the String literals themselves avoid being garbage
collected?

  - How do the ReferenceStreams manage to rematerialize CompiledMethods?  Do
they instantiate and then go back through the literals and change them to point
to the "real" literal?  I'll have to check this out.

  - The next thing on my list is to get the BlockContexts going.  They have a
methodContext, so am I going to have similar challenges w/ blocks?

  - And finally, what is VI4?  If it is going to make this easier then I may
just wait for it..

You know, I think the Squeak community provides better "support" (in my
experience) than a lot of high-priced corporate service contracts!

Best regards,
  Chris

PS - Bob, to answer your question about going the source route, it is still an
option, but this is for a GemStone-like ODBMS and I want to be able to store
objects as close to their "native" form as possible.  Recompiling the source
introduces some added complexity and probably lower performance but, as I said,
it is a worthy option.  Thank you..

The "semi-compiled" format that Stephen suggested is also being considered.  I
used to have "storage objects" for a couple of classes (which were simply a
different representation of the object that made rematerailization feasible. 
For example, storing LargeIntegers > 64-bits into a wrapper of its
printString).  However, I have moved away from them in favor of custom buffer
formats for various implementation complexity reasons..


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com



More information about the Squeak-dev mailing list