pform_makewire(): Remove unused parameters
There are a few parameters for `pform_makewire()` and related functions that always get passed the same value. * port_type is always NetNet::NOT_A_PORT * attr is always 0 Remove these parameters. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
72b0498af4
commit
7aee124cfe
3
parse.y
3
parse.y
|
|
@ -5833,8 +5833,7 @@ dimensions
|
|||
net_variable
|
||||
: IDENTIFIER dimensions_opt
|
||||
{ perm_string name = lex_strings.make($1);
|
||||
pform_makewire(@1, name, NetNet::IMPLICIT,
|
||||
NetNet::NOT_A_PORT, IVL_VT_NO_TYPE, 0);
|
||||
pform_makewire(@1, name, NetNet::IMPLICIT, IVL_VT_NO_TYPE);
|
||||
pform_set_reg_idx(name, $2);
|
||||
$$ = $1;
|
||||
}
|
||||
|
|
|
|||
18
pform.cc
18
pform.cc
|
|
@ -2741,12 +2741,11 @@ static PWire* pform_get_or_make_wire(const vlltype&li, perm_string name,
|
|||
* the variable/net. Other forms of pform_makewire ultimately call
|
||||
* this one to create the wire and stash it.
|
||||
*/
|
||||
void pform_makewire(const vlltype&li, perm_string name,
|
||||
NetNet::Type type, NetNet::PortType pt,
|
||||
ivl_variable_type_t dt,
|
||||
list<named_pexpr_t>*attr)
|
||||
void pform_makewire(const vlltype&li, perm_string name, NetNet::Type type,
|
||||
ivl_variable_type_t dt)
|
||||
{
|
||||
PWire*cur = pform_get_or_make_wire(li, name, type, pt, dt);
|
||||
PWire*cur = pform_get_or_make_wire(li, name, type, NetNet::NOT_A_PORT,
|
||||
dt);
|
||||
assert(cur);
|
||||
|
||||
bool flag;
|
||||
|
|
@ -2766,13 +2765,6 @@ void pform_makewire(const vlltype&li, perm_string name,
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (attr) {
|
||||
for (list<named_pexpr_t>::iterator attr_cur = attr->begin()
|
||||
; attr_cur != attr->end() ; ++attr_cur) {
|
||||
cur->attributes[attr_cur->name] = attr_cur->parm;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void pform_makewire(const struct vlltype&li,
|
||||
|
|
@ -2793,7 +2785,7 @@ void pform_makewire(const struct vlltype&li,
|
|||
for (list<decl_assignment_t*>::iterator cur = assign_list->begin()
|
||||
; cur != assign_list->end() ; ++ cur) {
|
||||
decl_assignment_t* curp = *cur;
|
||||
pform_makewire(li, curp->name, type, NetNet::NOT_A_PORT, IVL_VT_NO_TYPE, 0);
|
||||
pform_makewire(li, curp->name, type, IVL_VT_NO_TYPE);
|
||||
pform_set_reg_idx(curp->name, &curp->index);
|
||||
names->push_back(curp->name);
|
||||
}
|
||||
|
|
|
|||
5
pform.h
5
pform.h
|
|
@ -144,7 +144,6 @@ extern PWire* pform_get_wire_in_scope(perm_string name);
|
|||
extern PWire* pform_get_make_wire_in_scope(const struct vlltype&li,
|
||||
perm_string name,
|
||||
NetNet::Type net_type,
|
||||
NetNet::PortType port_type,
|
||||
ivl_variable_type_t vt_type);
|
||||
|
||||
/*
|
||||
|
|
@ -350,9 +349,7 @@ extern PForeach* pform_make_foreach(const struct vlltype&loc,
|
|||
*/
|
||||
extern void pform_makewire(const struct vlltype&li, perm_string name,
|
||||
NetNet::Type type,
|
||||
NetNet::PortType pt,
|
||||
ivl_variable_type_t,
|
||||
std::list<named_pexpr_t>*attr);
|
||||
ivl_variable_type_t dt);
|
||||
|
||||
/* This form handles assignment declarations. */
|
||||
|
||||
|
|
|
|||
|
|
@ -195,8 +195,7 @@ void pform_attach_discipline(const struct vlltype&loc,
|
|||
PWire* cur_net = pform_get_wire_in_scope(*cur);
|
||||
if (cur_net == 0) {
|
||||
/* Not declared yet, declare it now. */
|
||||
pform_makewire(loc, *cur, NetNet::WIRE,
|
||||
NetNet::NOT_A_PORT, IVL_VT_REAL, 0);
|
||||
pform_makewire(loc, *cur, NetNet::WIRE, IVL_VT_REAL);
|
||||
cur_net = pform_get_wire_in_scope(*cur);
|
||||
assert(cur_net);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue