Remove some uses of the svector class.
This commit is contained in:
parent
342646264e
commit
d10e4bca4c
|
|
@ -1518,9 +1518,9 @@ void NetETernary::dump(ostream&o) const
|
||||||
void NetEUFunc::dump(ostream&o) const
|
void NetEUFunc::dump(ostream&o) const
|
||||||
{
|
{
|
||||||
o << func_->basename() << "(";
|
o << func_->basename() << "(";
|
||||||
if (parms_.count() > 0) {
|
if (parms_.size() > 0) {
|
||||||
parms_[0]->dump(o);
|
parms_[0]->dump(o);
|
||||||
for (unsigned idx = 1 ; idx < parms_.count() ; idx += 1) {
|
for (unsigned idx = 1 ; idx < parms_.size() ; idx += 1) {
|
||||||
o << ", ";
|
o << ", ";
|
||||||
parms_[idx]->dump(o);
|
parms_[idx]->dump(o);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -232,9 +232,9 @@ NetETernary* NetETernary::dup_expr() const
|
||||||
NetEUFunc* NetEUFunc::dup_expr() const
|
NetEUFunc* NetEUFunc::dup_expr() const
|
||||||
{
|
{
|
||||||
NetEUFunc*tmp;
|
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]);
|
ivl_assert(*this, parms_[idx]);
|
||||||
tmp_parms[idx] = parms_[idx]->dup_expr();
|
tmp_parms[idx] = parms_[idx]->dup_expr();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1663,7 +1663,7 @@ NetExpr* PECallFunction::elaborate_expr(Design*des, NetScope*scope,
|
||||||
if ((parms_count == 1) && (parms_[0] == 0))
|
if ((parms_count == 1) && (parms_[0] == 0))
|
||||||
parms_count = 0;
|
parms_count = 0;
|
||||||
|
|
||||||
svector<NetExpr*> parms (parms_count);
|
vector<NetExpr*> parms (parms_count);
|
||||||
|
|
||||||
/* Elaborate the input expressions for the function. This is
|
/* Elaborate the input expressions for the function. This is
|
||||||
done in the scope of the function call, and not the scope
|
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 parm_errors = 0;
|
||||||
unsigned missing_parms = 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];
|
PExpr*tmp = parms_[idx];
|
||||||
if (tmp) {
|
if (tmp) {
|
||||||
parms[idx] = elaborate_rval_expr(des, scope,
|
parms[idx] = elaborate_rval_expr(des, scope,
|
||||||
|
|
|
||||||
|
|
@ -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_)
|
if (ports_)
|
||||||
for (unsigned idx = 0 ; idx < ports_->count() ; idx += 1) {
|
for (unsigned idx = 0 ; idx < ports_->count() ; idx += 1) {
|
||||||
|
|
|
||||||
|
|
@ -1386,11 +1386,11 @@ NetNet* NetESFunc::synthesize(Design*des, NetScope*scope, NetExpr*root)
|
||||||
|
|
||||||
NetNet* NetEUFunc::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. */
|
/* Synthesize the arguments. */
|
||||||
bool errors = false;
|
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])) {
|
if (dynamic_cast<NetEEvent*> (parms_[idx])) {
|
||||||
errors = true;
|
errors = true;
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -1432,7 +1432,7 @@ NetNet* NetEUFunc::synthesize(Design*des, NetScope*scope, NetExpr*root)
|
||||||
|
|
||||||
/* Connect the pins to the arguments. */
|
/* Connect the pins to the arguments. */
|
||||||
NetFuncDef*def = func_->func_def();
|
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();
|
unsigned width = def->port(idx)->vector_width();
|
||||||
NetNet*tmp;
|
NetNet*tmp;
|
||||||
if (eparms[idx]->get_signed()) {
|
if (eparms[idx]->get_signed()) {
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,7 @@ NexusSet* NetETernary::nex_input(bool rem_out)
|
||||||
NexusSet* NetEUFunc::nex_input(bool rem_out)
|
NexusSet* NetEUFunc::nex_input(bool rem_out)
|
||||||
{
|
{
|
||||||
NexusSet*result = new NexusSet;
|
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);
|
NexusSet*tmp = parms_[idx]->nex_input(rem_out);
|
||||||
result->add(*tmp);
|
result->add(*tmp);
|
||||||
delete tmp;
|
delete tmp;
|
||||||
|
|
|
||||||
14
netlist.cc
14
netlist.cc
|
|
@ -1979,7 +1979,7 @@ bool NetConst::is_string() const
|
||||||
return is_string_;
|
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)
|
: scope_(s), statement_(0), result_sig_(result), ports_(po)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
@ -2012,12 +2012,12 @@ NetScope*NetFuncDef::scope()
|
||||||
|
|
||||||
unsigned NetFuncDef::port_count() const
|
unsigned NetFuncDef::port_count() const
|
||||||
{
|
{
|
||||||
return ports_.count();
|
return ports_.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
const NetNet* NetFuncDef::port(unsigned idx) const
|
const NetNet* NetFuncDef::port(unsigned idx) const
|
||||||
{
|
{
|
||||||
assert(idx < ports_.count());
|
assert(idx < ports_.size());
|
||||||
return ports_[idx];
|
return ports_[idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2063,7 +2063,7 @@ const NetExpr* NetSTask::parm(unsigned idx) const
|
||||||
}
|
}
|
||||||
|
|
||||||
NetEUFunc::NetEUFunc(NetScope*scope, NetScope*def, NetESignal*res,
|
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)
|
: scope_(scope), func_(def), result_sig_(res), parms_(p), need_const_(nc)
|
||||||
{
|
{
|
||||||
expr_width(result_sig_->expr_width());
|
expr_width(result_sig_->expr_width());
|
||||||
|
|
@ -2071,7 +2071,7 @@ NetEUFunc::NetEUFunc(NetScope*scope, NetScope*def, NetESignal*res,
|
||||||
|
|
||||||
NetEUFunc::~NetEUFunc()
|
NetEUFunc::~NetEUFunc()
|
||||||
{
|
{
|
||||||
for (unsigned idx = 0 ; idx < parms_.count() ; idx += 1)
|
for (unsigned idx = 0 ; idx < parms_.size() ; idx += 1)
|
||||||
delete parms_[idx];
|
delete parms_[idx];
|
||||||
}
|
}
|
||||||
#if 0
|
#if 0
|
||||||
|
|
@ -2087,12 +2087,12 @@ const NetESignal*NetEUFunc::result_sig() const
|
||||||
|
|
||||||
unsigned NetEUFunc::parm_count() const
|
unsigned NetEUFunc::parm_count() const
|
||||||
{
|
{
|
||||||
return parms_.count();
|
return parms_.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
const NetExpr* NetEUFunc::parm(unsigned idx) const
|
const NetExpr* NetEUFunc::parm(unsigned idx) const
|
||||||
{
|
{
|
||||||
assert(idx < parms_.count());
|
assert(idx < parms_.size());
|
||||||
return parms_[idx];
|
return parms_[idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2981,7 +2981,7 @@ class NetFree : public NetProc {
|
||||||
class NetFuncDef {
|
class NetFuncDef {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NetFuncDef(NetScope*, NetNet*result, const svector<NetNet*>&po);
|
NetFuncDef(NetScope*, NetNet*result, const std::vector<NetNet*>&po);
|
||||||
~NetFuncDef();
|
~NetFuncDef();
|
||||||
|
|
||||||
void set_proc(NetProc*st);
|
void set_proc(NetProc*st);
|
||||||
|
|
@ -3002,7 +3002,7 @@ class NetFuncDef {
|
||||||
NetScope*scope_;
|
NetScope*scope_;
|
||||||
NetProc*statement_;
|
NetProc*statement_;
|
||||||
NetNet*result_sig_;
|
NetNet*result_sig_;
|
||||||
svector<NetNet*>ports_;
|
std::vector<NetNet*>ports_;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -3164,7 +3164,7 @@ class NetTaskDef {
|
||||||
class NetEUFunc : public NetExpr {
|
class NetEUFunc : public NetExpr {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NetEUFunc(NetScope*, NetScope*, NetESignal*, svector<NetExpr*>&, bool);
|
NetEUFunc(NetScope*, NetScope*, NetESignal*, std::vector<NetExpr*>&, bool);
|
||||||
~NetEUFunc();
|
~NetEUFunc();
|
||||||
|
|
||||||
const NetESignal*result_sig() const;
|
const NetESignal*result_sig() const;
|
||||||
|
|
@ -3187,7 +3187,7 @@ class NetEUFunc : public NetExpr {
|
||||||
NetScope*scope_;
|
NetScope*scope_;
|
||||||
NetScope*func_;
|
NetScope*func_;
|
||||||
NetESignal*result_sig_;
|
NetESignal*result_sig_;
|
||||||
svector<NetExpr*> parms_;
|
std::vector<NetExpr*> parms_;
|
||||||
bool need_const_;
|
bool need_const_;
|
||||||
|
|
||||||
private: // not implemented
|
private: // not implemented
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue