octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tree walker evaluator


From: John W. Eaton
Subject: Re: tree walker evaluator
Date: Wed, 4 Feb 2009 17:30:15 -0500

On  4-Feb-2009, Søren Hauberg wrote:

| ons, 04 02 2009 kl. 01:18 -0500, skrev John W. Eaton:
| > I was planning to have a separate tree_debugger class derived from the
| > tree_evaluator class and that would replace some of the functions in
| > the tree_evaluator class to do the debugging stuff before calling the
| > corresponding fucntion from the tree_evaluator class.  For example:
| > 
| >   void
| >   tree_debugger::visit_statement (tree_statement& stmt)
| >   {
| >     // check to see if breakpoint is set and debugging things...
| >     ...
| >     ...
| >     ...
| > 
| >     tree_evaluator::visit_statement (stmt);
| >   }
| > 
| > Although it is probably possible to make this work, it did not seem
| > worth the effort, and I wasn't sure I could correctly implement
| > switching between the normal and debugging evaluators at arbitrary
| > times.  So I decided to simply check a flag in the tree_evaluator
| > methods that need to do debugging things.  I don't think this adds
| > much overhead and it allows reliable switching between the normal and
| > debugging evaluators.
| 
| I was under the impression that such a class would also be used for
| building a profiler. If so, will that complicate things?

Is it supposed to be possible to use the debugger and do profiling at
the same time?  If so, then I think it actually simplifies things to
have the one true evaluator checking flags to decide whether to do
debugging and profiling things, and not try to handle that with
additional derived classes.

Getting a profiler working is a high priority for me, but not until
after 3.2 is released.

jwe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]