I want to thank to Eliot, Igor, Michael, Alexandre and others for the help and feedback. I&#39;ve posted the announce of the browser and it is awaiting for approval.<br>Best regards.<br><br>Hernán<br><br><div class="gmail_quote">
2008/11/21 Bergel, Alexandre <span dir="ltr">&lt;<a href="mailto:bergel@iam.unibe.ch">bergel@iam.unibe.ch</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
It works now.<br>
<br>
I read the paper of Hinkle and al. Lightweight classes are useful to debug.<br>
Using lightweight class assumes that a programmer is able to infer from which object his analyze should start from. I am wondering whether this is not a too strong assumption. From my experience, just guessing from which class to start from is a big step.<br>

<br>
Cheers,<br>
Alexandre<div><div></div><div class="Wj3C7c"><br>
<br>
<br>
On 19 Nov 2008, at 11:56, Hernán Morales Durand wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c">
Hi Alexandre,<br>
&nbsp;Monticello store UnstoredMethod class definition type as #compiledMethod where should be #bytes in this particular case [*]. Try to load the attached .mcz or load the previous one using the Load option in the file list (you probably need to add the .mcz extension if was removed by your e-mail client).<br>

Best regards.<br>
<br>
Hernán<br>
<br>
[*] To fix this in MC in #typeOfClass one should invert the type check order:<br>
<br>
self instSpec = CompiledMethod instSpec ifTrue:[ &nbsp; &nbsp; &nbsp; &nbsp;^ #compiledMethod]. &quot;Very special!&quot;<br>
self isBytes ifTrue:[^#bytes].<br>
<br>
to<br>
<br>
self isBytes ifTrue:[^#bytes].<br>
self instSpec = CompiledMethod instSpec ifTrue:[ &nbsp; &nbsp; &nbsp; &nbsp;^ #compiledMethod]. &quot;Very special!&quot;<br>
<br>
but maybe someone with good knowledge of MC should confirm if that&#39;s ok. (I&#39;m using Monticello-pmm.318)<br>
<br>
2008/11/19 Bergel, Alexandre &lt;<a href="mailto:bergel@iam.unibe.ch" target="_blank">bergel@iam.unibe.ch</a>&gt;<br>
Hi Hernán,<br>
<br>
I get an error when trying to load your file: &#39;5 instvar names are required&#39;<br>
Strange.<br>
<br>
Alexandre<br>
<br>
<br>
<br>
On 16 Nov 2008, at 22:58, Hernán Morales Durand wrote:<br>
<br>
Dear all,<br>
In the attachment you will find an implementation of Lightweight Classes for Squeak that follows the original paper &quot;Debugging Objects&quot; of Hinkle et al. However I was unable to set up the #class method in the LightweightClass to answer the real class of the lightwighted object, is this possible currently in Squeak?.<br>

<br>
What I did:<br>
-Created the LightweightClass as in the old VisualWorks implementation. The only difference here was CompiledMethod&#39;s cannot be copied, so I used #clone.<br>
-Created and installed an UnstoredMethod (a CompiledMethod subclass) in the LightweightClass&#39;s methodDictionary. Since I want to store the source code but not through the changes log, I borrowed the MethodWrappers idea of storing the state (sourceCode) in a class instance variable, and compile without logging. The methods I borrowed from MW are:<br>

<br>
-#copyWithTrailerBytes: - I think the superimplementor in CompiledMethod could use &quot;self class&quot; to avoid reimplementors.<br>
-#tweakClassFormat - which set the format but I don&#39;t know why and cannot find documentation on this.<br>
-#objectAt: I suspected the class literal was stored in the literal frame everytime I accepted a method, but for the simple test below still answer the LightweightClass and not the real class.<br>
<br>
Here is the test:<br>
<br>
| aDate |<br>
aDate := Date today.<br>
aDate becomeLightweight.<br>
aDate dispatchingClass compile: &#39;day ^43&#39; notifying: nil.<br>
aDate day. &quot; 43 (works) &quot;<br>
aDate perform: #class. &quot; Date ------&gt; (works) &quot;<br>
aDate class. &quot; {Date} ------&gt; LightweightClass (wrong) &quot;<br>
<br>
Any hint would be appreciated.<br>
Best regards.<br>
<br>
Hernán<br>
<br>
PS: Just to avoid duplicate efforts, I wrote a LightweightClasses Browser which will be available as soon as I find a solution to the problem above.<br>
&lt;LightweightClasses-hfm.1.mcz&gt;<br>
<br>
-- <br>
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:<br>
Alexandre Bergel &nbsp;<a href="http://www.bergel.eu" target="_blank">http://www.bergel.eu</a><br>
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br></div></div>
&lt;LightweightClasses-hfm.2.mcz&gt;<br>
</blockquote><div><div></div><div class="Wj3C7c">
<br>
-- <br>
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:<br>
Alexandre Bergel &nbsp;<a href="http://www.bergel.eu" target="_blank">http://www.bergel.eu</a><br>
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.<br>
<br>
<br>
<br>
<br>
<br>
<br>
</div></div></blockquote></div><br>