Hi guys
with ben we changed
((value isKindOf: Class) and: [ key == value name ])
into
fillCaches
"Fill cachedClassNames and cachedNonClassNames. Return an array with
the calculated values."
| classNames nonClassNames |
classNames := OrderedCollection new: self size.
nonClassNames := OrderedCollection new.
self keysAndValuesDo: [ :key :value |
"The key == value name test below addresses two separate issues:
1) Obsolete classes, where key = #Foo and value name =
'AnObsoleteFoo'
2) Aliases, i.e., Smalltalk at: #OtherName put: aClass"
((value isKindOf: Class) and: [ key == value name ])
ifTrue: [ classNames add: key ]
ifFalse: [ nonClassNames add: key ] ].
classNames sort.
cachedNonClassNames := nonClassNames sort.
cachedClassNames := classNames.
^{ classNames. nonClassNames }
by
((value isKindOf: (self at: #Class)) and: [ key == value name ])
and this is not a good change because it assumes that an environment has a
class Class
and it jumps over the fix point created by the compiled time binding to Class.
Now we did that because in Hazel we build a new kernel and the new environment
needs to have its own Class class.
Now I have the impression that
((value isKindOf: (self environment at: #Class)) and: [ key == value
name ])
is the solution since HSystemDictionary which should be defined in itself could
work
Now if somebody has a better idea, I'm all ears (esepcially sincewe do not have
a nice object to dispatch on).
stef