Stephen Compall wrote:
Can anyone tell me why this happens:
st> PackageLoader fileInPackage: 'Parser'!
...
st> STInST.RBSmallDictionary new at: 1 put: 2; copy!
Object: RBSmallDictionary new: 1 "<-0x4c6f1798>" error: Invalid index 2: index out of range
SystemExceptions.IndexOutOfRange(Smalltalk.Exception)>>#signal
SystemExceptions.IndexOutOfRange class>>#signalOn:withIndex:
STInST.RBSmallDictionary(Smalltalk.Object)>>#checkIndexableBounds:put:
STInST.RBSmallDictionary(Smalltalk.Object)>>#basicAt:put:
STInST.RBSmallDictionary(Smalltalk.LookupTable)>>#valueAt:put:
STInST.RBSmallDictionary(Smalltalk.LookupTable)>>#whileGrowingAt:put:
STInST.RBSmallDictionary(Smalltalk.LookupTable)>>#copyAllFrom:
STInST.RBSmallDictionary(Smalltalk.HashedCollection)>>#shallowCopy
STInST.RBSmallDictionary(Smalltalk.Object)>>#copy
Smalltalk.UndefinedObject>>#executeStatements
This happens because RBSmallDictionary>>#findIndex: is wrong for
LookupTable, which expects a valid index. I fixed this by removing
RBSmallDictionary class>>#new: outright. I think this could also be
fixed with more faith to the original by using primNew: instead of
basicNew: in that method, but it doesn't bother me that much.
--
Stephen Compall
http://scompall.nocandysw.com/blog
_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk