mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 09:05:31 +00:00
revert last two commits; MSVC doesn't like to statically allocate flexible arrays
This commit is contained in:
parent
6246c6517d
commit
c4fa719751
3 changed files with 7 additions and 8 deletions
|
@ -327,8 +327,10 @@ namespace smt {
|
|||
}
|
||||
|
||||
tmp_enode::tmp_enode():
|
||||
m_app(0),
|
||||
m_capacity(0),
|
||||
m_enode_data(nullptr) {
|
||||
SASSERT(m_app.get_app()->get_decl() == 0);
|
||||
set_capacity(5);
|
||||
}
|
||||
|
||||
|
@ -344,7 +346,7 @@ namespace smt {
|
|||
m_enode_data = alloc_svect(char, sz);
|
||||
memset(m_enode_data, 0, sz);
|
||||
enode * n = get_enode();
|
||||
n->m_owner = &m_app;
|
||||
n->m_owner = m_app.get_app();
|
||||
n->m_root = n;
|
||||
n->m_next = n;
|
||||
n->m_class_size = 1;
|
||||
|
@ -356,11 +358,12 @@ namespace smt {
|
|||
if (num_args > m_capacity)
|
||||
set_capacity(num_args * 2);
|
||||
enode * r = get_enode();
|
||||
m_app.m_decl = f;
|
||||
m_app.m_num_args = num_args;
|
||||
m_app.set_decl(f);
|
||||
m_app.set_num_args(num_args);
|
||||
r->m_commutative = num_args == 2 && f->is_commutative();
|
||||
memcpy(get_enode()->m_args, args, sizeof(enode*)*num_args);
|
||||
return r;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -456,7 +456,7 @@ namespace smt {
|
|||
void unmark_enodes2(unsigned num_enodes, enode * const * enodes);
|
||||
|
||||
class tmp_enode {
|
||||
app m_app;
|
||||
tmp_app m_app;
|
||||
unsigned m_capacity;
|
||||
char * m_enode_data;
|
||||
enode * get_enode() { return reinterpret_cast<enode*>(m_enode_data); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue