[Pkg] The Trunk: Tools-btc.368.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Jul 16 09:09:06 UTC 2011


Levente Uzonyi uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-btc.368.mcz

==================== Summary ====================

Name: Tools-btc.368
Author: btc
Time: 13 July 2011, 12:09:33.417 am
UUID: 04b62880-e5a2-3445-8440-482d7c7586fb
Ancestors: Tools-btc.367

Single stepping through a debugger might observe the state of an OrderedCollection instance after creation by basicNew but before initiialisation.  Thus 'object size' throws a DNU error for arithmetic on a nil value that needs to be handled.

=============== Diff against Tools-bf.366 ===============

Item was changed:
  ----- Method: OrderedCollectionInspector>>fieldList (in category 'as yet unclassified') -----
  fieldList
  	object ifNil: [ ^ OrderedCollection new].
  	^ self baseFieldList ,
+ 		(self objectSize <= (self i1 + self i2)
+ 			ifTrue: [(1 to: self objectSize)
- 		(object size <= (self i1 + self i2)
- 			ifTrue: [(1 to: object size)
  						collect: [:i | i printString]]
+ 			ifFalse: [(1 to: self i1) , (self objectSize - (self i2-1) to: self objectSize)
- 			ifFalse: [(1 to: self i1) , (object size-(self i2-1) to: object size)
  						collect: [:i | i printString]])
  "
  OrderedCollection new inspect
  (OrderedCollection newFrom: #(3 5 7 123)) inspect
  (OrderedCollection newFrom: (1 to: 1000)) inspect
  "!

Item was added:
+ ----- Method: OrderedCollectionInspector>>objectSize (in category 'as yet unclassified') -----
+ objectSize
+ 	"Single stepping through a debugger might observe the state of an OrderedCollection 
+ 	instance after creation by basicNew but before initiialisation.  Thus 'object size' 
+ 	throws a DNU error for arithmetic on a nil value that needs to be handled here." 
+ 
+ 	^ [ object size ] on: Error do: [ 0 ]
+ !



More information about the Packages mailing list