<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>The reason appears to be that CompiledCode >> #hash takes the receiver class into consideration whereas CompiledCode >> #= doesn't.</p>
<p>So what behavior do we actually want?<br>
</p>
<p>If you remove the "+ <span>self methodClass hash" from CompiledCode >> #hash, #testHash fails in the last statement instead because there are too many double hashes.</span></p>
<p><span>Should we respect the methodClass in CompiledCode >> #= as well?</span></p>
<p><span>I think this could actually make sense because the byte codes for inst var access are only meaningful in combination with the definition of the receiver class.</span></p>
<p><span>Opinions? :-)</span></p>
<p><span><br>
</span></p>
<p><span>Best,</span></p>
<p><span>Christoph</span></p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Vanessa Freudenberg <vanessa@codefrau.net><br>
<b>Gesendet:</b> Montag, 5. April 2021 23:37:55<br>
<b>An:</b> The general-purpose Squeak developers list<br>
<b>Cc:</b> packages@lists.squeakfoundation.org<br>
<b>Betreff:</b> Re: [squeak-dev] The Trunk: KernelTests-codefrau.395.mcz</font>
<div> </div>
</div>
<div>
<div dir="ltr">Btw, I only fixed the test.
<div><br>
</div>
<div>Which makes the test fail in trunk.</div>
<div><br>
</div>
<div>Eliot must have had a reason to create the test so Someone™️ should probably look at that. I probably don't have time for that soon.</div>
<div><br>
</div>
<div>- Vanessa -</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sat, Apr 3, 2021 at 12:06 PM <<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Vanessa Freudenberg uploaded a new version of KernelTests to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/KernelTests-codefrau.395.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/trunk/KernelTests-codefrau.395.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: KernelTests-codefrau.395<br>
Author: codefrau<br>
Time: 3 April 2021, 12:06:03.17026 pm<br>
UUID: 062e8b73-a62e-46ce-af80-0dbb34c2f8dc<br>
Ancestors: KernelTests-mt.394<br>
<br>
Fix typo in CompiledMethodComparisonTest.<br>
<br>
=============== Diff against KernelTests-mt.394 ===============<br>
<br>
Item was changed:<br>
  ----- Method: CompiledMethodComparisonTest>>testHash (in category 'tests') -----<br>
  testHash<br>
        <timeout: 120><br>
<br>
        | ai |<br>
        ai := CompiledMethod allInstances.<br>
        "We assume here that if two CompiledMethods are equal then they have the same size and header."<br>
        (ai groupBy: [ :method | { method size. method header } ]) values<br>
                replace: [ :each | each asArray ];<br>
                do: [ :methods |<br>
                        1 to: methods size do: [ :i |<br>
                                i to: methods size do: [ :j |<br>
                                        (methods at: i) = (methods at: j) ifTrue: [<br>
+                                               self assert: (methods at: i) hash equals: (methods at: j) hash ] ] ] ]<br>
-                                               self assert: (methods at: i) hash equals: (methods at: i) hash ] ] ] ]<br>
                displayingProgress: 'Testing hashes'.<br>
        self assert: (ai collect: [ :cm | cm hash ] as: Set) size * 2 >= ai asSet size!<br>
<br>
<br>
</blockquote>
</div>
</div>
</body>
</html>