Skip to content

Commit

Permalink
Mutant pharo-project#565, Installing [ Replace #ifTrue: receiver with…
Browse files Browse the repository at this point in the history
… true ] on method [ markWeaklingsAndMarkAndFireEphemerons ]
  • Loading branch information
hogoww committed Dec 23, 2021
1 parent b977608 commit d795dda
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions smalltalksrc/VMMaker/SpurMemoryManager.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
<inline: false>
| 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.
true 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' }
Expand Down

0 comments on commit d795dda

Please sign in to comment.