[squeak-dev] The Inbox: Tools-btc.367.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Jul 11 16:08:24 UTC 2011


A new version of Tools was added to project The Inbox:
http://source.squeak.org/inbox/Tools-btc.367.mcz

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

Name: Tools-btc.367
Author: btc
Time: 12 July 2011, 12:07:30.194 am
UUID: bdc1afda-eed5-904b-9987-572aac977a16
Ancestors: Tools-bf.366

Single stepping through debugger can observe an anOrderedCollection object in an inconsistent state after creation but before initialisation.  This threw an error when the inspector asked for the size of the object - now 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 can observe the object state after creation but before initiialisation."
+ 	"Thus 'object size' may throw an axception for trying to do arithmetic on nil."
+ 	
+ 	 [ object size ] on: Exception do: [ ^ 0 ].
+        ^ object size.!




More information about the Squeak-dev mailing list