From c44ce66a87e9d3012d0c8aab691d3cfad13eb5e9 Mon Sep 17 00:00:00 2001 From: Cary R Date: Sun, 6 Dec 2009 20:06:13 -0800 Subject: [PATCH] Add debug_eval_tree code for the pow operator. The power operator was missing eval_tree debug information. This patch fixes that deficiency. (cherry picked from commit a85880a8bb20c73630b5d85917d8dccb34621742) --- eval_tree.cc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/eval_tree.cc b/eval_tree.cc index 3f278f842..598628dfd 100644 --- a/eval_tree.cc +++ b/eval_tree.cc @@ -996,6 +996,11 @@ NetExpr* NetEBPow::eval_tree_real_() NetECReal*res = new NetECReal( pow(lval,rval) ); res->set_line(*this); + + if (debug_eval_tree) + cerr << get_fileline() << ": debug: Evaluate (real) " + << lval << " ** " << rval << " --> " << *res << endl; + return res; } @@ -1016,7 +1021,14 @@ NetExpr* NetEBPow::eval_tree(int prune_to_width) verinum lval = lc->value(); verinum rval = rc->value(); - return new NetEConst( pow(lval,rval) ); + NetEConst*res = new NetEConst( pow(lval,rval) ); + res->set_line(*this); + + if (debug_eval_tree) + cerr << get_fileline() << ": debug: Evaluate " + << lval << " ** " << rval << " --> " << *res << endl; + + return res; } /*