<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Hi Marcel,<div dir="ltr"><br><blockquote type="cite">On Dec 7, 2020, at 8:08 AM, Marcel Taeumel <marcel.taeumel@hpi.de> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">Hi Eliot.<div class="mb_sig"></div><div><br></div><div>In current Trunk, which has SistaV1 enabled, "<span style="font-size: 10pt">Smalltalk specialObjectsArray at: 38" is still "nil" but should be "FullBlockClosure". Is this good? How can the bytecode "pushFullClosure" work?</span></div></div></div></blockquote><div><br></div><div><p class="p1" style="margin: 0px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><span class="s1">Ha, good catch!  The answer is key to one of Spur’s performance gains over the old object representation.  If you collect the identityHashes of all Behaviors in the specialObjectsArray you’ll notice they all have small values.  In Spur an object header *does not* contain a full reference to the class of the object.  Instead it contains a 22 bit field that contains the identityHash of its class.  The heap contains a sparse array mapping class identityHash to class object.  That’s why Behavior>>identityHash is a different primitive to Ob</span>ject>>identityHash, to ensure that Behaviors have unique identityHashes.</p><p class="p1" style="margin: 0px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><br></p><p class="p1" style="margin: 0px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;">Consequently when the vm instantiates FullBlockClosure, Array, Message, LargePositiveInteger et al, commonly used classes known to the VM, it is storing a constant into the object header, not fetching the class from the specialObjectsArray.  In fact it writes the entire object header as a precomputed constant through the allocation pointer and hence instantiation in Spur is much faster than in V3.</p><p class="p1" style="margin: 0px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;"><br></p><p class="p1" style="margin: 0px; font-stretch: normal; line-height: normal; -webkit-text-size-adjust: auto;">But yes, we should arrange that (specialObjectsArray at:38) == FullBlockClosure.</p></div><div><br></div><div><blockquote type="cite"><div dir="ltr"><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr"><div><span style="font-size: 10pt"><br></span></div><div><span style="font-size: 10pt">CC squeak-dev</span></div><div><span style="font-size: 10pt"><br></span></div><div><span style="font-size: 10pt">Best,</span></div><div><span style="font-size: 10pt">Marcel</span></div></div></div></blockquote></div></body></html>