[squeak-dev] The Trunk: Kernel-dtl.1467.mcz

commits at source.squeak.org commits at source.squeak.org
Fri May 6 23:49:52 UTC 2022

David T. Lewis uploaded a new version of Kernel to project The Trunk:

==================== Summary ====================

Name: Kernel-dtl.1467
Author: dtl
Time: 6 May 2022, 7:49:49.633221 pm
UUID: 801fcdf4-9dc9-4dfe-968e-3445984c492d
Ancestors: Kernel-nice.1466

Access methods to query primitiveMultipleBytecodeSetsActive in the VM, and primitiveBytecodeSetsAvailable to query the VM for known supported bytecode sets.

Background: In current practice, multiple bytecode sets active indicates that a Sista bytecode set is being used in the image (CompiledCode useSistaBytecodeSet: true). When set true in the VM, the image format number is updated accordingly in the saved image file (e.g. image format 68533  rather than 68021).

For a current VM: CompiledCode byteCodeSetsKnownToTheVM ==> #('EncoderForV3' 'EncoderForV3PlusClosures' 'EncoderForSistaV1') 

For the expected (but hopefully rare) case of an image format 68533 file that cannot be read by an older VM due to unrecognized image format number, the image file can be patched back to 68021 using a utility method from package ImageFormat from http://source.squeak.org/VMMaker:

ImageFormat class>>clearSistaBit: imageFileName
	"Rescue utility. If an image file was written by a VM that understands the new
	image format numbers for multiple bytecode support, but no local VM is available
	to run that image, this method can be used to rewrite the image format number
	to an older format number that is likely to readable."

=============== Diff against Kernel-nice.1466 ===============

Item was added:
+ ----- Method: CompiledCode class>>byteCodeSetsKnownToTheVM (in category 'method encoding') -----
+ byteCodeSetsKnownToTheVM
+ 	"Answer the encoder names for the bytecode sets reported to be supported
+ 	by the virtual machine. Informational, failure indicates only that the VM does
+ 	not support the primitive query."
+ 	"CompiledCode byteCodeSetsKnownToTheVM"
+ 	<primitive: 'primitiveBytecodeSetsAvailable'>
+ 	^ self primitiveFailed
+ !

Item was added:
+ ----- Method: CompiledCode class>>multipleBytecodeSetsActive (in category 'method encoding') -----
+ multipleBytecodeSetsActive
+ 	"Answer if the VM supports multiple bytecode sets, typically the Sista bytecodes
+ 	in addition to the traditional V3 bytecode set."
+ 	<primitive: 'primitiveMultipleBytecodeSetsActive'>
+ !

More information about the Squeak-dev mailing list