From ff32da6b46b0e9dbe2267bf58a2a122213b32bae Mon Sep 17 00:00:00 2001 From: hogoww Date: Thu, 23 Dec 2021 17:10:41 +0100 Subject: [PATCH] Mutant #564, Installing [ Replace #ifTrue: receiver with false ] on method [ markWeaklingsAndMarkAndFireEphemerons ] --- .../VMMaker/SpurMemoryManager.class.st | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/smalltalksrc/VMMaker/SpurMemoryManager.class.st b/smalltalksrc/VMMaker/SpurMemoryManager.class.st index d6cae225bb..832d7522ea 100644 --- a/smalltalksrc/VMMaker/SpurMemoryManager.class.st +++ b/smalltalksrc/VMMaker/SpurMemoryManager.class.st @@ -8456,30 +8456,34 @@ SpurMemoryManager >> markStack: anOop [ { #category : #'gc - global' } SpurMemoryManager >> markWeaklingsAndMarkAndFireEphemerons [ + "After the initial scan-mark is complete ephemerons can be processed. Weaklings have accumulated on the weaklingStack, but more may be uncovered during ephemeron processing. So trace the strong slots of the weaklings, and as ephemerons are processed ensure any newly reached weaklings are also traced." - | numTracedWeaklings | + + | numTracedWeaklings | numTracedWeaklings := 0. - [coInterpreter markAndTraceUntracedReachableStackPages. - coInterpreter markAndTraceMachineCodeOfMarkedMethods. - "Make sure all reached weaklings have their strong slots traced before firing ephemerons..." - [numTracedWeaklings := self markAndTraceWeaklingsFrom: numTracedWeaklings. - (self sizeOfObjStack: weaklingStack) > numTracedWeaklings] whileTrue. - self noUnscannedEphemerons ifTrue: - [coInterpreter + [ + coInterpreter markAndTraceUntracedReachableStackPages. + coInterpreter markAndTraceMachineCodeOfMarkedMethods. + "Make sure all reached weaklings have their strong slots traced before firing ephemerons..." + [ + numTracedWeaklings := self markAndTraceWeaklingsFrom: + numTracedWeaklings. + (self sizeOfObjStack: weaklingStack) > numTracedWeaklings ] whileTrue. + false ifTrue: [ + coInterpreter markAndTraceUntracedReachableStackPages; - markAndTraceMachineCodeOfMarkedMethods; + markAndTraceMachineCodeOfMarkedMethods; freeUntracedStackPages; freeUnmarkedMachineCode. - ^self]. - self markInactiveEphemerons ifFalse: - [self fireAllUnscannedEphemerons]. - self markAllUnscannedEphemerons] - repeat + ^ self ]. + self markInactiveEphemerons ifFalse: [ + self fireAllUnscannedEphemerons ]. + self markAllUnscannedEphemerons ] repeat ] { #category : #'header format' }