Skip to content

Commit

Permalink
Add dup_expr for user defined function calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
steve committed Nov 9, 2002
1 parent 07e49e2 commit 588931f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 17 deletions.
29 changes: 20 additions & 9 deletions dup_expr.cc
@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1999 Stephen Williams (steve@icarus.com) * Copyright (c) 1999-2002 Stephen Williams (steve@icarus.com)
* *
* This source code is free software; you can redistribute it * This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU * and/or modify it in source code form under the terms of the GNU
Expand All @@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: dup_expr.cc,v 1.8 2002/08/12 01:34:58 steve Exp $" #ident "$Id: dup_expr.cc,v 1.9 2002/11/09 00:25:27 steve Exp $"
#endif #endif


# include "config.h" # include "config.h"
Expand Down Expand Up @@ -65,6 +65,21 @@ NetETernary* NetETernary::dup_expr() const
return tmp; return tmp;
} }


NetEUFunc* NetEUFunc::dup_expr() const
{
NetEUFunc*tmp;
svector<NetExpr*> tmp_parms (parms_.count());

for (unsigned idx = 0 ; idx < tmp_parms.count() ; idx += 1) {
assert(parms_[idx]);
tmp_parms[idx] = parms_[idx]->dup_expr();
}

tmp = new NetEUFunc(func_, result_->dup_expr(), tmp_parms);

return tmp;
}

NetEUnary* NetEUnary::dup_expr() const NetEUnary* NetEUnary::dup_expr() const
{ {
NetEUnary*tmp = new NetEUnary(op_, expr_->dup_expr()); NetEUnary*tmp = new NetEUnary(op_, expr_->dup_expr());
Expand All @@ -74,6 +89,9 @@ NetEUnary* NetEUnary::dup_expr() const


/* /*
* $Log: dup_expr.cc,v $ * $Log: dup_expr.cc,v $
* Revision 1.9 2002/11/09 00:25:27 steve
* Add dup_expr for user defined function calls.
*
* Revision 1.8 2002/08/12 01:34:58 steve * Revision 1.8 2002/08/12 01:34:58 steve
* conditional ident string using autoconfig. * conditional ident string using autoconfig.
* *
Expand All @@ -97,12 +115,5 @@ NetEUnary* NetEUnary::dup_expr() const
* Revision 1.3 2000/05/04 03:37:58 steve * Revision 1.3 2000/05/04 03:37:58 steve
* Add infrastructure for system functions, move * Add infrastructure for system functions, move
* $time to that structure and add $random. * $time to that structure and add $random.
*
* Revision 1.2 2000/02/23 02:56:54 steve
* Macintosh compilers do not support ident.
*
* Revision 1.1 1999/11/27 19:07:57 steve
* Support the creation of scopes.
*
*/ */


13 changes: 5 additions & 8 deletions netlist.cc
@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1998-2000 Stephen Williams (steve@icarus.com) * Copyright (c) 1998-2002 Stephen Williams (steve@icarus.com)
* *
* This source code is free software; you can redistribute it * This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU * and/or modify it in source code form under the terms of the GNU
Expand All @@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#ifdef HAVE_CVS_IDENT #ifdef HAVE_CVS_IDENT
#ident "$Id: netlist.cc,v 1.202 2002/11/06 02:25:13 steve Exp $" #ident "$Id: netlist.cc,v 1.203 2002/11/09 00:25:27 steve Exp $"
#endif #endif


# include "config.h" # include "config.h"
Expand Down Expand Up @@ -1707,12 +1707,6 @@ const NetScope* NetEUFunc::func() const
return func_; return func_;
} }


NetEUFunc* NetEUFunc::dup_expr() const
{
assert(0);
return 0;
}

NetUTask::NetUTask(NetScope*def) NetUTask::NetUTask(NetScope*def)
: task_(def) : task_(def)
{ {
Expand Down Expand Up @@ -2292,6 +2286,9 @@ const NetProc*NetTaskDef::proc() const


/* /*
* $Log: netlist.cc,v $ * $Log: netlist.cc,v $
* Revision 1.203 2002/11/09 00:25:27 steve
* Add dup_expr for user defined function calls.
*
* Revision 1.202 2002/11/06 02:25:13 steve * Revision 1.202 2002/11/06 02:25:13 steve
* No need to keep excess width from an * No need to keep excess width from an
* unsigned constant value, if it can * unsigned constant value, if it can
Expand Down

0 comments on commit 588931f

Please sign in to comment.