Use `named_pexpr_t` type instead of open-coding it

`named_pexpr_t` is a typedef for `named<PExpr*>`. There are a few places
where `named<PExpr*>` is used directly. Replace those with `named_pexpr_t`
for consistency.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
Lars-Peter Clausen 2023-01-02 18:43:03 -08:00
parent 2cef85f8a1
commit ce243268d0
3 changed files with 9 additions and 9 deletions

View File

@ -270,7 +270,7 @@ PGModule::PGModule(perm_string type, perm_string name, list<PExpr*>*pins)
}
PGModule::PGModule(perm_string type, perm_string name,
named<PExpr*>*pins, unsigned npins)
named_pexpr_t *pins, unsigned npins)
: PGate(name, 0), bound_type_(0), type_(type), overrides_(0), pins_(pins),
npins_(npins), parms_(0), nparms_(0)
{
@ -292,7 +292,7 @@ void PGModule::set_parameters(list<PExpr*>*o)
overrides_ = o;
}
void PGModule::set_parameters(named<PExpr*>*pa, unsigned npa)
void PGModule::set_parameters(named_pexpr_t *pa, unsigned npa)
{
ivl_assert(*this, parms_ == 0);
ivl_assert(*this, overrides_ == 0);

View File

@ -204,7 +204,7 @@ class PGModule : public PGate {
// If the binding of ports is by name, this constructor takes
// the bindings and stores them for later elaboration.
explicit PGModule(perm_string type, perm_string name,
named<PExpr*>*pins, unsigned npins);
named_pexpr_t *pins, unsigned npins);
// If the module type is known by design, then use this
// constructor.
@ -215,7 +215,7 @@ class PGModule : public PGate {
// Parameter overrides can come as an ordered list, or a set
// of named expressions.
void set_parameters(std::list<PExpr*>*o);
void set_parameters(named<PExpr*>*pa, unsigned npa);
void set_parameters(named_pexpr_t *pa, unsigned npa);
std::map<perm_string,PExpr*> attributes;
@ -232,11 +232,11 @@ class PGModule : public PGate {
Module*bound_type_;
perm_string type_;
std::list<PExpr*>*overrides_;
named<PExpr*>*pins_;
named_pexpr_t *pins_;
unsigned npins_;
// These members support parameter override by name
named<PExpr*>*parms_;
named_pexpr_t *parms_;
unsigned nparms_;
friend class delayed_elaborate_scope_mod_instances;

View File

@ -2278,7 +2278,7 @@ static void pform_make_modgate(perm_string type,
if (overrides && overrides->by_name) {
unsigned cnt = overrides->by_name->size();
named<PExpr*>*byname = new named<PExpr*>[cnt];
named_pexpr_t *byname = new named_pexpr_t[cnt];
list<named_pexpr_t>::iterator by_name_cur = overrides->by_name->begin();
for (unsigned idx = 0 ; idx < cnt ; idx += 1, ++ by_name_cur) {
@ -2311,7 +2311,7 @@ static void pform_make_modgate(perm_string type,
std::list<named_pexpr_t>*attr)
{
unsigned npins = bind->size();
named<PExpr*>*pins = new named<PExpr*>[npins];
named_pexpr_t *pins = new named_pexpr_t[npins];
list<named_pexpr_t>::iterator bind_cur = bind->begin();
for (unsigned idx = 0 ; idx < npins ; idx += 1, ++bind_cur) {
pins[idx].name = bind_cur->name;
@ -2325,7 +2325,7 @@ static void pform_make_modgate(perm_string type,
if (overrides && overrides->by_name) {
unsigned cnt = overrides->by_name->size();
named<PExpr*>*byname = new named<PExpr*>[cnt];
named_pexpr_t *byname = new named_pexpr_t[cnt];
list<named_pexpr_t>::iterator by_name_cur = overrides->by_name->begin();
for (unsigned idx = 0 ; idx < cnt ; idx += 1, ++by_name_cur) {