deprecated NDEBUG and introduced HCL_BUILD_DEBUG and HCL_BUILD_RELEASE
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.15 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@ -17,7 +17,17 @@
|
||||
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
@ -106,20 +116,18 @@ bin_PROGRAMS = moo$(EXEEXT)
|
||||
@ENABLE_STATIC_MODULE_FALSE@moo_DEPENDENCIES = $(am__DEPENDENCIES_4) \
|
||||
@ENABLE_STATIC_MODULE_FALSE@ $(am__DEPENDENCIES_1)
|
||||
subdir = lib
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||
$(srcdir)/moo-cfg.h.in $(top_srcdir)/ac/depcomp \
|
||||
$(noinst_HEADERS) $(pkginclude_HEADERS)
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
|
||||
$(top_srcdir)/m4/ax_check_sign.m4 \
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_sign.m4 \
|
||||
$(top_srcdir)/m4/ax_cxx_namespace.m4 \
|
||||
$(top_srcdir)/m4/ax_numval.m4 $(top_srcdir)/m4/ax_pthread.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltargz.m4 \
|
||||
$(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
|
||||
$(pkginclude_HEADERS) $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = moo-cfg.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
@ -242,6 +250,8 @@ am__define_uniq_tagged_files = \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/moo-cfg.h.in \
|
||||
$(top_srcdir)/ac/depcomp
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
pkgincludedir = $(includedir)
|
||||
pkglibdir = $(libdir)
|
||||
@ -249,7 +259,6 @@ ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
ARGZ_H = @ARGZ_H@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
@ -304,9 +313,11 @@ LTDLDEPS = @LTDLDEPS@
|
||||
LTDLINCL = @LTDLINCL@
|
||||
LTDLOPEN = @LTDLOPEN@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_ARGZ_H = @LT_ARGZ_H@
|
||||
LT_CONFIG_H = @LT_CONFIG_H@
|
||||
LT_DLLOADERS = @LT_DLLOADERS@
|
||||
LT_DLPREOPEN = @LT_DLPREOPEN@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
@ -491,7 +502,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign lib/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
@ -1054,6 +1064,8 @@ uninstall-am: uninstall-binPROGRAMS uninstall-pkgincludeHEADERS \
|
||||
uninstall-binPROGRAMS uninstall-hook \
|
||||
uninstall-pkgincludeHEADERS uninstall-pkglibLTLIBRARIES
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
install-data-hook:
|
||||
@echo "#ifndef _MOO_CFG_H_" > "$(DESTDIR)$(pkgincludedir)/moo-cfg.h"
|
||||
|
@ -1112,7 +1112,7 @@ static MOO_INLINE void multiply_unsigned_array (const moo_liw_t* x, moo_oow_t xs
|
||||
* --------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#if !defined(NDEBUG)
|
||||
#if defined(MOO_BUILD_DEBUG)
|
||||
#define CANNOT_KARATSUBA(moo,xs,ys) \
|
||||
((xs) < (moo)->option.karatsuba_cutoff || (ys) < (moo)->option.karatsuba_cutoff || \
|
||||
((xs) > (ys) && (ys) <= (((xs) + 1) / 2)) || \
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
#define DECODE_LOG_MASK (MOO_LOG_MNEMONIC | MOO_LOG_DEBUG)
|
||||
|
||||
#if defined(NDEBUG)
|
||||
#if defined(MOO_BUILD_RELEASE)
|
||||
/* get rid of instruction logging regardless of the log mask
|
||||
* in the release build */
|
||||
# define LOG_INST_0(moo,fmt)
|
||||
|
@ -3751,7 +3751,7 @@ static int start_method (moo_t* moo, moo_oop_method_t method, moo_oow_t nargs)
|
||||
MOO_ASSERT (moo, pf_name_index >= 0);
|
||||
pfname = method->slot[pf_name_index];
|
||||
|
||||
#if !defined(NDEBUG)
|
||||
#if defined(MOO_BUILD_DEBUG)
|
||||
LOG_INST1 (moo, "preamble_named_primitive %zd", pf_name_index);
|
||||
#endif
|
||||
MOO_ASSERT (moo, MOO_OBJ_IS_CHAR_POINTER(pfname));
|
||||
|
@ -2164,7 +2164,7 @@ static int handle_logopt (moo_t* moo, const moo_bch_t* str)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if !defined(NDEBUG)
|
||||
#if defined(MOO_BUILD_DEBUG)
|
||||
static int handle_dbgopt (moo_t* moo, const moo_bch_t* str)
|
||||
{
|
||||
xtn_t* xtn = moo_getxtn (moo);
|
||||
@ -2217,7 +2217,7 @@ int main (int argc, char* argv[])
|
||||
{
|
||||
{ ":log", 'l' },
|
||||
{ ":memsize", 'm' },
|
||||
#if !defined(NDEBUG)
|
||||
#if defined(MOO_BUILD_DEBUG)
|
||||
{ ":debug", '\0' }, /* NOTE: there is no short option for --debug */
|
||||
#endif
|
||||
{ MOO_NULL, '\0' }
|
||||
@ -2231,7 +2231,7 @@ int main (int argc, char* argv[])
|
||||
const char* logopt = MOO_NULL;
|
||||
moo_oow_t memsize = MIN_MEMSIZE;
|
||||
|
||||
#if !defined(NDEBUG)
|
||||
#if defined(MOO_BUILD_DEBUG)
|
||||
const char* dbgopt = MOO_NULL;
|
||||
#endif
|
||||
|
||||
@ -2260,7 +2260,7 @@ int main (int argc, char* argv[])
|
||||
|
||||
case '\0':
|
||||
|
||||
#if !defined(NDEBUG)
|
||||
#if defined(MOO_BUILD_DEBUG)
|
||||
if (moo_compbcstr(opt.lngopt, "debug") == 0)
|
||||
{
|
||||
dbgopt = opt.arg;
|
||||
@ -2357,7 +2357,7 @@ int main (int argc, char* argv[])
|
||||
xtn->logmask = MOO_LOG_ALL_TYPES | MOO_LOG_ERROR | MOO_LOG_FATAL;
|
||||
}
|
||||
|
||||
#if !defined(NDEBUG)
|
||||
#if defined(MOO_BUILD_DEBUG)
|
||||
if (dbgopt)
|
||||
{
|
||||
if (handle_dbgopt (moo, dbgopt) <= -1)
|
||||
|
@ -377,13 +377,21 @@
|
||||
module search path. */
|
||||
#undef LT_MODULE_PATH_VAR
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Define to the shared library suffix, say, ".dylib". */
|
||||
#undef LT_SHARED_EXT
|
||||
|
||||
/* Define to the shared archive member specification, say "(shr.o)". */
|
||||
#undef LT_SHARED_LIB_MEMBER
|
||||
|
||||
/* build release/debug */
|
||||
#undef MOO_BUILD_DEBUG
|
||||
|
||||
/* build release/debug */
|
||||
#undef MOO_BUILD_RELEASE
|
||||
|
||||
/* enable dynamic module capability */
|
||||
#undef MOO_ENABLE_DYNAMIC_MODULE
|
||||
|
||||
@ -685,5 +693,5 @@
|
||||
/* Define so that glibc/gnulib argp.h does not typedef error_t. */
|
||||
#undef __error_t_defined
|
||||
|
||||
/* Define to a type to use for `error_t' if it is not otherwise available. */
|
||||
/* Define to a type to use for 'error_t' if it is not otherwise available. */
|
||||
#undef error_t
|
||||
|
@ -50,7 +50,7 @@
|
||||
#define MOO_KARATSUBA_CUTOFF 32
|
||||
#define MOO_KARATSUBA_CUTOFF_DEBUG 3
|
||||
|
||||
#if !defined(NDEBUG)
|
||||
#if defined(MOO_BUILD_DEBUG)
|
||||
/*#define MOO_DEBUG_LEXER 1*/
|
||||
#define MOO_DEBUG_COMPILER 1
|
||||
#define MOO_DEBUG_VM_PROCESSOR 1
|
||||
|
@ -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;
|
||||
|
@ -113,7 +113,7 @@ typedef enum moo_option_dflval_t moo_option_dflval_t;
|
||||
|
||||
enum moo_trait_t
|
||||
{
|
||||
#if !defined(NDEBUG)
|
||||
#if defined(MOO_BUILD_DEBUG)
|
||||
MOO_DEBUG_GC = (1 << 0),
|
||||
MOO_DEBUG_BIGINT = (1 << 1),
|
||||
#endif
|
||||
@ -1183,8 +1183,10 @@ struct moo_t
|
||||
moo_oow_t dfl_sysdic_size;
|
||||
moo_oow_t dfl_procstk_size;
|
||||
|
||||
#if defined(MOO_BUILD_DEBUG)
|
||||
/* set automatically when trait is set */
|
||||
int karatsuba_cutoff; /* used only if NDEBUG is not set */
|
||||
int karatsuba_cutoff;
|
||||
#endif
|
||||
} option;
|
||||
|
||||
moo_vmprim_t vmprim;
|
||||
@ -1457,7 +1459,7 @@ typedef enum moo_log_mask_t moo_log_mask_t;
|
||||
#define MOO_LOG5(moo,mask,fmt,a1,a2,a3,a4,a5) do { if (MOO_LOG_ENABLED(moo,mask)) moo_logbfmt(moo, mask, fmt, a1, a2, a3, a4, a5); } while(0)
|
||||
#define MOO_LOG6(moo,mask,fmt,a1,a2,a3,a4,a5,a6) do { if (MOO_LOG_ENABLED(moo,mask)) moo_logbfmt(moo, mask, fmt, a1, a2, a3, a4, a5, a6); } while(0)
|
||||
|
||||
#if defined(NDEBUG)
|
||||
#if defined(MOO_BUILD_RELEASE)
|
||||
/* [NOTE]
|
||||
* get rid of debugging message totally regardless of
|
||||
* the log mask in the release build.
|
||||
@ -1491,7 +1493,7 @@ typedef enum moo_log_mask_t moo_log_mask_t;
|
||||
/* =========================================================================
|
||||
* MOO ASSERTION
|
||||
* ========================================================================= */
|
||||
#if defined(NDEBUG)
|
||||
#if defined(MOO_BUILD_RELEASE)
|
||||
# define MOO_ASSERT(moo,expr) ((void)0)
|
||||
#else
|
||||
# define MOO_ASSERT(moo,expr) ((void)((expr) || (moo_assertfailed (moo, #expr, __FILE__, __LINE__), 0)))
|
||||
|
@ -30,7 +30,7 @@ void* moo_allocbytes (moo_t* moo, moo_oow_t size)
|
||||
{
|
||||
moo_uint8_t* ptr;
|
||||
|
||||
#if !defined(NDEBUG)
|
||||
#if defined(MOO_BUILD_DEBUG)
|
||||
if ((moo->option.trait & MOO_DEBUG_GC) && !(moo->option.trait & MOO_NOGC)) moo_gc (moo);
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user