Thread View: comp.sys.ti.explorer
1 messages
1 total messages
Started by Stephen Nicoud
Wed, 21 Feb 1990 04:22
RE: tracing all accesses to an instance
Author: Stephen Nicoud
Date: Wed, 21 Feb 1990 04:22
Date: Wed, 21 Feb 1990 04:22
55 lines
2478 bytes
2478 bytes
Date: Sun, 4 Feb 90 17:16:19 EST
From: fsr@bubba.att.com
Subject: tracing all accesses to an instance
oh flavor gurus,
i have a question.
yesterday i created a flavor and began using it in my application.
the 8 or so methods that i wrote for it defined the interface
to the rest of my "world". but then i began using it, and things didn't
work right, and because i couldn't be sure the rest of my "world"
was making calls to my instance in the proper order, and with the
proper arguments, i set about trying to "trace" all accesses to it.
unfortunately the function TRACE expects some kind of valid function
object...fair enough. then i remembered that the function APPLY and
hence FUNCALL allow flavor instances to be used in place of other
valid function objects. so it tried
(eval `(trace ,*instance*))
but to no eval.
i still assume this can be accomplished somehow. can anybody help?
thanks,
frank
Hmm, if you want to trace each access to only a particular instance, an
"obvious" solution doesn't immediately come to mind.
I suppose that, in general, you might be able to trace all method calls
of a flavor "class" by setting up a loop to trace each method. You
know, something like,
(loop for method in (send (make-instance 'your-flavor) :which-operations)
do (eval `(trace (:function (:method your-flavor ,method)))))
I don't know, maybe you can set up a conditional for a particular
instance like,
(loop for method in (send your-instance :which-operations)
do (eval `(trace (:function (:method your-instance ,method) :cond (eq (car arglist) your-instance)))))
I haven't tried these code bits, so there's probably something
"obviously" wrong with them. :-) Maybe someone else with more time on
their hands than me can tell us if these are even reasonable.
Anyway, it might give you a couple of ideas on ways to try.
Good Luck and let us know what you come up with,
Steve
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads