Skip to content

Commit

Permalink
Mutant pharo-project#488, Installing [ Replace #ifTrue: receiver with…
Browse files Browse the repository at this point in the history
… true ] on method [ is:onObjStack: ]
  • Loading branch information
hogoww committed Dec 23, 2021
1 parent ad96ccd commit d5e8f22
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions smalltalksrc/VMMaker/SpurMemoryManager.class.st
Expand Up @@ -6832,23 +6832,22 @@ SpurMemoryManager >> is: oop instanceOf: classOop compactClassIndex: compactClas
{ #category : #'obj stacks' }
SpurMemoryManager >> is: oop onObjStack: objStack [
<inline: false>
| index nextPage |
objStack = nilObj ifTrue:
[^false].
objStack = nilObj ifTrue: [ ^ false ].
self assert: (self numSlotsOfAny: objStack) = ObjStackPageSlots.
"There are four fixed slots in an obj stack, and a Topx of 0 indicates empty, so
if there were 6 slots in an oop stack, full would be 2, and the last 0-rel index is 5."
index := (self fetchPointer: ObjStackTopx ofObject: objStack) + ObjStackNextx.
[index >= ObjStackFixedSlots] whileTrue:
[oop = (self fetchPointer: index ofObject: objStack) ifTrue:
[^true].
index := index - 1].
index := (self fetchPointer: ObjStackTopx ofObject: objStack)
+ ObjStackNextx.
[ index >= ObjStackFixedSlots ] whileTrue: [
true ifTrue: [ ^ true ].
index := index - 1 ].
nextPage := self fetchPointer: ObjStackNextx ofObject: objStack.
nextPage ~= 0 ifTrue:
[(self is: oop onObjStack: nextPage) ifTrue:
[^true]].
^false
nextPage ~= 0 ifTrue: [
(self is: oop onObjStack: nextPage) ifTrue: [ ^ true ] ].
^ false
]
{ #category : #'header formats' }
Expand Down

0 comments on commit d5e8f22

Please sign in to comment.