[squeak-dev] The Trunk: Kernel-ct.1439.mcz
Eliot Miranda
eliot.miranda at gmail.com
Wed Dec 29 01:32:27 UTC 2021
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.
On Tue, Dec 28, 2021 at 4:47 PM <commits at source.squeak.org> wrote:
> Christoph Thiede uploaded a new version of Kernel to project The Trunk:
> http://source.squeak.org/trunk/Kernel-ct.1439.mcz
>
> ==================== Summary ====================
>
> Name: Kernel-ct.1439
> Author: ct
> Time: 29 December 2021, 1:47:06.285067 am
> UUID: f55ab880-48e4-7946-b734-58afc7d03b57
> Ancestors: Kernel-ct.1438, Kernel-ct.1404
>
> Adds mirror primitives for primitiveGetImmutability (primitive
> 163/#isReadOnlyObject), primitiveSetImmutability (primitive
> 164/#setIsReadOnlyObject:), and primitiveClone (primitive 148/#shallowCopy).
>
> =============== Diff against Kernel-ct.1438 ===============
>
> Item was added:
> + ----- Method: Context>>object:setIsReadOnly: (in category 'mirror
> primitives') -----
> + object: anObject setIsReadOnly: aBoolean
> + "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:."
> +
> + <primitive: 164 error: ec>
> + self primitiveFailed!
>
> Item was added:
> + ----- Method: Context>>objectClone: (in category 'mirror primitives')
> -----
> + objectClone: anObject
> + "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.
> + Used to simulate the execution machinery by, for example, the
> debugger.
> + Primitive. See Object documentation whatIsAPrimitive."
> +
> + <primitive: 148>
> + self primitiveFailed!
>
> Item was added:
> + ----- Method: Context>>objectIsReadOnly: (in category 'mirror
> primitives') -----
> + objectIsReadOnly: anObject
> + "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."
> +
> + <primitive: 163 error: ec>
> + ^ (self objectClass: anObject) isImmediateClass!
>
>
>
--
_,,,^..^,,,_
best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20211228/94b5d10a/attachment.html>
More information about the Squeak-dev
mailing list
|