Files
iverilog/PFunction.cc
T

79 lines
2.1 KiB
C++
Raw Permalink Normal View History

1999-08-25 22:22:41 +00:00
/*
* Copyright (c) 1999 Stephen Williams ([email protected])
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
* General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
2002-08-12 01:34:58 +00:00
#ifdef HAVE_CVS_IDENT
2004-05-31 23:34:36 +00:00
#ident "$Id: PFunction.cc,v 1.7 2004/05/31 23:34:36 steve Exp $"
1999-08-25 22:22:41 +00:00
#endif
# include "config.h"
1999-08-01 06:10:51 +00:00
#include "PTask.h"
2004-05-31 23:34:36 +00:00
PFunction::PFunction(perm_string name)
: name_(name), ports_(0), statement_(0)
1999-08-01 06:10:51 +00:00
{
2004-05-31 23:34:36 +00:00
return_type_.type = PTF_NONE;
1999-08-01 06:10:51 +00:00
}
PFunction::~PFunction()
{
}
1999-08-25 22:22:41 +00:00
2001-01-13 22:20:08 +00:00
void PFunction::set_ports(svector<PWire *>*p)
{
assert(ports_ == 0);
ports_ = p;
}
void PFunction::set_statement(Statement*s)
{
assert(s != 0);
assert(statement_ == 0);
statement_ = s;
}
2004-05-31 23:34:36 +00:00
void PFunction::set_return(PTaskFuncArg t)
1999-08-25 22:22:41 +00:00
{
2004-05-31 23:34:36 +00:00
return_type_ = t;
1999-08-25 22:22:41 +00:00
}
/*
* $Log: PFunction.cc,v $
2004-05-31 23:34:36 +00:00
* Revision 1.7 2004/05/31 23:34:36 steve
* Rewire/generalize parsing an elaboration of
* function return values to allow for better
* speed and more type support.
*
2002-08-12 01:34:58 +00:00
* Revision 1.6 2002/08/12 01:34:58 steve
* conditional ident string using autoconfig.
*
* Revision 1.5 2001/07/25 03:10:48 steve
* Create a config.h.in file to hold all the config
* junk, and support gcc 3.0. (Stephan Boettcher)
*
2001-01-13 22:20:08 +00:00
* Revision 1.4 2001/01/13 22:20:08 steve
* Parse parameters within nested scopes.
*
2000-02-23 02:56:53 +00:00
* Revision 1.3 2000/02/23 02:56:53 steve
* Macintosh compilers do not support ident.
*
1999-08-25 22:22:41 +00:00
* Revision 1.2 1999/08/25 22:22:41 steve
* elaborate some aspects of functions.
*
*/