Skip to content

Commit

Permalink
Mutant pharo-project#451, Reverting [ Replace #ifTrue: with #ifFalse:…
Browse files Browse the repository at this point in the history
… ] on method [ lastPointerOfWhileSwizzling: ] KILLED by 1/209 test cases.
  • Loading branch information
hogoww committed Dec 23, 2021
1 parent 325fa67 commit 280b09b
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions smalltalksrc/VMMaker/SpurMemoryManager.class.st
Expand Up @@ -7844,26 +7844,25 @@ SpurMemoryManager >> lastPointerOfMethodHeader: methodHeader [
]
{ #category : #snapshot }
SpurMemoryManager >> lastPointerOfWhileSwizzling: objOop [
SpurMemoryManager >> lastPointerOfWhileSwizzling: objOop [
"Answer the byte offset of the last pointer field of the given object.
Works with CompiledMethods, as well as ordinary objects.
Does not examine the stack pointer of contexts to be sure to swizzle
the nils that fill contexts on snapshot.
It is invariant that on image load no object contains a forwarding pointer,
and the image contains no forwarders (see class comment)."
<api>
<inline: true>
| fmt header |
fmt := self formatOf: objOop.
self assert: fmt ~= self forwardedFormat.
fmt <= self lastPointerFormat ifTrue: [
^ (self numSlotsOf: objOop) - 1 * self bytesPerOop
+ self baseHeaderSize "all pointers" ].
fmt < self firstCompiledMethodFormat ifFalse: [ ^ 0 ].
fmt <= self lastPointerFormat ifTrue:
[^(self numSlotsOf: objOop) - 1 * self bytesPerOop + self baseHeaderSize "all pointers"].
fmt < self firstCompiledMethodFormat ifTrue: [^0]. "no pointers"
"CompiledMethod: contains both pointers and bytes"
header := self methodHeaderOf: objOop.
^ self lastPointerOfMethodHeader: header
^self lastPointerOfMethodHeader: header
]
{ #category : #'debug support' }
Expand Down

0 comments on commit 280b09b

Please sign in to comment.