From 5612e999d18678d5de2a268a7765054f85f49442 Mon Sep 17 00:00:00 2001 From: "hyunghwan.chung" Date: Wed, 21 Feb 2018 12:59:14 +0000 Subject: [PATCH] removed a wrong macro definitnion MOO_DEBUG_BIGINT --- moo/lib/moo-prv.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/moo/lib/moo-prv.h b/moo/lib/moo-prv.h index f4f6b1f..41d615d 100644 --- a/moo/lib/moo-prv.h +++ b/moo/lib/moo-prv.h @@ -55,7 +55,6 @@ #define MOO_DEBUG_COMPILER 1 #define MOO_DEBUG_VM_PROCESSOR 1 /*#define MOO_DEBUG_VM_EXEC*/ -#define MOO_DEBUG_BIGINT 1 #define MOO_PROFILE_VM 1 #endif @@ -74,10 +73,12 @@ #define MOO_LIMIT_OBJ_SIZE -/* TODO: delete these header inclusion lines after having revised MOO_MEMXXX macros. */ -#include - #if defined(__has_builtin) + +# if (!__has_builtin(__builtin_memset) || !__has_builtin(__builtin_memcpy) || !__has_builtin(__builtin_memmove) || !__has_builtin(__builtin_memcmp)) +# include +# endif + # if __has_builtin(__builtin_memset) # define MOO_MEMSET(dst,src,size) __builtin_memset(dst,src,size) # else @@ -98,7 +99,13 @@ # else # define MOO_MEMCMP(dst,src,size) memcmp(dst,src,size) # endif + #else + +# if defined(HAVE___BUILTIN_MEMSET) || !defined(HAVE___BUILTIN_MEMCPY) || !defined(HAVE___BUILTIN_MEMMOVE) || !defined(HAVE___BUILTIN_MEMCMP) +# include +# endif + # if defined(HAVE___BUILTIN_MEMSET) # define MOO_MEMSET(dst,src,size) __builtin_memset(dst,src,size) # else @@ -119,6 +126,7 @@ # else # define MOO_MEMCMP(dst,src,size) memcmp(dst,src,size) # endif + #endif