21 result=
hash_combine(result, static_cast<const merged_irept &>(*it).hash());
28 result, static_cast<const merged_irept &>(it->second).hash());
46 if(sub.size()!=o_sub.size())
48 if(named_sub.size()!=o_named_sub.size())
52 irept::subt::const_iterator s_it=sub.begin();
53 irept::subt::const_iterator os_it=o_sub.begin();
55 for(; s_it!=sub.end(); s_it++, os_it++)
56 if(static_cast<const merged_irept &>(*s_it)!=
57 static_cast<const merged_irept &>(*os_it))
62 irept::named_subt::const_iterator s_it=named_sub.begin();
63 irept::named_subt::const_iterator os_it=o_named_sub.begin();
65 for(; s_it!=named_sub.end(); s_it++, os_it++)
66 if(s_it->first!=os_it->first ||
67 static_cast<const merged_irept &>(s_it->second)!=
68 static_cast<const merged_irept &>(os_it->second))
79 merged_irep_storet::const_iterator entry=
90 dest_sub.reserve(src_sub.size());
93 dest_sub.push_back(
merged(*it));
100 dest_named_sub.push_back(
101 std::make_pair(it->first,
merged(it->second)));
103 dest_named_sub[it->first]=
merged(it->second);
106 std::pair<to_be_merged_irep_storet::const_iterator, bool> result=
113 static_cast<const merged_irept &>(
114 static_cast<const irept &>(*result.first));
127 irep_storet::const_iterator entry=
irep_store.find(irep);
135 dest_sub.reserve(src_sub.size());
138 dest_sub.push_back(
merged(*it));
145 dest_named_sub.push_back(
146 std::make_pair(it->first,
merged(it->second)));
148 dest_named_sub[it->first]=
merged(it->second);
156 dest_comments.push_back(
157 std::make_pair(it->first,
merged(it->second)));
159 dest_comments[it->first]=
merged(it->second);
175 irep_storet::const_iterator entry=
irep_store.find(irep);
183 dest_sub.reserve(src_sub.size());
186 dest_sub.push_back(
merged(*it));
193 dest_named_sub.push_back(
194 std::make_pair(it->first,
merged(it->second)));
196 dest_named_sub[it->first]=
merged(it->second);
204 dest_comments.push_back(
205 std::make_pair(it->first,
merged(it->second)));
207 dest_comments[it->first]=
merged(it->second);
std::vector< irept > subt
#define forall_named_irep(it, irep)
const irep_idt & id() const
const irept & merged(const irept &irep)
#define hash_finalize(h1, len)
named_subt & get_comments()
Base class for tree-like data structures with sharing.
std::map< irep_namet, irept > named_subt
bool operator==(const to_be_merged_irept &other) const
named_subt & get_named_sub()
size_t hash_string(const dstringt &s)
to_be_merged_irep_storet to_be_merged_irep_store
const irept & merged(const irept &irep)
#define hash_combine(h1, h2)
const merged_irept & merged(const irept &)
merged_irep_storet merged_irep_store
#define forall_irep(it, irep)