Torsten Bergmann uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-tbn.1112.mcz==================== Summary ====================
Name: Kernel-tbn.1112
Author: tbn
Time: 30 August 2017, 11:21:46.282311 pm
UUID: a4399bb0-13e7-7a4f-a0a1-d78bfbd3012e
Ancestors: Kernel-nice.1111
Cleanup pinning protocols
- isPinned moves from "system primitive" to "pinning"
- pin moves from "system primitive" to "pinning"
- unpin moves from "system primitive" to "pinning"
- setPinned: moves from "system primitive" to "private" (as this should not be part of the public API, people should use pin/unpin methods)
(similar to
https://github.com/pharo-project/pharo/pull/224 for Pharo)
=============== Diff against Kernel-nice.1111 ===============
Item was changed:
+ ----- Method: Object>>isPinned (in category 'pinning') -----
- ----- Method: Object>>isPinned (in category 'system primitives') -----
isPinned
"Answer if the receiver is pinned. The VM's garbage collector routinely moves
objects as it reclaims and compacts memory. But it can also pin an object so
that it will not be moved, which can make it easier to pass objects out through
the FFI."
<primitive: 183 error: ec>
^self primitiveFailed!
Item was changed:
+ ----- Method: Object>>pin (in category 'pinning') -----
- ----- Method: Object>>pin (in category 'system primitives') -----
pin
"The VM's garbage collector routinely moves objects as it reclaims and compacts
memory. But it can also pin an object so that it will not be moved, which can make
it easier to pass objects out through the FFI. Objects are unpinnned when created.
This method ensures an object is pinned, and answers whether it was already pinned."
^self setPinned: true!
Item was changed:
+ ----- Method: Object>>setPinned: (in category 'private') -----
- ----- Method: Object>>setPinned: (in category 'system primitives') -----
setPinned: aBoolean
"The VM's garbage collector routinely moves objects as it reclaims and compacts
memory. But it can also pin an object so that it will not be moved, which can make
it easier to pass objects out through the FFI. Objects are unpinnned when created.
This primitive either pins or unpins an object, and answers if it was already pinned."
<primitive: 184 error: ec>
^self primitiveFailed!
Item was changed:
+ ----- Method: Object>>unpin (in category 'pinning') -----
- ----- Method: Object>>unpin (in category 'system primitives') -----
unpin
"The VM's garbage collector routinely moves objects as it reclaims and compacts
memory. But it can also pin an object so that it will not be moved, which can make
it easier to pass objects out through the FFI. Objects are unpinnned when created.
This method ensures an object is unpinned, and answers whether it was pinned."
^self setPinned: false!