Skip to content
This repository
Browse code

Shadow reduction part 2

Continue cleaning up shadowed variables, flagged by turning on -Wshadow.
No intended change in functionality.  Patch looks right, and is tested
to compile and run on my machine.  No regressions in test suite.
  • Loading branch information...
commit 3adcbb56119719667e7662ae1810a687b3b6f346 1 parent 647b3e5
Larry Doolittle ldoolitt authored committed
4 PFunction.cc
@@ -21,10 +21,10 @@
21 21
22 22 #include "PTask.h"
23 23
24   -PFunction::PFunction(perm_string name, PScope*parent, bool is_auto)
  24 +PFunction::PFunction(perm_string name, PScope*parent, bool is_auto__)
25 25 : PScope(name, parent), ports_(0), statement_(0)
26 26 {
27   - is_auto_ = is_auto;
  27 + is_auto_ = is_auto__;
28 28 return_type_.type = PTF_NONE;
29 29 }
30 30
4 PTask.cc
@@ -21,10 +21,10 @@
21 21
22 22 # include "PTask.h"
23 23
24   -PTask::PTask(perm_string name, PScope*parent, bool is_auto)
  24 +PTask::PTask(perm_string name, PScope*parent, bool is_auto__)
25 25 : PScope(name, parent), ports_(0), statement_(0)
26 26 {
27   - is_auto_ = is_auto;
  27 + is_auto_ = is_auto__;
28 28 }
29 29
30 30 PTask::~PTask()
40 Statement.cc
@@ -26,20 +26,20 @@ Statement::~Statement()
26 26 {
27 27 }
28 28
29   -PAssign_::PAssign_(PExpr*lval, PExpr*ex, bool is_constant)
30   -: event_(0), count_(0), lval_(lval), rval_(ex), is_constant_(is_constant)
  29 +PAssign_::PAssign_(PExpr*lval__, PExpr*ex, bool is_constant)
  30 +: event_(0), count_(0), lval_(lval__), rval_(ex), is_constant_(is_constant)
31 31 {
32 32 delay_ = 0;
33 33 }
34 34
35   -PAssign_::PAssign_(PExpr*lval, PExpr*de, PExpr*ex)
36   -: event_(0), count_(0), lval_(lval), rval_(ex), is_constant_(false)
  35 +PAssign_::PAssign_(PExpr*lval__, PExpr*de, PExpr*ex)
  36 +: event_(0), count_(0), lval_(lval__), rval_(ex), is_constant_(false)
37 37 {
38 38 delay_ = de;
39 39 }
40 40
41   -PAssign_::PAssign_(PExpr*lval, PExpr*cnt, PEventStatement*ev, PExpr*ex)
42   -: event_(ev), count_(cnt), lval_(lval), rval_(ex), is_constant_(false)
  41 +PAssign_::PAssign_(PExpr*lval__, PExpr*cnt, PEventStatement*ev, PExpr*ex)
  42 +: event_(ev), count_(cnt), lval_(lval__), rval_(ex), is_constant_(false)
43 43 {
44 44 delay_ = 0;
45 45 }
@@ -50,23 +50,23 @@ PAssign_::~PAssign_()
50 50 delete rval_;
51 51 }
52 52
53   -PAssign::PAssign(PExpr*lval, PExpr*ex)
54   -: PAssign_(lval, ex, false)
  53 +PAssign::PAssign(PExpr*lval__, PExpr*ex)
  54 +: PAssign_(lval__, ex, false)
55 55 {
56 56 }
57 57
58   -PAssign::PAssign(PExpr*lval, PExpr*d, PExpr*ex)
59   -: PAssign_(lval, d, ex)
  58 +PAssign::PAssign(PExpr*lval__, PExpr*d, PExpr*ex)
  59 +: PAssign_(lval__, d, ex)
60 60 {
61 61 }
62 62
63   -PAssign::PAssign(PExpr*lval, PExpr*cnt, PEventStatement*d, PExpr*ex)
64   -: PAssign_(lval, cnt, d, ex)
  63 +PAssign::PAssign(PExpr*lval__, PExpr*cnt, PEventStatement*d, PExpr*ex)
  64 +: PAssign_(lval__, cnt, d, ex)
65 65 {
66 66 }
67 67
68   -PAssign::PAssign(PExpr*lval, PExpr*ex, bool is_constant)
69   -: PAssign_(lval, ex, is_constant)
  68 +PAssign::PAssign(PExpr*lval__, PExpr*ex, bool is_constant)
  69 +: PAssign_(lval__, ex, is_constant)
70 70 {
71 71 }
72 72
@@ -74,18 +74,18 @@ PAssign::~PAssign()
74 74 {
75 75 }
76 76
77   -PAssignNB::PAssignNB(PExpr*lval, PExpr*ex)
78   -: PAssign_(lval, ex, false)
  77 +PAssignNB::PAssignNB(PExpr*lval__, PExpr*ex)
  78 +: PAssign_(lval__, ex, false)
79 79 {
80 80 }
81 81
82   -PAssignNB::PAssignNB(PExpr*lval, PExpr*d, PExpr*ex)
83   -: PAssign_(lval, d, ex)
  82 +PAssignNB::PAssignNB(PExpr*lval__, PExpr*d, PExpr*ex)
  83 +: PAssign_(lval__, d, ex)
84 84 {
85 85 }
86 86
87   -PAssignNB::PAssignNB(PExpr*lval, PExpr*cnt, PEventStatement*d, PExpr*ex)
88   -: PAssign_(lval, cnt, d, ex)
  87 +PAssignNB::PAssignNB(PExpr*lval__, PExpr*cnt, PEventStatement*d, PExpr*ex)
  88 +: PAssign_(lval__, cnt, d, ex)
89 89 {
90 90 }
91 91
10 discipline.cc
@@ -19,8 +19,8 @@
19 19
20 20 # include "discipline.h"
21 21
22   -nature_t::nature_t(perm_string name, perm_string access)
23   -: name_(name), access_(access)
  22 +nature_t::nature_t(perm_string name__, perm_string access__)
  23 +: name_(name__), access_(access__)
24 24 {
25 25 }
26 26
@@ -28,9 +28,9 @@ nature_t::~nature_t()
28 28 {
29 29 }
30 30
31   -discipline_t::discipline_t(perm_string name, ddomain_t domain,
32   - nature_t*pot, nature_t*flow)
33   -: name_(name), domain_(domain), potential_(pot), flow_(flow)
  31 +discipline_t::discipline_t(perm_string name__, ddomain_t domain__,
  32 + nature_t*pot, nature_t*flow__)
  33 +: name_(name__), domain_(domain__), potential_(pot), flow_(flow__)
34 34 {
35 35 }
36 36
4 elab_net.cc
@@ -246,9 +246,9 @@ bool PEIdent::eval_part_select_(Design*des, NetScope*scope, NetNet*sig,
246 246 lidx = sig->sb_to_idx(midx_val-wid+1);
247 247
248 248 if (midx < lidx) {
249   - long tmp = midx;
  249 + long tmpx = midx;
250 250 midx = lidx;
251   - lidx = tmp;
  251 + lidx = tmpx;
252 252 }
253 253
254 254 break;
6 elab_pexpr.cc
@@ -132,13 +132,13 @@ NetExpr*PEFNumber::elaborate_pexpr(Design*des, NetScope*scope) const
132 132 */
133 133 NetExpr*PEIdent::elaborate_pexpr(Design*des, NetScope*scope) const
134 134 {
135   - pform_name_t path = path_;
  135 + pform_name_t oldpath = path_;
136 136 name_component_t name_tail = path_.back();
137   - path.pop_back();
  137 + oldpath.pop_back();
138 138
139 139 NetScope*pscope = scope;
140 140 if (path_.size() > 0) {
141   - list<hname_t> tmp = eval_scope_path(des, scope, path);
  141 + list<hname_t> tmp = eval_scope_path(des, scope, oldpath);
142 142 pscope = des->find_scope(scope, tmp);
143 143 }
144 144
20 elab_scope.cc
@@ -287,8 +287,8 @@ static void elaborate_scope_funcs(Design*des, NetScope*scope,
287 287
288 288 class generate_schemes_work_item_t : public elaborator_work_item_t {
289 289 public:
290   - generate_schemes_work_item_t(Design*des, NetScope*scope, Module*mod)
291   - : elaborator_work_item_t(des), scope_(scope), mod_(mod)
  290 + generate_schemes_work_item_t(Design*des__, NetScope*scope, Module*mod)
  291 + : elaborator_work_item_t(des__), scope_(scope), mod_(mod)
292 292 { }
293 293
294 294 void elaborate_runrun()
@@ -766,11 +766,11 @@ void PGenerate::elaborate_subscope_(Design*des, NetScope*scope)
766 766 class delayed_elaborate_scope_mod_instances : public elaborator_work_item_t {
767 767
768 768 public:
769   - delayed_elaborate_scope_mod_instances(Design*des,
  769 + delayed_elaborate_scope_mod_instances(Design*des__,
770 770 const PGModule*obj,
771 771 Module*mod,
772 772 NetScope*sc)
773   - : elaborator_work_item_t(des), obj_(obj), mod_(mod), sc_(sc)
  773 + : elaborator_work_item_t(des__), obj_(obj), mod_(mod), sc_(sc)
774 774 { }
775 775 ~delayed_elaborate_scope_mod_instances() { }
776 776
@@ -961,16 +961,16 @@ void PGModule::elaborate_scope_mod_instances_(Design*des, Module*mod, NetScope*s
961 961 assert(parms_ == 0);
962 962 list<perm_string>::const_iterator cur
963 963 = mod->param_names.begin();
964   - unsigned idx = 0;
  964 + unsigned jdx = 0;
965 965 for (;;) {
966   - if (idx >= overrides_->count())
  966 + if (jdx >= overrides_->count())
967 967 break;
968 968 if (cur == mod->param_names.end())
969 969 break;
970 970
971   - replace[*cur] = (*overrides_)[idx];
  971 + replace[*cur] = (*overrides_)[jdx];
972 972
973   - idx += 1;
  973 + jdx += 1;
974 974 cur ++;
975 975 }
976 976 }
@@ -979,8 +979,8 @@ void PGModule::elaborate_scope_mod_instances_(Design*des, Module*mod, NetScope*s
979 979 // so the mapping into the replace list is much easier.
980 980 if (parms_) {
981 981 assert(overrides_ == 0);
982   - for (unsigned idx = 0 ; idx < nparms_ ; idx += 1)
983   - replace[parms_[idx].name] = parms_[idx].parm;
  982 + for (unsigned jdx = 0 ; jdx < nparms_ ; jdx += 1)
  983 + replace[parms_[jdx].name] = parms_[jdx].parm;
984 984
985 985 }
986 986
16 elaborate.cc
@@ -3741,10 +3741,10 @@ bool Module::elaborate(Design*des, NetScope*scope) const
3741 3741 NetExpr*val = elab_and_eval(des, scope, (*cur).second, -1);
3742 3742 NetScope::spec_val_t value;
3743 3743
3744   - if (NetECReal*val_c = dynamic_cast<NetECReal*> (val)) {
  3744 + if (NetECReal*val_cr = dynamic_cast<NetECReal*> (val)) {
3745 3745
3746 3746 value.type = IVL_VT_REAL;
3747   - value.real_val = val_c->value().as_double();
  3747 + value.real_val = val_cr->value().as_double();
3748 3748
3749 3749 if (debug_elaborate)
3750 3750 cerr << get_fileline() << ": debug: Elaborate "
@@ -3922,8 +3922,8 @@ struct root_elem {
3922 3922
3923 3923 class elaborate_root_scope_t : public elaborator_work_item_t {
3924 3924 public:
3925   - elaborate_root_scope_t(Design*des, NetScope*scope, Module*rmod)
3926   - : elaborator_work_item_t(des), scope_(scope), rmod_(rmod)
  3925 + elaborate_root_scope_t(Design*des__, NetScope*scope, Module*rmod)
  3926 + : elaborator_work_item_t(des__), scope_(scope), rmod_(rmod)
3927 3927 { }
3928 3928
3929 3929 ~elaborate_root_scope_t() { }
@@ -3942,8 +3942,8 @@ class elaborate_root_scope_t : public elaborator_work_item_t {
3942 3942
3943 3943 class top_defparams : public elaborator_work_item_t {
3944 3944 public:
3945   - top_defparams(Design*des)
3946   - : elaborator_work_item_t(des)
  3945 + top_defparams(Design*des__)
  3946 + : elaborator_work_item_t(des__)
3947 3947 { }
3948 3948
3949 3949 ~top_defparams() { }
@@ -3966,8 +3966,8 @@ class top_defparams : public elaborator_work_item_t {
3966 3966
3967 3967 class later_defparams : public elaborator_work_item_t {
3968 3968 public:
3969   - later_defparams(Design*des)
3970   - : elaborator_work_item_t(des)
  3969 + later_defparams(Design*des__)
  3970 + : elaborator_work_item_t(des__)
3971 3971 { }
3972 3972
3973 3973 ~later_defparams() { }
56 eval_tree.cc
@@ -813,9 +813,9 @@ NetExpr* NetEBDiv::eval_tree(int prune_to_width)
813 813
814 814 verireal lval = lc->value();
815 815
816   - if (NetECReal*rc = dynamic_cast<NetECReal*>(right_)) {
  816 + if (NetECReal*rcr = dynamic_cast<NetECReal*>(right_)) {
817 817 NetECReal*tmp = 0;
818   - verireal rval = rc->value();
  818 + verireal rval = rcr->value();
819 819
820 820 switch (op_) {
821 821 case '/':
@@ -1655,11 +1655,11 @@ NetEConst* NetEUReduce::eval_tree(int prune_to_width)
1655 1655 return new NetEConst(verinum(res, 1));
1656 1656 }
1657 1657
1658   -NetExpr* evaluate_clog2(NetExpr*&arg)
  1658 +NetExpr* evaluate_clog2(NetExpr*&arg_)
1659 1659 {
1660   - eval_expr(arg);
1661   - NetEConst*tmpi = dynamic_cast<NetEConst *>(arg);
1662   - NetECReal*tmpr = dynamic_cast<NetECReal *>(arg);
  1660 + eval_expr(arg_);
  1661 + NetEConst*tmpi = dynamic_cast<NetEConst *>(arg_);
  1662 + NetECReal*tmpr = dynamic_cast<NetECReal *>(arg_);
1663 1663 if (tmpi || tmpr) {
1664 1664 verinum arg;
1665 1665 if (tmpi) {
@@ -1706,11 +1706,11 @@ NetExpr* evaluate_clog2(NetExpr*&arg)
1706 1706 return 0;
1707 1707 }
1708 1708
1709   -NetExpr* evaluate_math_one_arg(NetExpr*&arg, const char*name)
  1709 +NetExpr* evaluate_math_one_arg(NetExpr*&arg_, const char*name)
1710 1710 {
1711   - eval_expr(arg);
1712   - NetEConst*tmpi = dynamic_cast<NetEConst *>(arg);
1713   - NetECReal*tmpr = dynamic_cast<NetECReal *>(arg);
  1711 + eval_expr(arg_);
  1712 + NetEConst*tmpi = dynamic_cast<NetEConst *>(arg_);
  1713 + NetECReal*tmpr = dynamic_cast<NetECReal *>(arg_);
1714 1714 if (tmpi || tmpr) {
1715 1715 double arg;
1716 1716 if (tmpi) {
@@ -1763,14 +1763,14 @@ NetExpr* evaluate_math_one_arg(NetExpr*&arg, const char*name)
1763 1763 return 0;
1764 1764 }
1765 1765
1766   -NetExpr* evaluate_math_two_args(NetExpr*&arg0, NetExpr*&arg1, const char*name)
  1766 +NetExpr* evaluate_math_two_args(NetExpr*&arg0_, NetExpr*&arg1_, const char*name)
1767 1767 {
1768   - eval_expr(arg0);
1769   - eval_expr(arg1);
1770   - NetEConst*tmpi0 = dynamic_cast<NetEConst *>(arg0);
1771   - NetECReal*tmpr0 = dynamic_cast<NetECReal *>(arg0);
1772   - NetEConst*tmpi1 = dynamic_cast<NetEConst *>(arg1);
1773   - NetECReal*tmpr1 = dynamic_cast<NetECReal *>(arg1);
  1768 + eval_expr(arg0_);
  1769 + eval_expr(arg1_);
  1770 + NetEConst*tmpi0 = dynamic_cast<NetEConst *>(arg0_);
  1771 + NetECReal*tmpr0 = dynamic_cast<NetECReal *>(arg0_);
  1772 + NetEConst*tmpi1 = dynamic_cast<NetEConst *>(arg1_);
  1773 + NetECReal*tmpr1 = dynamic_cast<NetECReal *>(arg1_);
1774 1774 if ((tmpi0 || tmpr0) && (tmpi1 || tmpr1)) {
1775 1775 double arg0, arg1;
1776 1776 if (tmpi0) {
@@ -1796,10 +1796,10 @@ NetExpr* evaluate_math_two_args(NetExpr*&arg0, NetExpr*&arg1, const char*name)
1796 1796 return 0;
1797 1797 }
1798 1798
1799   -NetExpr* evaluate_abs(NetExpr*&arg)
  1799 +NetExpr* evaluate_abs(NetExpr*&arg_)
1800 1800 {
1801   - eval_expr(arg);
1802   - NetEConst*tmpi = dynamic_cast<NetEConst *>(arg);
  1801 + eval_expr(arg_);
  1802 + NetEConst*tmpi = dynamic_cast<NetEConst *>(arg_);
1803 1803 if (tmpi) {
1804 1804 verinum arg = tmpi->value();
1805 1805 if (arg.is_negative()) {
@@ -1808,7 +1808,7 @@ NetExpr* evaluate_abs(NetExpr*&arg)
1808 1808 return new NetEConst(arg);
1809 1809 }
1810 1810
1811   - NetECReal*tmpr = dynamic_cast<NetECReal *>(arg);
  1811 + NetECReal*tmpr = dynamic_cast<NetECReal *>(arg_);
1812 1812 if (tmpr) {
1813 1813 double arg = tmpr->value().as_double();
1814 1814 return new NetECReal(verireal(fabs(arg)));
@@ -1817,14 +1817,14 @@ NetExpr* evaluate_abs(NetExpr*&arg)
1817 1817 return 0;
1818 1818 }
1819 1819
1820   -NetExpr* evaluate_min_max(NetExpr*&arg0, NetExpr*&arg1, const char*name)
  1820 +NetExpr* evaluate_min_max(NetExpr*&arg0_, NetExpr*&arg1_, const char*name)
1821 1821 {
1822   - eval_expr(arg0);
1823   - eval_expr(arg1);
1824   - NetEConst*tmpi0 = dynamic_cast<NetEConst *>(arg0);
1825   - NetECReal*tmpr0 = dynamic_cast<NetECReal *>(arg0);
1826   - NetEConst*tmpi1 = dynamic_cast<NetEConst *>(arg1);
1827   - NetECReal*tmpr1 = dynamic_cast<NetECReal *>(arg1);
  1822 + eval_expr(arg0_);
  1823 + eval_expr(arg1_);
  1824 + NetEConst*tmpi0 = dynamic_cast<NetEConst *>(arg0_);
  1825 + NetECReal*tmpr0 = dynamic_cast<NetECReal *>(arg0_);
  1826 + NetEConst*tmpi1 = dynamic_cast<NetEConst *>(arg1_);
  1827 + NetECReal*tmpr1 = dynamic_cast<NetECReal *>(arg1_);
1828 1828 if (tmpi0 && tmpi1) {
1829 1829 verinum arg0 = tmpi0->value();
1830 1830 verinum arg1 = tmpi1->value();
8 expr_synth.cc
@@ -50,8 +50,8 @@ static bool process_binary_args(Design*des, NetScope*scope,
50 50 cases of constants, which can be converted more directly. */
51 51 if (left->expr_type() == IVL_VT_REAL) {
52 52 lsig = left->synthesize(des, scope);
53   - } else if (NetEConst*tmp = dynamic_cast<NetEConst*> (left)) {
54   - lsig = convert_to_real_const(des, scope, tmp);
  53 + } else if (NetEConst*tmpc = dynamic_cast<NetEConst*> (left)) {
  54 + lsig = convert_to_real_const(des, scope, tmpc);
55 55 } else {
56 56 NetNet*tmp = left->synthesize(des, scope);
57 57 lsig = cast_to_real(des, scope, tmp);
@@ -59,8 +59,8 @@ static bool process_binary_args(Design*des, NetScope*scope,
59 59
60 60 if (right->expr_type() == IVL_VT_REAL) {
61 61 rsig = right->synthesize(des, scope);
62   - } else if (NetEConst*tmp = dynamic_cast<NetEConst*> (right)) {
63   - rsig = convert_to_real_const(des, scope, tmp);
  62 + } else if (NetEConst*tmpc = dynamic_cast<NetEConst*> (right)) {
  63 + rsig = convert_to_real_const(des, scope, tmpc);
64 64 } else {
65 65 NetNet*tmp = right->synthesize(des, scope);
66 66 rsig = cast_to_real(des, scope, tmp);
4 link_const.cc
@@ -81,8 +81,8 @@ bool Nexus::drivers_constant() const
8 net_design.cc
@@ -580,10 +580,10 @@ void NetScope::evaluate_parameter_real_(Design*des, param_ref_t cur)
580 580
581 581 void NetScope::evaluate_parameters(Design*des)
582 582 {
583   - NetScope*cur = sub_;
584   - while (cur) {
585   - cur->evaluate_parameters(des);
586   - cur = cur->sib_;
  583 + NetScope*curs = sub_;
  584 + while (curs) {
  585 + curs->evaluate_parameters(des);
  586 + curs = curs->sib_;
587 587 }
588 588
589 589 if (debug_scopes)
32 net_expr.cc
@@ -35,8 +35,8 @@ ivl_variable_type_t NetExpr::expr_type() const
35 35 * Create an add/sub node from the two operands. Make a best guess of
36 36 * the
37 37 */
38   -NetEBAdd::NetEBAdd(char op, NetExpr*l, NetExpr*r, bool lossless_flag)
39   -: NetEBinary(op, l, r)
  38 +NetEBAdd::NetEBAdd(char op__, NetExpr*l, NetExpr*r, bool lossless_flag)
  39 +: NetEBinary(op__, l, r)
40 40 {
41 41 NetEConst* tmp;
42 42
@@ -124,8 +124,8 @@ ivl_variable_type_t NetEBAdd::expr_type() const
124 124 * expression. Otherwise, the netlist will have to allow the
125 125 * expressions to have different widths.
126 126 */
127   -NetEBComp::NetEBComp(char op, NetExpr*l, NetExpr*r)
128   -: NetEBinary(op, l, r)
  127 +NetEBComp::NetEBComp(char op__, NetExpr*l, NetExpr*r)
  128 +: NetEBinary(op__, l, r)
129 129 {
130 130 // The output of compare is always unsigned.
131 131 cast_signed_base_(false);
@@ -188,8 +188,8 @@ ivl_variable_type_t NetEBComp::expr_type() const
188 188 return IVL_VT_BOOL;
189 189 }
190 190
191   -NetEBDiv::NetEBDiv(char op, NetExpr*l, NetExpr*r)
192   -: NetEBinary(op, l, r)
  191 +NetEBDiv::NetEBDiv(char op__, NetExpr*l, NetExpr*r)
  192 +: NetEBinary(op__, l, r)
193 193 {
194 194 unsigned w = l->expr_width();
195 195 if (r->expr_width() > w)
@@ -221,8 +221,8 @@ ivl_variable_type_t NetEBDiv::expr_type() const
221 221 return IVL_VT_LOGIC;
222 222 }
223 223
224   -NetEBMinMax::NetEBMinMax(char op, NetExpr*l, NetExpr*r)
225   -: NetEBinary(op, l, r)
  224 +NetEBMinMax::NetEBMinMax(char op__, NetExpr*l, NetExpr*r)
  225 +: NetEBinary(op__, l, r)
226 226 {
227 227 expr_width( max(l->expr_width(), r->expr_width()) );
228 228 cast_signed(l->has_sign() || r->has_sign());
@@ -242,8 +242,8 @@ ivl_variable_type_t NetEBMinMax::expr_type() const
242 242 return IVL_VT_LOGIC;
243 243 }
244 244
245   -NetEBMult::NetEBMult(char op, NetExpr*l, NetExpr*r)
246   -: NetEBinary(op, l, r)
  245 +NetEBMult::NetEBMult(char op__, NetExpr*l, NetExpr*r)
  246 +: NetEBinary(op__, l, r)
247 247 {
248 248 if (expr_type() == IVL_VT_REAL)
249 249 expr_width(1);
@@ -282,10 +282,10 @@ ivl_variable_type_t NetEBMult::expr_type() const
282 282 return IVL_VT_LOGIC;
283 283 }
284 284
285   -NetEBPow::NetEBPow(char op, NetExpr*l, NetExpr*r)
286   -: NetEBinary(op, l, r)
  285 +NetEBPow::NetEBPow(char op__, NetExpr*l, NetExpr*r)
  286 +: NetEBinary(op__, l, r)
287 287 {
288   - assert(op == 'p');
  288 + assert(op__ == 'p');
289 289 /* This is incorrect! a * (2^b - 1) is close. */
290 290 expr_width(l->expr_width()+r->expr_width());
291 291 cast_signed(l->has_sign() || r->has_sign());
@@ -313,13 +313,13 @@ ivl_variable_type_t NetEBPow::expr_type() const
313 313 return IVL_VT_LOGIC;
314 314 }
315 315
316   -NetEBShift::NetEBShift(char op, NetExpr*l, NetExpr*r)
317   -: NetEBinary(op, l, r)
  316 +NetEBShift::NetEBShift(char op__, NetExpr*l, NetExpr*r)
  317 +: NetEBinary(op__, l, r)
318 318 {
319 319 expr_width(l->expr_width());
320 320
321 321 // The >>> is signed if the left operand is signed.
322   - if (op == 'R') cast_signed(l->has_sign());
  322 + if (op__ == 'R') cast_signed(l->has_sign());
323 323 }
324 324
325 325 NetEBShift::~NetEBShift()
16 net_func.cc
@@ -49,36 +49,36 @@ NetUserFunc::~NetUserFunc()
49 49
50 50 ivl_variable_type_t NetUserFunc::data_type(unsigned port) const
51 51 {
52   - NetFuncDef*def = def_->func_def();
  52 + NetFuncDef*fdef = def_->func_def();
53 53
54 54 /* Port 0 is the return port. */
55 55 if (port == 0) {
56   - const NetNet*sig = def->return_sig();
  56 + const NetNet*sig = fdef->return_sig();
57 57 assert(sig);
58 58 return sig->data_type();
59 59 }
60 60
61 61 port -= 1;
62   - assert(port < def->port_count());
63   - const NetNet*port_sig = def->port(port);
  62 + assert(port < fdef->port_count());
  63 + const NetNet*port_sig = fdef->port(port);
64 64
65 65 return port_sig->data_type();
66 66 }
67 67
68 68 unsigned NetUserFunc::port_width(unsigned port) const
69 69 {
70   - NetFuncDef*def = def_->func_def();
  70 + NetFuncDef*fdef = def_->func_def();
71 71
72 72 /* Port 0 is the return port. */
73 73 if (port == 0) {
74   - const NetNet*sig = def->return_sig();
  74 + const NetNet*sig = fdef->return_sig();
75 75 assert(sig);
76 76 return sig->vector_width();
77 77 }
78 78
79 79 port -= 1;
80   - assert(port < def->port_count());
81   - const NetNet*port_sig = def->port(port);
  80 + assert(port < fdef->port_count());
  81 + const NetNet*port_sig = fdef->port(port);
82 82
83 83 return port_sig->vector_width();
84 84 }
4 net_link.cc
@@ -103,9 +103,9 @@ void Link::drivers_delays(NetExpr*rise, NetExpr*fall, NetExpr*decay)
6 net_scope.cc
@@ -107,7 +107,7 @@ void NetScope::set_line(perm_string file, perm_string def_file,
107 107 }
108 108
109 109 NetExpr* NetScope::set_parameter(perm_string key, NetExpr*expr,
110   - ivl_variable_type_t type,
  110 + ivl_variable_type_t type__,
111 111 NetExpr*msb, NetExpr*lsb, bool signed_flag,
112 112 NetScope::range_t*range_list,
113 113 const LineInfo&file_line)
@@ -115,7 +115,7 @@ NetExpr* NetScope::set_parameter(perm_string key, NetExpr*expr,
115 115 param_expr_t&ref = parameters[key];
116 116 NetExpr* res = ref.expr;
117 117 ref.expr = expr;
118   - ref.type = type;
  118 + ref.type = type__;
119 119 ref.msb = msb;
120 120 ref.lsb = lsb;
121 121 ref.signed_flag = signed_flag;
@@ -123,7 +123,7 @@ NetExpr* NetScope::set_parameter(perm_string key, NetExpr*expr,
123 123 ref.range = range_list;
124 124 ref.set_line(file_line);
125 125
126   - ivl_assert(file_line, type != IVL_VT_NO_TYPE);
  126 + ivl_assert(file_line, type__ != IVL_VT_NO_TYPE);
127 127
128 128 return res;
129 129 }
8 net_tran.cc
@@ -42,8 +42,8 @@ static bool has_enable(ivl_switch_type_t tt)
42 42 }
43 43 }
44 44
45   -NetTran::NetTran(NetScope*scope, perm_string n, ivl_switch_type_t tt)
46   -: NetNode(scope, n, has_enable(tt)? 3 : 2), type_(tt)
  45 +NetTran::NetTran(NetScope*scope__, perm_string n, ivl_switch_type_t tt)
  46 +: NetNode(scope__, n, has_enable(tt)? 3 : 2), type_(tt)
47 47 {
48 48 pin(0).set_dir(Link::PASSIVE);
49 49 pin(1).set_dir(Link::PASSIVE);
@@ -52,8 +52,8 @@ NetTran::NetTran(NetScope*scope, perm_string n, ivl_switch_type_t tt)
52 52 }
53 53 }
54 54
55   -NetTran::NetTran(NetScope*scope, perm_string n, unsigned wid, unsigned part, unsigned off)
56   -: NetNode(scope, n, 2), type_(IVL_SW_TRAN_VP), wid_(wid), part_(part), off_(off)
  55 +NetTran::NetTran(NetScope*scope__, perm_string n, unsigned wid, unsigned part, unsigned off)
  56 +: NetNode(scope__, n, 2), type_(IVL_SW_TRAN_VP), wid_(wid), part_(part), off_(off)
57 57 {
58 58 pin(0).set_dir(Link::PASSIVE);
59 59 pin(1).set_dir(Link::PASSIVE);
4 pform.cc
@@ -1640,8 +1640,8 @@ void pform_set_attrib(perm_string name, perm_string key, char*value)
1640 1640 if (PWire*cur = lexical_scope->wires_find(name)) {
1641 1641 cur->attributes[key] = new PEString(value);
1642 1642
1643   - } else if (PGate*cur = pform_cur_module->get_gate(name)) {
1644   - cur->attributes[key] = new PEString(value);
  1643 + } else if (PGate*curg = pform_cur_module->get_gate(name)) {
  1644 + curg->attributes[key] = new PEString(value);
1645 1645
1646 1646 } else {
1647 1647 free(value);
4 verinum.cc
@@ -47,8 +47,8 @@ verinum::verinum()
47 47 {
48 48 }
49 49
50   -verinum::verinum(const V*bits, unsigned nbits, bool has_len)
51   -: has_len_(has_len), has_sign_(false), string_flag_(false)
  50 +verinum::verinum(const V*bits, unsigned nbits, bool has_len__)
  51 +: has_len_(has_len__), has_sign_(false), string_flag_(false)
52 52 {
53 53 nbits_ = nbits;
54 54 bits_ = new V [nbits];

0 comments on commit 3adcbb5

Please sign in to comment.
Something went wrong with that request. Please try again.