[Vm-dev] VM Maker: VMMaker.oscog-nice.1729.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Mar 15 22:49:25 UTC 2016


Nicolas Cellier uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-nice.1729.mcz

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

Name: VMMaker.oscog-nice.1729
Author: nice
Time: 15 March 2016, 11:47:13.473 pm
UUID: 4f72e8e6-9dd6-4446-93c4-f85d1b4fa668
Ancestors: VMMaker.oscog-nice.1728

Let the FullSimulationTest pass on a non spur host image.

Let the StackInterpreterTests>>testPointerTaggingDetagging pass on a simulated 64bits objectMemory

Fix StackInterpreterSimulator>>withoutSmallIntegerTags: which would not do the right thing in a 64bits spur flavour

=============== Diff against VMMaker.oscog-nice.1728 ===============

Item was changed:
  ----- Method: FullSimulationTest>>testSimulate2MillionBytecodes (in category 'as yet unclassified') -----
  testSimulate2MillionBytecodes
  	<timeout: 120>
  	| vm om |
+ 	vm := StackInterpreterSimulator newWithOptions: (Smalltalk isRunningSpur
+ 		ifTrue: [Smalltalk wordSize = 4
+ 			ifTrue: [#(#ObjectMemory #Spur32BitMemoryManager )]
+ 			ifFalse: [#(#ObjectMemory #Spur64BitMemoryManager )]]
+ 		ifFalse: [#(#ObjectMemory)]).
- 	vm := StackInterpreterSimulator newWithOptions: #(#ObjectMemory #Spur32BitMemoryManager ).
  	om := vm objectMemory.
  	vm desiredNumStackPages: 8. "Makes simulation faster by creating fewer stack pages."
  	vm openOn: Smalltalk imageName.
  	vm instVarNamed: 'assertVEPAES' put: false. "This makes the simulation faster by turning off some expensive asserts"
  	[[vm runForNBytes: 1500000]
  		on: Halt , ProvideAnswerNotification "This exception handler ignores some halts and confirmers occurring during simulation"
  		do: [:ex | 
  			ex messageText == #primitiveExecuteMethodArgsArray
  				ifTrue: [ex resume].
  			ex messageText = 'clear transcript?'
  				ifTrue: [ex resume: false].
  			ex pass]] ensure: [Display restore].!

Item was changed:
  ----- Method: StackInterpreterSimulator>>withoutSmallIntegerTags: (in category 'frame access') -----
  withoutSmallIntegerTags: anInteger
+ 	| signBit |
  	self assert: (anInteger >= 0 and: [anInteger highBit <= (objectMemory wordSize * 8)]).
+ 	signBit := 1 << (objectMemory wordSize * 8 - 1).
+ 	^(anInteger bitAnd: signBit) ~= 0
- 	^(anInteger bitAnd: 16r80000000) ~= 0
  		ifTrue: ["negative"
+ 				(anInteger bitClear: signBit + 1) - signBit]
- 				(anInteger bitAnd: 16r7FFFFFFE) - 16r80000000]
  		ifFalse: ["positive"
  				anInteger - 1]!

Item was changed:
  ----- Method: StackInterpreterTests>>testPointerTaggingDetagging (in category 'tests') -----
  testPointerTaggingDetagging
  	"Test the adding/removal of SmallInteger tags to memory adresses used in
  	 StackInterpreter and StackInterpreterSimulator for married context management."
  
  	"StackInterpreterTests new testPointerTaggingDetagging"
  
  	{ StackInterpreterSimulatorLSB new. "StackInterpreterSimulatorMSB new" } do: "Need to add MSB soon"
  		[:sis|
+ 		({ sis objectMemory minSmallInteger. sis objectMemory minSmallInteger / 2. -1024. -4. -8.
+ 		    sis objectMemory maxSmallInteger - 1. sis objectMemory maxSmallInteger // 2. 4. 8} collect:
+ 			[:n| n bitClear: sis objectMemory tagMask]) do:
- 		({ SmallInteger minVal. SmallInteger minVal / 2. -1024. -4.
- 		    SmallInteger maxVal - 1. SmallInteger maxVal // 2. 4 } collect:
- 			[:n| n bitAnd: -4]) do:
  				[:n| | tagged untagged |
+ 				self assert: (n bitAnd: sis objectMemory tagMask) = 0.
- 				self assert: n \\ 4 = 0.
  				self assert: (sis objectMemory isNonIntegerObject: n).
  				tagged := sis withSmallIntegerTags: n.
  				untagged := sis withoutSmallIntegerTags: tagged.
  				self assert: (sis objectMemory isIntegerObject: tagged).
  				self assert: untagged = n]]!



More information about the Vm-dev mailing list