[squeak-dev] The Inbox: Kernel-eem.1191.mcz
David T. Lewis
lewis at mail.msen.com
Fri Oct 12 12:08:51 UTC 2018
On Fri, Oct 12, 2018 at 05:52:51AM +0000, commits at source.squeak.org wrote:
> Eliot Miranda uploaded a new version of Kernel to project The Inbox:
> ==================== Summary ====================
> Name: Kernel-eem.1191
> Author: eem
> Time: 11 October 2018, 10:52:37.059231 pm
> UUID: 465e029d-66ff-492d-a465-79f2867d2d8b
> Ancestors: Kernel-cmm.1190
> Remove adoptInstance:'s fallback on primitiveChangeClassTo:, which obscures potential failures on Spur. Committing to Inbox; this isn't urgent but I want it in soon enough.
By any chance do you have a reproducible code snippet that shows the
original problem? I realize this may not be easy if it involves Form
and endianness and so forth.
If so I will volunteer to turn it into a unit test. That is a good
way to guard against regression, and also easily identify the problem
when a user is running an older VM that may not have the fix.
> =============== Diff against Kernel-cmm.1190 ===============
> Item was changed:
> ----- Method: Behavior>>adoptInstance: (in category 'instance creation') -----
> adoptInstance: anInstance
> + "Change the class of anInstance to the receiver.
> + Primitive. Change the class of the argument anInstance into the receiver, provided
> + that the format of the receiver matches the format of the argument's class.
> + Fail if the argument is an immediate, or when the pointerness of the receiver is different
> + from the pointerness of the argument, or when the receiver is a fixed pointer class and
> + anInstance's size differs from the size that an instance of the receiver should have,
> + or when anInstance's size is not an integer multiple of the receiver's unit size."
> - "Change the class of anInstance to me.
> - Primitive (found in Cog and new VMs) follows the same rules as primitiveChangeClassTo:, but returns the class rather than the modified instance"
> <primitive: 160 error: ec>
> + ^self primitiveFailed!
> - anInstance primitiveChangeClassTo: self basicNew.
> - ^self!
More information about the Squeak-dev