[Vm-dev] VM Maker: Cog-eem.436.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Jun 22 22:00:02 UTC 2021


Eliot Miranda uploaded a new version of Cog to project VM Maker:
http://source.squeak.org/VMMaker/Cog-eem.436.mcz

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

Name: Cog-eem.436
Author: eem
Time: 22 June 2021, 3:00:00.075766 pm
UUID: 644192a7-a217-4644-917e-497129b8824d
Ancestors: Cog-eem.435

Image level tests for Spur shorten:toIndexableSize:

=============== Diff against Cog-eem.435 ===============

Item was added:
+ ----- Method: CogVMTests>>primitiveShorten:to: (in category 'support') -----
+ primitiveShorten: anObject to: indexableSize
+ 	<primitive: #primitiveTestShortenIndexableSize module: '' error: ec>
+ 	self primitiveFailed!

Item was added:
+ ----- Method: CogVMTests>>testShorten (in category 'tests') -----
+ testShorten
+ 	"The VM requires shortening for ImageSegment load and for Sista introspection.
+ 	 It uses these facilities on WordArrays (ImageSegment) and Array (Sista) only.
+ 	 Test that both objects in newSpace and oldSpace can be shortened successfully.
+ 	 Note that implicitly this tests issues to do with object enumeraiton and slimbridges
+ 	 in the VM, i.e. this test is most usefully run in an image running on the simulator."
+ 
+ 	{ WordArray. Array } do:
+ 		[:class|
+ 		 (1 to: 8), (1024 to: 1032) do: "1 to: 8 for no overflow header, 1024 to: 1032 for overflow header"
+ 			[:s|
+ 			{s. s - 1. s - 2. s // 2. 1. 2. 4 } do:
+ 				[:delta| | newArray oldArray |
+ 				(delta between: 1 and: s) ifTrue:
+ 					[newArray := class new: s.
+ 					self primitiveShorten: newArray to: s - delta.
+ 					self assert: s - delta equals: newArray size.
+ 					oldArray := class new: s.
+ 					oldArray pin; unpin. "Move to oldSpace"
+ 					self primitiveShorten: oldArray to: s - delta.
+ 					self assert: s - delta equals: oldArray size]]]]
+ 
+ 	"self new testShorten"
+ 	
+ 	"(FileStream oldFileNamed: 'CogVMTests-shorten.st') fileIn. CogVMTests new testShorten!!"!



More information about the Vm-dev mailing list