The Inbox: Kernel-ct.1305.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: Kernel-ct.1305.mcz

commits-2
A new version of Kernel was added to project The Inbox:
http://source.squeak.org/inbox/Kernel-ct.1305.mcz

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

Name: Kernel-ct.1305
Author: ct
Time: 21 February 2020, 5:56:45.51558 pm
UUID: da7d53be-5952-7244-ad63-5acca2763b53
Ancestors: Kernel-mt.1304

Proposal: Add ObjectTracer constructor #installOn: that uses #become: to trace every access to the traced object.

=============== Diff against Kernel-mt.1304 ===============

Item was added:
+ ----- Method: ObjectTracer class>>installOn: (in category 'instance creation') -----
+ installOn: anObject
+ "Install an ObjectTracer around anObject that will trace every access to anObject from any place in the image. Use #xxxUnTrace to uninstall the tracer later."
+
+ | tracer |
+ tracer := self new.
+ [anObject become: tracer]
+ ensure: [anObject xxxViewedObject: tracer].
+ ^ anObject!