3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 17:45:32 +00:00

remove a few trivial destructors so they get inlined

This commit is contained in:
Nuno Lopes 2021-04-04 17:13:59 +01:00
parent c0e74f946b
commit c47ab023e5
9 changed files with 7 additions and 38 deletions

View file

@ -39,8 +39,6 @@ public:
SASSERT(m_t2);
}
~binary_tactical() override { }
void updt_params(params_ref const & p) override {
m_t1->updt_params(p);
m_t2->updt_params(p);
@ -101,7 +99,6 @@ struct false_pred {
class and_then_tactical : public binary_tactical {
public:
and_then_tactical(tactic * t1, tactic * t2):binary_tactical(t1, t2) {}
~and_then_tactical() override {}
void operator()(goal_ref const & in, goal_ref_buffer& result) override {
@ -232,8 +229,6 @@ public:
}
}
~nary_tactical() override { }
void updt_params(params_ref const & p) override {
TRACE("nary_tactical_updt_params", tout << "updt_params: " << p << "\n";);
for (tactic* t : m_ts) t->updt_params(p);
@ -284,8 +279,6 @@ class or_else_tactical : public nary_tactical {
public:
or_else_tactical(unsigned num, tactic * const * ts):nary_tactical(num, ts) { SASSERT(num > 0); }
~or_else_tactical() override {}
void operator()(goal_ref const & in, goal_ref_buffer& result) override {
goal orig(*(in.get()));
unsigned sz = m_ts.size();
@ -386,9 +379,6 @@ public:
par_tactical(unsigned num, tactic * const * ts):or_else_tactical(num, ts) {
error_code = 0;
}
~par_tactical() override {}
void operator()(goal_ref const & in, goal_ref_buffer& result) override {
bool use_seq;
@ -525,7 +515,6 @@ tactic * par_and_then(tactic * t1, tactic * t2) {
class par_and_then_tactical : public and_then_tactical {
public:
par_and_then_tactical(tactic * t1, tactic * t2):and_then_tactical(t1, t2) {}
~par_and_then_tactical() override {}
void operator()(goal_ref const & in, goal_ref_buffer& result) override {
bool use_seq;
@ -780,9 +769,7 @@ public:
unary_tactical(tactic * t):
m_t(t) {
SASSERT(t);
}
~unary_tactical() override { }
}
void operator()(goal_ref const & in, goal_ref_buffer& result) override {
m_t->operator()(in, result);
@ -1007,7 +994,7 @@ tactic * using_params(tactic * t, params_ref const & p) {
class annotate_tactical : public unary_tactical {
std::string m_name;
struct scope {
std::string m_name;
const std::string &m_name;
scope(std::string const& name) : m_name(name) {
IF_VERBOSE(TACTIC_VERBOSITY_LVL, verbose_stream() << "(" << m_name << " start)\n";);
}
@ -1043,8 +1030,6 @@ public:
m_p(p) {
SASSERT(m_p);
}
~cond_tactical() override {}
void operator()(goal_ref const & in, goal_ref_buffer & result) override {
if (m_p->operator()(*(in.get())).is_true())
@ -1075,8 +1060,6 @@ public:
m_p(p) {
SASSERT(m_p);
}
~fail_if_tactic() override {}
void cleanup() override {}

View file

@ -91,7 +91,7 @@ The code in spc_rewriter.* does something like that. We cannot reuse this code d
for the superposion engine in Z3, but we can adapt it for our needs in the preprocessor.
*/
class ufbv_rewriter {
class ufbv_rewriter final {
class rewrite_proc;
class add_back_idx_proc;
class remove_back_idx_proc;
@ -185,17 +185,16 @@ class ufbv_rewriter {
void reschedule_processed(func_decl * f);
void reschedule_demodulators(func_decl * f, expr * np);
unsigned max_var_id(expr * e);
protected:
// is_smaller returns -1 for e1<e2, 0 for e1==e2 and +1 for e1>e2.
virtual int is_smaller(expr * e1, expr * e2) const;
int is_smaller(expr * e1, expr * e2) const;
// is_subset returns -1 for e1 subset e2, +1 for e2 subset e1, 0 else.
virtual int is_subset(expr * e1, expr * e2) const;
int is_subset(expr * e1, expr * e2) const;
public:
ufbv_rewriter(ast_manager & m);
virtual ~ufbv_rewriter();
~ufbv_rewriter();
void operator()(unsigned n, expr * const * exprs, proof * const * prs, expr_ref_vector & new_exprs, proof_ref_vector & new_prs);