Eliot Miranda uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.oscog-eem.3331.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.3331 Author: eem Time: 15 July 2023, 3:09:20.265325 pm UUID: a3f6d0ef-e74c-414c-a9f1-79fb2c7be0f4 Ancestors: VMMaker.oscog-eem.3330
The StackInterpreter needs a version of followForwardingPointersOfReceiverAndTemporariesInStackZone, not just CoInterpreter.
=============== Diff against VMMaker.oscog-eem.3330 ===============
Item was added: + ----- Method: StackInterpreter>>followForwardingPointersOfReceiverAndTemporariesInStackZone (in category 'object memory support') ----- + followForwardingPointersOfReceiverAndTemporariesInStackZone + "A more thorough version of followForwardingPointersInStackZone that also follows all temporaries (but not stack contents after the temps). + This allows removal of the TempVectReadBarrier in the IGC" + <inline: false> + + stackPage ifNil: "the system must be snapshotting; nothing to do..." + [self assert: (stackPages mostRecentlyUsedPage isNil or: [stackPages mostRecentlyUsedPage isFree]). + self cCode: [] inSmalltalk: [self assert: stackPages allPagesFree]. + ^self]. + + self externalWriteBackHeadFramePointers. + + 0 to: numStackPages - 1 do: + [:i| | thePage theFP theSP theIPPtr callerFP offset oop frameRcvrOffset methodHeader | + thePage := stackPages stackPageAt: i. + thePage isFree ifFalse: + [self assert: (self ifCurrentStackPageHasValidHeadPointers: thePage). + theFP := thePage headFP. + "Skip the instruction pointer on top of stack of inactive pages." + theIPPtr := thePage = stackPage ifFalse: [thePage headSP asUnsignedInteger]. + [self assert: (thePage addressIsInPage: theFP). + self assert: (theIPPtr isNil or: [thePage addressIsInPage: theIPPtr asVoidPointer]). + oop := stackPages longAt: theFP + FoxReceiver. + (objectMemory isOopForwarded: oop) ifTrue: + [stackPages + longAt: theFP + FoxReceiver + put: (objectMemory followForwarded: oop)]. + ((self frameHasContext: theFP) + and: [(objectMemory isForwarded: (self frameContext: theFP))]) ifTrue: + [stackPages + longAt: theFP + FoxThisContext + put: (objectMemory followForwarded: (self frameContext: theFP))]. + oop := self frameMethod: theFP. + (objectMemory isForwarded: oop) ifTrue: + [| newOop delta | + newOop := objectMemory followForwarded: oop. + theIPPtr ifNotNil: + [self assert: (stackPages longAt: theIPPtr) > (self frameMethod: theFP). + delta := newOop - oop. + stackPages + longAt: theIPPtr + put: (stackPages longAt: theIPPtr) + delta]. + stackPages + longAt: theFP + FoxMethod + put: (oop := newOop)]. + methodHeader := objectMemory methodHeaderOf: oop. + offset := self frameStackedReceiverOffsetNumArgs: (self argumentCountOfMethodHeader: methodHeader). + oop := stackPages longAt: theFP + offset. + (objectMemory isOopForwarded: oop) ifTrue: + [stackPages + longAt: theFP + offset + put: (objectMemory followForwarded: oop)]. + frameRcvrOffset := theFP + FoxIFReceiver. + theSP := frameRcvrOffset - ((self temporaryCountOfMethodHeader: methodHeader) * objectMemory wordSize). + [theSP <= frameRcvrOffset] whileTrue: + [oop := stackPages longAt: theSP. + (objectMemory isOopForwarded: oop) ifTrue: + [oop := objectMemory followForwarded: oop. + stackPages longAt: theSP put: oop]. + theSP := theSP + objectMemory wordSize]. + (callerFP := self frameCallerFP: theFP) ~= 0] whileTrue: + [theIPPtr := (theFP + FoxCallerSavedIP) asUnsignedInteger. + theFP := callerFP]. + "And finally follow the caller context." + self assert: theFP = thePage baseFP. + oop := self frameCallerContext: theFP. + (objectMemory isForwarded: oop) ifTrue: + [self frameCallerContext: theFP put: (objectMemory followForwarded: oop)]]]!
vm-dev@lists.squeakfoundation.org