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 a85880a8bb)
This commit is contained in:
Cary R 2009-12-06 20:06:13 -08:00 committed by Stephen Williams
parent ce8a84db3c
commit c44ce66a87
1 changed files with 13 additions and 1 deletions

View File

@ -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;
}
/*