3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-13 12:28:44 +00:00
Signed-off-by: Miguel Angelo Da Terra Neves <t-mineve@microsoft.com>
This commit is contained in:
Miguel Angelo Da Terra Neves 2017-12-15 13:56:59 -08:00
parent 5edb651f61
commit b731d02adc

View file

@ -48,14 +48,11 @@ void ast_translation::reset_cache() {
void ast_translation::cache(ast * s, ast * t) {
SASSERT(!m_cache.contains(s));
if (s->get_ref_count() > 1) {
if (m_insert_count > (1 << 17)) {
reset_cache();
m_insert_count = 0;
}
m_cache.insert(s, t);
++m_insert_count;
m_from_manager.inc_ref(s);
m_to_manager.inc_ref(t);
m_cache.insert(s, t);
++m_insert_count;
}
}
@ -81,8 +78,8 @@ void ast_translation::push_frame(ast * n) {
}
bool ast_translation::visit(ast * n) {
ast * r;
if (n->get_ref_count() > 1) {
ast * r;
if (m_cache.find(n, r)) {
m_result_stack.push_back(r);
++m_hit_count;