NetEUReduce has its own dup_expr method.

This commit is contained in:
steve 2003-10-31 02:47:11 +00:00
parent fad43d78b0
commit 7fd669fcc0
3 changed files with 22 additions and 3 deletions

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: dup_expr.cc,v 1.15 2003/05/30 02:55:32 steve Exp $"
#ident "$Id: dup_expr.cc,v 1.16 2003/10/31 02:47:11 steve Exp $"
#endif
# include "config.h"
@ -121,6 +121,13 @@ NetEUnary* NetEUnary::dup_expr() const
return tmp;
}
NetEUReduce* NetEUReduce::dup_expr() const
{
NetEUReduce*tmp = new NetEUReduce(op_, expr_->dup_expr());
assert(tmp);
return tmp;
}
NetEVariable* NetEVariable::dup_expr() const
{
NetEVariable*tmp = new NetEVariable(var_);
@ -129,6 +136,9 @@ NetEVariable* NetEVariable::dup_expr() const
/*
* $Log: dup_expr.cc,v $
* Revision 1.16 2003/10/31 02:47:11 steve
* NetEUReduce has its own dup_expr method.
*
* Revision 1.15 2003/05/30 02:55:32 steve
* Support parameters in real expressions and
* as real expressions, and fix multiply and

View File

@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: eval_tree.cc,v 1.58 2003/10/26 04:54:56 steve Exp $"
#ident "$Id: eval_tree.cc,v 1.59 2003/10/31 02:47:11 steve Exp $"
#endif
# include "config.h"
@ -1419,6 +1419,8 @@ NetEConst* NetEUnary::eval_tree()
return new NetEConst(val);
}
case '!':
assert(0);
default:
return 0;
}
@ -1513,6 +1515,9 @@ NetEConst* NetEUReduce::eval_tree()
/*
* $Log: eval_tree.cc,v $
* Revision 1.59 2003/10/31 02:47:11 steve
* NetEUReduce has its own dup_expr method.
*
* Revision 1.58 2003/10/26 04:54:56 steve
* Support constant evaluation of binary ^ operator.
*

View File

@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: netlist.h,v 1.303 2003/10/26 04:51:38 steve Exp $"
#ident "$Id: netlist.h,v 1.304 2003/10/31 02:47:11 steve Exp $"
#endif
/*
@ -2869,6 +2869,7 @@ class NetEUReduce : public NetEUnary {
virtual bool set_width(unsigned w);
virtual NetNet* synthesize(Design*);
virtual NetEUReduce* dup_expr() const;
virtual NetEConst* eval_tree();
};
@ -3309,6 +3310,9 @@ extern ostream& operator << (ostream&, NetNet::Type);
/*
* $Log: netlist.h,v $
* Revision 1.304 2003/10/31 02:47:11 steve
* NetEUReduce has its own dup_expr method.
*
* Revision 1.303 2003/10/26 04:51:38 steve
* Output of While is output of while substatement.
*