[Vm-dev] VM Maker: VMMaker.oscog.seperateMarking-eem.3302.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Jan 12 22:14:32 UTC 2023


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

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

Name: VMMaker.oscog.seperateMarking-eem.3302
Author: eem
Time: 12 January 2023, 2:14:11.146706 pm
UUID: 948f1623-68fa-4d7f-9286-45087a3dce60
Ancestors: VMMaker.oscog.seperateMarking-eem.3301

Merge VMMaker.oscog-eem.3293

Simplify the TempVectReadBarrier testing in Stack/CoInterpreter, adding one method and deleting four, and testing TempVectReadBarrier in a single method only (albeit one that is overridden in CoInterpreter).

=============== Diff against VMMaker.oscog.seperateMarking-eem.3301 ===============

Item was removed:
- ----- Method: CoInterpreter>>pushRemoteTemp:inVectorAt: (in category 'stack bytecodes') -----
- pushRemoteTemp: index inVectorAt: tempVectorIndex
- 	"Override to use itemporary:in:put:"
- 	| tempVector |
- 	tempVector := self itemporary: tempVectorIndex in: localFP.
- 	TempVectReadBarrier
- 		ifTrue: 
- 			[(objectMemory isForwarded: tempVector) ifTrue:
- 				[tempVector := self unfollowTempVector: tempVector atIndex: tempVectorIndex in: localFP]].
- 	self internalPush: (objectMemory fetchPointer: index ofObject: tempVector)!

Item was removed:
- ----- Method: CoInterpreter>>storeRemoteTemp:inVectorAt: (in category 'stack bytecodes') -----
- storeRemoteTemp: index inVectorAt: tempVectorIndex
- 	"Override to use itemporary:in:put:"
- 	| tempVector |
- 	tempVector := self itemporary: tempVectorIndex in: localFP.
- 	TempVectReadBarrier
- 		ifTrue: 
- 			[(objectMemory isForwarded: tempVector) ifTrue:
- 				[tempVector := self unfollowTempVector: tempVector atIndex: tempVectorIndex in: localFP]].
- 	objectMemory storePointer: index ofObject: tempVector withValue: self internalStackTop!

Item was added:
+ ----- Method: CoInterpreter>>temporaryVector:in: (in category 'internal interpreter access') -----
+ temporaryVector: tempVectorIndex in: theFP
+ 	"Override to use itemporary:in:[put:]"
+ 	<inline: true>
+ 	| tempVector |
+ 	tempVector := self itemporary: tempVectorIndex in: theFP.
+ 	(TempVectReadBarrier
+ 	 and: [objectMemory isForwarded: tempVector]) ifTrue:
+ 		[tempVector := objectMemory followForwarded: tempVector.
+ 		 self itemporary: tempVectorIndex in: theFP put: tempVector].
+ 	^tempVector!

Item was removed:
- ----- Method: CoInterpreter>>unfollowTempVector:atIndex:in: (in category 'compiled methods') -----
- unfollowTempVector: tempVector atIndex: tempVectorIndex in: theFP
- 	"override for itemporary"
- 	<option: #TempVectReadBarrier>
- 	<inline: #never> "So rare it mustn't bulk up the common path"
- 	| followed |
- 	followed := objectMemory followForwarded: tempVector.
- 	self itemporary: tempVectorIndex in: theFP put: followed.
- 	^followed!

Item was changed:
  ----- Method: StackInterpreter>>pushRemoteTemp:inVectorAt: (in category 'stack bytecodes') -----
  pushRemoteTemp: index inVectorAt: tempVectorIndex
  	| tempVector |
+ 	tempVector := self temporaryVector: tempVectorIndex in: localFP.
- 	tempVector := self temporary: tempVectorIndex in: localFP.
- 	TempVectReadBarrier
- 		ifTrue: 
- 			[(objectMemory isForwarded: tempVector) ifTrue:
- 				[tempVector := self unfollowTempVector: tempVector atIndex: tempVectorIndex in: localFP]].
  	self internalPush: (objectMemory fetchPointer: index ofObject: tempVector)!

Item was changed:
  ----- Method: StackInterpreter>>storeLiteralVariable:withValue: (in category 'stack bytecodes') -----
  storeLiteralVariable: literalIndex withValue: anObject
  	| litVar |
+ 	 "In Spur:
+ 		push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field.
+ 		The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in
+ 		all methods in the stack zone, and the entire method on return, and global variables are relatively
+ 		rare; in my work image 8.7% of literals are globals)."
+ 	litVar := self followLiteral: literalIndex ofMethod: method.
- 	litVar := self literal: literalIndex.
- 	"push/store/popLiteralVariable all fetch a literal, and either read or write the literal's value field.
- 	 The fetch of the literal needs an explicit check (otherwise we would have to scan all literals in
- 	 all methods in the stack zone, and the entire method on return, and global variables are relatively
- 	 rare; in my work image 8.7% of literals are globals)."
- 
- 	(objectMemory isForwarded: litVar) ifTrue:
- 		[litVar := self unfollow: litVar atIndex: literalIndex].
  	objectMemory storePointerImmutabilityCheck: ValueIndex ofObject: litVar withValue: anObject!

Item was changed:
  ----- Method: StackInterpreter>>storeRemoteTemp:inVectorAt: (in category 'stack bytecodes') -----
  storeRemoteTemp: index inVectorAt: tempVectorIndex
  	| tempVector |
+ 	tempVector := self temporaryVector: tempVectorIndex in: localFP.
+ 	objectMemory storePointer: index ofObject: tempVector withValue: self internalStackTop!
- 	tempVector := self temporary: tempVectorIndex in: localFP.
- 	TempVectReadBarrier
- 		ifTrue: 
- 			[(objectMemory isForwarded: tempVector) ifTrue:
- 				[tempVector := self unfollowTempVector: tempVector atIndex: tempVectorIndex in: localFP]].
- 	objectMemory storePointer: index ofObject: tempVector withValue: self internalStackTop.!

Item was added:
+ ----- Method: StackInterpreter>>temporaryVector:in: (in category 'internal interpreter access') -----
+ temporaryVector: tempVectorIndex in: theFP
+ 	<inline: true>
+ 	| tempVector |
+ 	tempVector := self temporary: tempVectorIndex in: theFP.
+ 	(TempVectReadBarrier
+ 	 and: [objectMemory isForwarded: tempVector]) ifTrue:
+ 		[tempVector := objectMemory followForwarded: tempVector.
+ 		 self temporary: tempVectorIndex in: theFP put: tempVector].
+ 	^tempVector!

Item was removed:
- ----- Method: StackInterpreter>>unfollowTempVector:atIndex:in: (in category 'compiled methods') -----
- unfollowTempVector: tempVector atIndex: tempVectorIndex in: theFP
- 	<option: #TempVectReadBarrier>
- 	<inline: #never> "So rare it mustn't bulk up the common path"
- 	| followed |
- 	followed := objectMemory followForwarded: tempVector.
- 	self temporary: tempVectorIndex in: theFP put: followed.
- 	^followed!



More information about the Vm-dev mailing list