3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 00:55:31 +00:00

remove spurious copies and inc_refs around ref_vector

This commit is contained in:
Nuno Lopes 2018-06-28 10:31:38 +01:00
parent eabe91cdef
commit 5de6628a5d
16 changed files with 49 additions and 53 deletions

View file

@ -320,8 +320,8 @@ namespace eq {
<< "sz is " << sz << "\n"
<< "subst_map[inx]: " << mk_pp(m_subst_map.get(inx), m) << "\n";);
SASSERT(m_subst_map.get(inx) == nullptr);
m_subst_map[inx] = r;
m_subst.update_inv_binding_at(inx, r);
m_subst_map[inx] = std::move(r);
}
}
@ -470,7 +470,7 @@ namespace eq {
m_var2pos[idx] = i;
def_count++;
largest_vinx = std::max(idx, largest_vinx);
m_new_exprs.push_back(t);
m_new_exprs.push_back(std::move(t));
}
else if (!m.is_value(m_map[idx])) {
// check if the new definition is simpler
@ -482,7 +482,7 @@ namespace eq {
m_pos2var[i] = idx;
m_var2pos[idx] = i;
m_map[idx] = t;
m_new_exprs.push_back(t);
m_new_exprs.push_back(std::move(t));
}
// -- prefer ground
else if (is_app(t) && to_app(t)->is_ground() &&
@ -492,7 +492,7 @@ namespace eq {
m_pos2var[i] = idx;
m_var2pos[idx] = i;
m_map[idx] = t;
m_new_exprs.push_back(t);
m_new_exprs.push_back(std::move(t));
}
// -- prefer constants
else if (is_uninterp_const(t)
@ -501,7 +501,7 @@ namespace eq {
m_pos2var[i] = idx;
m_var2pos[idx] = i;
m_map[idx] = t;
m_new_exprs.push_back(t);
m_new_exprs.push_back(std::move(t));
}
TRACE ("qe_def",
tout << "Replacing definition of VAR " << idx << " from "