[squeak-dev] Switching to Sista bytecodes in trunk (was: The Inbox: Kernel-dtl.1310.mcz)

David T. Lewis lewis at mail.msen.com
Sat Mar 7 00:43:29 UTC 2020


The Sista bytecode set enables important reasearch and development work.
Eliot and Clemont can explain better than me (apologies to Clemont Bera
for using my seven-bit character set on your name).

Squeak 5.3 is released and we are starting the new release cycle, so it
is time to make Sista the default in trunk. Kernel-dtl.1310 (in the inbox)
activates Sista in the package postscipt.

Dave

On Sat, Mar 07, 2020 at 12:29:13AM +0000, commits at source.squeak.org wrote:
> David T. Lewis uploaded a new version of Kernel to project The Inbox:
> http://source.squeak.org/inbox/Kernel-dtl.1310.mcz
> 
> ==================== Summary ====================
> 
> Name: Kernel-dtl.1310
> Author: dtl
> Time: 6 March 2020, 7:29:11.316779 pm
> UUID: 683e4e14-fc18-4d55-a776-eece91f579f5
> Ancestors: Kernel-mt.1309
> 
> Change the Squeak default bytecode set to Sista in trunk.
> 
> Add CompiledCode>>multipleBytecodeSetsActive: to optionally inform the VM that Sista is in use, see VMMaker.oscog-dtl.2711 and http://lists.squeakfoundation.org/pipermail/vm-dev/2020-January/032441.html.
> 
> Add CompiledCode>>useSista: convenience method for switching to and from Sista bytecodes.
> 
> Package postscript activates the change to Sista bytecodes, which can be reversed by evaluating CompiledCode useSista: false.
> 
> =============== Diff against Kernel-mt.1309 ===============
> 
> Item was added:
> + ----- Method: CompiledCode class>>multipleBytecodeSetsActive: (in category 'method encoding') -----
> + multipleBytecodeSetsActive: aBoolean
> + 	"Inform the VM when multiple bytecode sets, typically the Sista bytecodes
> + 	in addition to the traditional V3 bytecode set, are now in use is this image.
> + 	The VM may use this information to update the image format number when
> + 	saving the image to the file system."
> + 
> + 	<primitive: 'primitiveMultipleBytecodeSetsActive'>
> + !
> 
> Item was added:
> + ----- Method: CompiledCode class>>useSista: (in category 'method encoding') -----
> + useSista: useSistaEncoder
> + 	"Switch to or from the Sista bytecode encoder, and recompile the system
> + 	using that encoder. Assumes that Compiler recompileAll is working for the
> + 	existing system. Assumes that the currently available primary and secondary
> + 	bytecode encoders are EncoderForV3PlusClosures and EncoderForSistaV1.
> + 	This is a convenience method that must be updated as the available encoders
> + 	are changed."
> + 
> + 	"CompiledCode useSista: true"
> + 	"CompiledCode useSista: false"
> + 
> + 	| standardEncoder sistaEncoder activeEncoder |
> + 	standardEncoder := Smalltalk classNamed: #EncoderForV3PlusClosures.
> + 	sistaEncoder := Smalltalk classNamed: #EncoderForSistaV1.
> + 	activeEncoder := self preferredBytecodeSetEncoderClass.
> + 	useSistaEncoder
> + 		ifTrue: [sistaEncoder ifNil: [self error: 'EncoderForSistaV1 not present in this image'].
> + 			self preferredBytecodeSetEncoderClass: sistaEncoder.
> + 			activeEncoder ~= sistaEncoder
> + 				ifTrue: [(Smalltalk classNamed: #Compiler) recompileAll.
> + 			self multipleBytecodeSetsActive: true "VM should support Sista plus V3" ]]
> + 		ifFalse: [standardEncoder ifNil: [self error: 'EncoderForV3PlusClosures not present in this image'].
> + 			self preferredBytecodeSetEncoderClass: standardEncoder.
> + 			activeEncoder ~= standardEncoder
> + 				ifTrue: [(Smalltalk classNamed: #Compiler) recompileAll.
> + 			self multipleBytecodeSetsActive: false "VM needs to support V3 only" ]].
> + 
> + !
> 
> Item was changed:
> + (PackageInfo named: 'Kernel') postscript: '"Activate Sista bytecodes in the image"
> + 
> + CompiledCode useSista: true.
> + '!
> - (PackageInfo named: 'Kernel') postscript: '"below, add code to be run after the loading of this package"
> - "Since Kernel-eem.1198 redefines LargePositiveInteger hash,
> -  rehash all hashed collections that contain hashed large integers."
> - HashedCollection allSubclassesDo:
> - 	[:c| | f |
> - 	f := (c includesBehavior: Set)
> - 			ifTrue: [[:i| i]]
> - 			ifFalse: [[:i| i keys]].
> - 	c allInstancesDo:
> - 		[:h|
> - 		 ((f value: h) detect: [:e| e isInteger and: [e class ~~ SmallInteger]] ifNone: nil) ifNotNil:
> - 			[h rehash]]]'!
> 
> 


More information about the Squeak-dev mailing list