<div dir="ltr"><div class="gmail_default" style="font-size:small">you need to revert this and start putting such extensions in your own  package.  This code is a) wrong (the failure code for objectIsReadOnly: is non sense), and b) unnecessary for Kernel. If you want to program at the interface between the system and the VM you *must* understand the VM architecture.  This code *will not work* without VM modifications.  This code displays a misunderstanding of, for example, the read-only bit. </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 28, 2021 at 4:47 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-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Christoph Thiede uploaded a new version of Kernel to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Kernel-ct.1439.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/trunk/Kernel-ct.1439.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Kernel-ct.1439<br>
Author: ct<br>
Time: 29 December 2021, 1:47:06.285067 am<br>
UUID: f55ab880-48e4-7946-b734-58afc7d03b57<br>
Ancestors: Kernel-ct.1438, Kernel-ct.1404<br>
<br>
Adds mirror primitives for primitiveGetImmutability (primitive 163/#isReadOnlyObject), primitiveSetImmutability (primitive 164/#setIsReadOnlyObject:), and primitiveClone (primitive 148/#shallowCopy).<br>
<br>
=============== Diff against Kernel-ct.1438 ===============<br>
<br>
Item was added:<br>
+ ----- Method: Context>>object:setIsReadOnly: (in category 'mirror primitives') -----<br>
+ object: anObject setIsReadOnly: aBoolean<br>
+       "Set the read-only flag of the argument anObject to the given value aBoolean and answer the previous value of the flag, without sending a message to anObject. This mimics the action of the VM when an object is set as read-only or writeable. See Object >> #setIsReadOnlyObject:."<br>
+ <br>
+       <primitive: 164 error: ec><br>
+       self primitiveFailed!<br>
<br>
Item was added:<br>
+ ----- Method: Context>>objectClone: (in category 'mirror primitives') -----<br>
+ objectClone: anObject<br>
+       "Answer a copy the argument anObject which share's the original's instance variables, without sending it a message. This mimics the action of the VM when it clones an object.<br>
+        Used to simulate the execution machinery by, for example, the debugger.<br>
+        Primitive.  See Object documentation whatIsAPrimitive."<br>
+ <br>
+       <primitive: 148><br>
+       self primitiveFailed!<br>
<br>
Item was added:<br>
+ ----- Method: Context>>objectIsReadOnly: (in category 'mirror primitives') -----<br>
+ objectIsReadOnly: anObject<br>
+       "Answer if the argument is read-only without sending it a message. This mimics the action of the VM when an object is tested for writeability. See Object >> #isReadOnlyObject."<br>
+ <br>
+       <primitive: 163 error: ec><br>
+       ^ (self objectClass: anObject) isImmediateClass!<br>
<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>