octave-maintainers
[Top][All Lists]
Advanced

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

Re: tree walker evaluator


From: Søren Hauberg
Subject: Re: tree walker evaluator
Date: Wed, 04 Feb 2009 13:13:43 +0100

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?

> Comments?  Bug reports?

I'm using very recent checkouts as my main development system, and the
it seems your change just-works :-)

Soren



reply via email to

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