deprecated NDEBUG and introduced HCL_BUILD_DEBUG and HCL_BUILD_RELEASE

This commit is contained in:
hyunghwan.chung
2018-02-21 09:35:59 +00:00
parent ebb90dc133
commit 8233a6ae0a
75 changed files with 15087 additions and 10019 deletions

View File

@ -102,7 +102,9 @@ int moo_init (moo_t* moo, moo_mmgr_t* mmgr, moo_oow_t heapsz, const moo_vmprim_t
moo->option.dfl_symtab_size = MOO_DFL_SYMTAB_SIZE;
moo->option.dfl_sysdic_size = MOO_DFL_SYSDIC_SIZE;
moo->option.dfl_procstk_size = MOO_DFL_PROCSTK_SIZE;
#if defined(MOO_BUILD_DEBUG)
moo->option.karatsuba_cutoff = MOO_KARATSUBA_CUTOFF;
#endif
moo->log.capa = MOO_ALIGN_POW2(1, MOO_LOG_CAPA_ALIGN); /* TODO: is this a good initial size? */
/* alloate the log buffer in advance though it may get reallocated
@ -278,7 +280,7 @@ int moo_setoption (moo_t* moo, moo_option_t id, const void* value)
{
case MOO_TRAIT:
moo->option.trait = *(const unsigned int*)value;
#if !defined(NDEBUG)
#if defined(MOO_BUILD_DEBUG)
moo->option.karatsuba_cutoff = ((moo->option.trait & MOO_DEBUG_BIGINT)? MOO_KARATSUBA_CUTOFF_DEBUG: MOO_KARATSUBA_CUTOFF);
#endif
return 0;