Hi,

I found this comment in TBehavior>>indexIfCompact :

"Verify if the compactClassesArray and indexIfCompact are coheren
Smalltalk compactClassesArray doWithIndex:
 [:c :i | c == nil ifFalse:
[c indexIfCompact = i ifFalse: [self halt]]]
"

Since it *does* halt, I rewrote to:

| inconsistencies |
inconsistencies := OrderedCollection new.

Smalltalk compactClassesArray doWithIndex: [ :class :index |
 class ifNotNil: [
class indexIfCompact = index ifFalse: [
inconsistencies add: { class. index. class indexIfCompact } ]]].

inconsistencies."---> an OrderedCollection({LargeNegativeInteger. 4. 0}
{LargePositiveInteger. 5. 0})"

I checked that in Pharo 2 they are consistent, so I guess this should be
fixed.

I ignore deep vm internals so... how would you fix this?

I tried to #becomeUncompact to then #becomeCompact again, but it didn't
work out-of-the-box.

Cheers,
Martín

Reply via email to