First public push of the first step of the hazelnut GSoC project :)<br><br><b>In a nutshell</b><br><br>For those who didn&#39;t know SystemTracer (the father):<br>
It is a tool that traces a graph of objects and writes an image from it.<br><br>ImageWriter is a refactored, renamed and repackaged version of SystemTracer2 with the following changes:<br>- The image format can be provided as a parameter.<br>
- You have to provide an SmalltalkImage object as root to write the image (so in the future we can write bootstrap with this).<br>- The object format was reified in objects.  So the code is easier to understand + change, and people can learn how are our objects in memory easily :D.<br>
<br>Right now, only 32 bit image format is supported.<br><br><b>Structure</b><br><br>- ImageWriter-Core has the image formats and the image writer in itself<br>- ImageWriter-ObjectFormats contains objects that represent the memory layout of the objects and it&#39;s headers.<br>
- ImageWriter-Tests has some tests.<br><br><b>Tests done</b><br><br> - Only tested in Pharo-1.4<br> - There are specific tests written for the size and headers of the objects<br> - Also, I&#39;ve written a Pharo-1.4 image and then run the tests in the copied image.  Only one failure compared to the original :)<br>
<br><b>Known Bugs :)</b><br><br> - WeakRegistryTest&gt;&gt;#testFinalizationWithOnFork is failing, and when I run it manually it works :/.  In the image I use to write, it does not happen, only in the clone.<br> - When opening the new image, the window is too small.  It is not respecting the original image size.  Don&#39;t know yet what is the problem.<br>
<br><b>How To Download</b><br><br>Gofer it<br>    squeaksource3: &#39;ImageWriter&#39;;<br>    package: &#39;ImageWriter-Core&#39;;<br>    package: &#39;ImageWriter-ObjectFormats&#39;;<br>    package: &#39;ImageWriter-Tests&#39;;<br>
    load<br><br><b>How to Use it</b><br><br>  HzImageWriter new<br>    format: HzCogImageFormat new; &quot;or HzInterpreterImageFormat new&quot;<br>    imageFileName: &#39;someFile.image&#39;;<br>    onInitializeDo: [ &quot;Some initialization?&quot; ];   &quot;this is optional, probably the same as an startup script, probably nonsense&quot;<br>
    writeImage: Smalltalk  &quot;Yes, we provide the our lovely global Smalltak, but any SmalltalkImage instance could be&quot;<br><br><b>Next steps on this direction</b><br><br> - support to write an isolated image different from the host one (I&#39;ll know what I need later, hehe)<br>
 - class comments!<br> - metacello configuration<br> - better api :)<br><br><b>Links</b><br><br><a href="http://ss3.gemstone.com/ss/ImageWriter.html">http://ss3.gemstone.com/ss/ImageWriter.html</a><br><br><br>Cheers,<br>Guille<br>