Remove some uses of the svector class.

This commit is contained in:
Stephen Williams 2012-05-28 16:49:41 -07:00
parent 342646264e
commit d10e4bca4c
8 changed files with 22 additions and 22 deletions

View File

@ -1518,9 +1518,9 @@ void NetETernary::dump(ostream&o) const
void NetEUFunc::dump(ostream&o) const
{
o << func_->basename() << "(";
if (parms_.count() > 0) {
if (parms_.size() > 0) {
parms_[0]->dump(o);
for (unsigned idx = 1 ; idx < parms_.count() ; idx += 1) {
for (unsigned idx = 1 ; idx < parms_.size() ; idx += 1) {
o << ", ";
parms_[idx]->dump(o);
}

View File

@ -232,9 +232,9 @@ NetETernary* NetETernary::dup_expr() const
NetEUFunc* NetEUFunc::dup_expr() const
{
NetEUFunc*tmp;
svector<NetExpr*> tmp_parms (parms_.count());
vector<NetExpr*> tmp_parms (parms_.size());
for (unsigned idx = 0 ; idx < tmp_parms.count() ; idx += 1) {
for (unsigned idx = 0 ; idx < tmp_parms.size() ; idx += 1) {
ivl_assert(*this, parms_[idx]);
tmp_parms[idx] = parms_[idx]->dup_expr();
}

View File

@ -1663,7 +1663,7 @@ NetExpr* PECallFunction::elaborate_expr(Design*des, NetScope*scope,
if ((parms_count == 1) && (parms_[0] == 0))
parms_count = 0;
svector<NetExpr*> parms (parms_count);
vector<NetExpr*> parms (parms_count);
/* Elaborate the input expressions for the function. This is
done in the scope of the function call, and not the scope
@ -1672,7 +1672,7 @@ NetExpr* PECallFunction::elaborate_expr(Design*des, NetScope*scope,
unsigned parm_errors = 0;
unsigned missing_parms = 0;
for (unsigned idx = 0 ; idx < parms.count() ; idx += 1) {
for (unsigned idx = 0 ; idx < parms.size() ; idx += 1) {
PExpr*tmp = parms_[idx];
if (tmp) {
parms[idx] = elaborate_rval_expr(des, scope,

View File

@ -624,7 +624,7 @@ void PFunction::elaborate_sig(Design*des, NetScope*scope) const
}
}
svector<NetNet*>ports (ports_? ports_->count() : 0);
vector<NetNet*>ports (ports_? ports_->count() : 0);
if (ports_)
for (unsigned idx = 0 ; idx < ports_->count() ; idx += 1) {

View File

@ -1386,11 +1386,11 @@ NetNet* NetESFunc::synthesize(Design*des, NetScope*scope, NetExpr*root)
NetNet* NetEUFunc::synthesize(Design*des, NetScope*scope, NetExpr*root)
{
svector<NetNet*> eparms (parms_.count());
vector<NetNet*> eparms (parms_.size());
/* Synthesize the arguments. */
bool errors = false;
for (unsigned idx = 0; idx < eparms.count(); idx += 1) {
for (unsigned idx = 0; idx < eparms.size(); idx += 1) {
if (dynamic_cast<NetEEvent*> (parms_[idx])) {
errors = true;
continue;
@ -1432,7 +1432,7 @@ NetNet* NetEUFunc::synthesize(Design*des, NetScope*scope, NetExpr*root)
/* Connect the pins to the arguments. */
NetFuncDef*def = func_->func_def();
for (unsigned idx = 0; idx < eparms.count(); idx += 1) {
for (unsigned idx = 0; idx < eparms.size(); idx += 1) {
unsigned width = def->port(idx)->vector_width();
NetNet*tmp;
if (eparms[idx]->get_signed()) {

View File

@ -188,7 +188,7 @@ NexusSet* NetETernary::nex_input(bool rem_out)
NexusSet* NetEUFunc::nex_input(bool rem_out)
{
NexusSet*result = new NexusSet;
for (unsigned idx = 0 ; idx < parms_.count() ; idx += 1) {
for (unsigned idx = 0 ; idx < parms_.size() ; idx += 1) {
NexusSet*tmp = parms_[idx]->nex_input(rem_out);
result->add(*tmp);
delete tmp;

View File

@ -1979,7 +1979,7 @@ bool NetConst::is_string() const
return is_string_;
}
NetFuncDef::NetFuncDef(NetScope*s, NetNet*result, const svector<NetNet*>&po)
NetFuncDef::NetFuncDef(NetScope*s, NetNet*result, const vector<NetNet*>&po)
: scope_(s), statement_(0), result_sig_(result), ports_(po)
{
}
@ -2012,12 +2012,12 @@ NetScope*NetFuncDef::scope()
unsigned NetFuncDef::port_count() const
{
return ports_.count();
return ports_.size();
}
const NetNet* NetFuncDef::port(unsigned idx) const
{
assert(idx < ports_.count());
assert(idx < ports_.size());
return ports_[idx];
}
@ -2063,7 +2063,7 @@ const NetExpr* NetSTask::parm(unsigned idx) const
}
NetEUFunc::NetEUFunc(NetScope*scope, NetScope*def, NetESignal*res,
svector<NetExpr*>&p, bool nc)
vector<NetExpr*>&p, bool nc)
: scope_(scope), func_(def), result_sig_(res), parms_(p), need_const_(nc)
{
expr_width(result_sig_->expr_width());
@ -2071,7 +2071,7 @@ NetEUFunc::NetEUFunc(NetScope*scope, NetScope*def, NetESignal*res,
NetEUFunc::~NetEUFunc()
{
for (unsigned idx = 0 ; idx < parms_.count() ; idx += 1)
for (unsigned idx = 0 ; idx < parms_.size() ; idx += 1)
delete parms_[idx];
}
#if 0
@ -2087,12 +2087,12 @@ const NetESignal*NetEUFunc::result_sig() const
unsigned NetEUFunc::parm_count() const
{
return parms_.count();
return parms_.size();
}
const NetExpr* NetEUFunc::parm(unsigned idx) const
{
assert(idx < parms_.count());
assert(idx < parms_.size());
return parms_[idx];
}

View File

@ -2981,7 +2981,7 @@ class NetFree : public NetProc {
class NetFuncDef {
public:
NetFuncDef(NetScope*, NetNet*result, const svector<NetNet*>&po);
NetFuncDef(NetScope*, NetNet*result, const std::vector<NetNet*>&po);
~NetFuncDef();
void set_proc(NetProc*st);
@ -3002,7 +3002,7 @@ class NetFuncDef {
NetScope*scope_;
NetProc*statement_;
NetNet*result_sig_;
svector<NetNet*>ports_;
std::vector<NetNet*>ports_;
};
/*
@ -3164,7 +3164,7 @@ class NetTaskDef {
class NetEUFunc : public NetExpr {
public:
NetEUFunc(NetScope*, NetScope*, NetESignal*, svector<NetExpr*>&, bool);
NetEUFunc(NetScope*, NetScope*, NetESignal*, std::vector<NetExpr*>&, bool);
~NetEUFunc();
const NetESignal*result_sig() const;
@ -3187,7 +3187,7 @@ class NetEUFunc : public NetExpr {
NetScope*scope_;
NetScope*func_;
NetESignal*result_sig_;
svector<NetExpr*> parms_;
std::vector<NetExpr*> parms_;
bool need_const_;
private: // not implemented