mirror of
https://github.com/Z3Prover/z3
synced 2025-04-08 10:25:18 +00:00
compiler love: make a few symbols static and avoid unneeded relocations
Signed-off-by: Nuno Lopes <a-nlopes@microsoft.com>
This commit is contained in:
parent
a96a9a076d
commit
5676fbbc9e
|
@ -2104,7 +2104,7 @@ def mk_pat_db():
|
|||
c = get_component(PATTERN_COMPONENT)
|
||||
fin = open(os.path.join(c.src_dir, 'database.smt2'), 'r')
|
||||
fout = open(os.path.join(c.src_dir, 'database.h'), 'w')
|
||||
fout.write('char const * g_pattern_database =\n')
|
||||
fout.write('static char const g_pattern_database[] =\n')
|
||||
for line in fin:
|
||||
fout.write('"%s\\n"\n' % line.strip('\n'))
|
||||
fout.write(';\n')
|
||||
|
|
|
@ -34,9 +34,9 @@ Revision History:
|
|||
// ---------------------------------------
|
||||
// smt_renaming
|
||||
|
||||
const static char* m_predef_names[] = {
|
||||
static const char m_predef_names[][8] = {
|
||||
"=", ">=", "<=", "+", "-", "*", ">", "<", "!=", "or", "and", "implies", "not", "iff", "xor",
|
||||
"true", "false", "forall", "exists", "let", "flet", NULL
|
||||
"true", "false", "forall", "exists", "let", "flet"
|
||||
};
|
||||
|
||||
symbol smt_renaming::fix_symbol(symbol s, int k) {
|
||||
|
@ -120,8 +120,8 @@ bool smt_renaming::all_is_legal(char const* s) {
|
|||
}
|
||||
|
||||
smt_renaming::smt_renaming() {
|
||||
for (const char **p = m_predef_names; *p; ++p) {
|
||||
symbol s(*p);
|
||||
for (unsigned i = 0; i < ARRAYSIZE(m_predef_names); ++i) {
|
||||
symbol s(m_predef_names[i]);
|
||||
m_translate.insert(s, s);
|
||||
m_rev_translate.insert(s, s);
|
||||
}
|
||||
|
|
|
@ -26,8 +26,6 @@ Notes:
|
|||
|
||||
template<typename Config>
|
||||
class poly_rewriter : public Config {
|
||||
public:
|
||||
static char const * g_ste_blowup_msg;
|
||||
protected:
|
||||
typedef typename Config::numeral numeral;
|
||||
sort * m_curr_sort;
|
||||
|
|
|
@ -22,9 +22,6 @@ Notes:
|
|||
#include"ast_ll_pp.h"
|
||||
#include"ast_smt2_pp.h"
|
||||
|
||||
template<typename Config>
|
||||
char const * poly_rewriter<Config>::g_ste_blowup_msg = "sum of monomials blowup";
|
||||
|
||||
|
||||
template<typename Config>
|
||||
void poly_rewriter<Config>::updt_params(params_ref const & _p) {
|
||||
|
@ -356,7 +353,7 @@ br_status poly_rewriter<Config>::mk_nflat_mul_core(unsigned num_args, expr * con
|
|||
TRACE("som", for (unsigned i = 0; i < it.size(); i++) tout << it[i] << " ";
|
||||
tout << "\n";);
|
||||
if (sum.size() > m_som_blowup)
|
||||
throw rewriter_exception(g_ste_blowup_msg);
|
||||
throw rewriter_exception("sum of monomials blowup");
|
||||
m_args.reset();
|
||||
for (unsigned i = 0; i < num_args; i++) {
|
||||
expr * const * v = sums[i];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
static char const * g_pattern_database =
|
||||
static char const g_pattern_database[] =
|
||||
"(benchmark patterns \n"
|
||||
" :status unknown \n"
|
||||
" :logic ALL \n"
|
||||
|
|
|
@ -60,7 +60,7 @@ static void throw_out_of_memory() {
|
|||
}
|
||||
|
||||
#ifdef PROFILE_MEMORY
|
||||
unsigned g_synch_counter = 0;
|
||||
static unsigned g_synch_counter = 0;
|
||||
class mem_usage_report {
|
||||
public:
|
||||
~mem_usage_report() {
|
||||
|
|
|
@ -19,7 +19,7 @@ Revision History:
|
|||
|
||||
#include"util.h"
|
||||
|
||||
unsigned g_verbosity_level = 0;
|
||||
static unsigned g_verbosity_level = 0;
|
||||
|
||||
void set_verbosity_level(unsigned lvl) {
|
||||
g_verbosity_level = lvl;
|
||||
|
@ -40,7 +40,7 @@ std::ostream& verbose_stream() {
|
|||
}
|
||||
|
||||
|
||||
void (*g_fatal_error_handler)(int) = 0;
|
||||
static void (*g_fatal_error_handler)(int) = 0;
|
||||
|
||||
void fatal_error(int error_code) {
|
||||
if (g_fatal_error_handler) {
|
||||
|
|
Loading…
Reference in a new issue