added a new debugging macro HCL_DEBUG_LEXER

removed the debugging macro HCL_DBEUG_BIGINT
This commit is contained in:
hyung-hwan 2018-02-21 13:02:05 +00:00
parent c12b85e0a0
commit 25e4bb040c
2 changed files with 10 additions and 6 deletions

View File

@ -57,11 +57,10 @@
#define HCL_USE_OBJECT_TRAILER
#if defined(HCL_BUILD_DEBUG)
#define HCL_DEBUG_LEXER 1
#define HCL_DEBUG_VM_PROCESSOR 1
#define HCL_DEBUG_VM_EXEC 1
#define HCL_DEBUG_BIGINT 1
#define HCL_PROFILE_VM 1
#endif
@ -76,10 +75,12 @@
*/
#define HCL_LIMIT_OBJ_SIZE
#include <stdio.h> /* TODO: delete these header inclusion lines */
#include <string.h>
#if defined(__has_builtin)
# if (!__has_builtin(__builtin_memset) || !__has_builtin(__builtin_memcpy) || !__has_builtin(__builtin_memmove) || !__has_builtin(__builtin_memcmp))
# include <string.h>
# endif
# if __has_builtin(__builtin_memset)
# define HCL_MEMSET(dst,src,size) __builtin_memset(dst,src,size)
# else
@ -109,6 +110,7 @@
# define HCL_MEMCMP(dst,src,size) __builtin_memcmp(dst,src,size)
#else
# include <string.h>
# define HCL_MEMSET(dst,src,size) memset(dst,src,size)
# define HCL_MEMCPY(dst,src,size) memcpy(dst,src,size)
# define HCL_MEMMOVE(dst,src,size) memmove(dst,src,size)

View File

@ -1196,7 +1196,9 @@ retry:
break;
}
HCL_DEBUG2 (hcl, "TOKEN: [%.*js]\n", (hcl_ooi_t)TOKEN_NAME_LEN(hcl), TOKEN_NAME_PTR(hcl));
#if defined(HCL_DEBUG_LEXER)
HCL_DEBUG2 (hcl, "TOKEN: [%.*js]\n", (hcl_ooi_t)TOKEN_NAME_LEN(hcl), TOKEN_NAME_PTR(hcl));
#endif
return 0;
}