# HG changeset patch # User Claus Gittinger # Date 1138746430 -3600 # Node ID cd770483c45d44cabcd186575f6663512ccea87d # Parent 277621b7f38a2c5fb79d2e547264966046e7fe4f *** empty log message *** diff -r 277621b7f38a -r cd770483c45d ArrayedCollection.st --- a/ArrayedCollection.st Tue Jan 31 23:10:09 2006 +0100 +++ b/ArrayedCollection.st Tue Jan 31 23:27:10 2006 +0100 @@ -397,7 +397,7 @@ - you should write your collection classes to avoid the use of become. You have been warned." - |newArray oldSize sender| + |newArray oldSize| oldSize := self size. (newSize ~~ oldSize) ifTrue:[ @@ -407,11 +407,9 @@ "/ to use some collection which implements grow: more efficient "/ (i.e. use OrderedCollection instead of Array ..) "/ - 'ArrayedCollection [info]: slow grow operation (' infoPrint. - self class name infoPrint. ') via ' infoPrint. - sender := thisContext sender. - sender methodPrintString infoPrint. - ' from ' infoPrint. sender sender methodPrintString infoPrintCR. + 'ArrayedCollection [warning]: slow grow operation (' errorPrint. + self class name infoPrint. ') ' errorPrintCR. + self showWhereWeCameFrom. ]. newArray := self species new:newSize. @@ -458,5 +456,5 @@ !ArrayedCollection class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/ArrayedCollection.st,v 1.54 2005-06-27 10:24:06 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/ArrayedCollection.st,v 1.55 2006-01-31 22:27:02 cg Exp $' ! ! diff -r 277621b7f38a -r cd770483c45d Collection.st --- a/Collection.st Tue Jan 31 23:10:09 2006 +0100 +++ b/Collection.st Tue Jan 31 23:27:10 2006 +0100 @@ -2167,6 +2167,33 @@ since not enough elements are in the collection" ^ NotEnoughElementsSignal raise +! + +showWhereWeCameFrom + |con| + + con := thisContext sender sender. + (' from ' , con printString) errorPrintCR. + con := con sender. + con notNil ifTrue:[ + (' from ' , con printString) errorPrintCR. + con := con sender. + con notNil ifTrue:[ + (' from ' , con printString) errorPrintCR. + con receiver isCollection ifTrue:[ + con := con sender. + con notNil ifTrue:[ + (' from ' , con printString) errorPrintCR. + con receiver isCollection ifTrue:[ + con := con sender. + con notNil ifTrue:[ + (' from ' , con printString) errorPrintCR. + ]. + ]. + ]. + ]. + ] + ]. ! ! !Collection methodsFor:'growing'! @@ -2892,7 +2919,7 @@ !Collection class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.182 2006-01-27 14:53:05 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/Collection.st,v 1.183 2006-01-31 22:27:10 cg Exp $' ! ! Collection initialize! diff -r 277621b7f38a -r cd770483c45d Set.st --- a/Set.st Tue Jan 31 23:10:09 2006 +0100 +++ b/Set.st Tue Jan 31 23:27:10 2006 +0100 @@ -798,18 +798,9 @@ "/ self elementBoundError. - |con| - - 'Set [warning]: nil is not a valid element - will be an error in later versions' errorPrintCR. - con := thisContext sender. - (' from ' , con printString) errorPrintCR. - con := con sender. - con notNil ifTrue:[ - (' from ' , con printString) errorPrintCR. - con := con sender. - con notNil ifTrue:[ - (' from ' , con printString) errorPrintCR. - ] + InfoPrinting ifTrue:[ + 'Set [warning]: nil is not a valid element - will be an error in later versions' errorPrintCR. + self showWhereWeCameFrom. ]. ! @@ -1169,7 +1160,7 @@ !Set class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/Set.st,v 1.92 2005-04-08 22:54:37 stefan Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/Set.st,v 1.93 2006-01-31 22:26:56 cg Exp $' ! ! Set initialize!