[squeak-dev] The Trunk: Kernel-fbs.800.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Aug 6 21:16:16 UTC 2013


Frank Shearar uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-fbs.800.mcz

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

Name: Kernel-fbs.800
Author: fbs
Time: 6 August 2013, 10:15:36.612 pm
UUID: 94dcd493-9f6b-7042-9130-eb18bc9bd2e8
Ancestors: Kernel-fbs.799

Consolidate all finalization stuff in System-Finalization.

=============== Diff against Kernel-fbs.799 ===============

Item was removed:
- ----- Method: Object>>actAsExecutor (in category 'finalization') -----
- actAsExecutor
- 	"Prepare the receiver to act as executor for any resources associated with it"
- 	self breakDependents!

Item was removed:
- ----- Method: Object>>executor (in category 'finalization') -----
- executor
- 	"Return an object which can act as executor for finalization of the receiver"
- 	^self shallowCopy actAsExecutor!

Item was removed:
- ----- Method: Object>>finalizationRegistry (in category 'finalization') -----
- finalizationRegistry
- 	"Answer the finalization registry associated with the receiver."
- 	^WeakRegistry default!

Item was removed:
- ----- Method: Object>>finalize (in category 'finalization') -----
- finalize
- 	"Finalize the resource associated with the receiver. This message should only be sent during the finalization process. There is NO garantuee that the resource associated with the receiver hasn't been free'd before so take care that you don't run into trouble - this all may happen with interrupt priority."!

Item was removed:
- ----- Method: Object>>hasMultipleExecutors (in category 'finalization') -----
- hasMultipleExecutors
- 	"All objects, except ObjectFinalizerCollection instances should answer false to this message"
- 	^ false!

Item was removed:
- ----- Method: Object>>retryWithGC:until: (in category 'finalization') -----
- retryWithGC: execBlock until: testBlock
- 	"Retry execBlock as long as testBlock returns false. Do an incremental GC after the first try, a full GC after the second try."
- 	| blockValue |
- 	blockValue := execBlock value.
- 	(testBlock value: blockValue) ifTrue:[^blockValue].
- 	Smalltalk garbageCollectMost.
- 	blockValue := execBlock value.
- 	(testBlock value: blockValue) ifTrue:[^blockValue].
- 	Smalltalk garbageCollect.
- 	^execBlock value.!

Item was removed:
- ----- Method: Object>>toFinalizeSend:to:with: (in category 'finalization') -----
- toFinalizeSend: aSelector to: aFinalizer with: aResourceHandle
- 	"When I am finalized (e.g., garbage collected) close the associated resource handle by sending aSelector to the appropriate finalizer (the guy who knows how to get rid of the resource).
- 	WARNING: Neither the finalizer nor the resource handle are allowed to reference me. If they do, then I will NEVER be garbage collected. Since this cannot be validated here, it is up to the client to make sure this invariant is not broken."
- 	self == aFinalizer ifTrue:[self error: 'I cannot finalize myself'].
- 	self == aResourceHandle ifTrue:[self error: 'I cannot finalize myself'].
- 	^self finalizationRegistry add: self executor:
- 		(ObjectFinalizer
- 			receiver: aFinalizer
- 			selector: aSelector
- 			argument: aResourceHandle)!



More information about the Squeak-dev mailing list