summaryrefslogtreecommitdiff
path: root/kernel/rtlil.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-08-02 15:11:35 +0200
committerClifford Wolf <clifford@clifford.at>2014-08-02 15:11:35 +0200
commit60f3dc99237afc051560d18f38625337dc80ac80 (patch)
tree6c4a3ca0815e0bc3f3266c6ba6d88aa05d21241b /kernel/rtlil.cc
parent97ad0623dfd772e8bea0728b439a8cd1f7493b7d (diff)
Implemented new reference counting RTLIL::IdString
Diffstat (limited to 'kernel/rtlil.cc')
-rw-r--r--kernel/rtlil.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc
index af652a9d..80f63ce7 100644
--- a/kernel/rtlil.cc
+++ b/kernel/rtlil.cc
@@ -26,6 +26,11 @@
YOSYS_NAMESPACE_BEGIN
+std::vector<int> RTLIL::IdString::global_refcount_storage_;
+std::vector<std::string> RTLIL::IdString::global_id_storage_;
+std::map<const std::string, int> RTLIL::IdString::global_id_index_;
+std::vector<int> RTLIL::IdString::global_free_idx_list_;
+
RTLIL::Const::Const()
{
flags = RTLIL::CONST_FLAG_NONE;
@@ -1998,8 +2003,7 @@ void RTLIL::SigSpec::hash() const
for (auto &v : c.data.bits)
DJB2(that->hash_, v);
} else {
- for (auto &v : c.wire->name.str())
- DJB2(that->hash_, v);
+ DJB2(that->hash_, c.wire->name.index_);
DJB2(that->hash_, c.offset);
DJB2(that->hash_, c.width);
}