Add a dup_expr method to NetEUBits.

The NetEUBits needs to create a NetEUBits when the dup_expr method is
called, so it needs its own dup_expr method.
This commit is contained in:
Stephen Williams 2008-10-30 22:11:05 -07:00
parent 9b640f3114
commit 403a1e9415
2 changed files with 9 additions and 0 deletions

View File

@ -138,6 +138,14 @@ NetEUFunc* NetEUFunc::dup_expr() const
return tmp;
}
NetEUBits* NetEUBits::dup_expr() const
{
NetEUBits*tmp = new NetEUBits(op_, expr_->dup_expr());
assert(tmp);
tmp->set_line(*this);
return tmp;
}
NetEUnary* NetEUnary::dup_expr() const
{
NetEUnary*tmp = new NetEUnary(op_, expr_->dup_expr());

View File

@ -3655,6 +3655,7 @@ class NetEUBits : public NetEUnary {
virtual NetNet* synthesize(Design*, NetScope*scope);
virtual NetEUBits* dup_expr() const;
virtual NetExpr* eval_tree(int prune_to_width = -1);
virtual ivl_variable_type_t expr_type() const;
};