diff --git a/extlib/benz/include/picrin/config.h b/extlib/benz/include/picrin/config.h index 867f33e2..e928f95f 100644 --- a/extlib/benz/include/picrin/config.h +++ b/extlib/benz/include/picrin/config.h @@ -2,43 +2,26 @@ * See Copyright Notice in picrin.h */ -/** switch normal VM and direct threaded VM */ -/* #define PIC_DIRECT_THREADED_VM 1 */ - -/** switch internal value representation */ -/* #define PIC_NAN_BOXING 1 */ - /** no dependency on libc */ /* #define PIC_ENABLE_LIBC 1 */ /** use stdio or not */ /* #define PIC_ENABLE_STDIO 1 */ -/** custom setjmp/longjmp */ +/** essential external functions */ /* #define PIC_JMPBUF jmp_buf */ /* #define PIC_SETJMP(pic, buf) setjmp(buf) */ /* #define PIC_LONGJMP(pic, buf, val) longjmp((buf), (val)) */ - -/** custom abort */ /* #define PIC_ABORT(pic) abort() */ /** initial memory size (to be dynamically extended if necessary) */ /* #define PIC_ARENA_SIZE 1000 */ - /* #define PIC_HEAP_PAGE_SIZE 10000 */ - /* #define PIC_PAGE_REQUEST_THRESHOLD(total) ((total) * 77 / 100) */ - /* #define PIC_STACK_SIZE 1024 */ - /* #define PIC_RESCUE_SIZE 30 */ - /* #define PIC_SYM_POOL_SIZE 128 */ - /* #define PIC_IREP_SIZE 8 */ - /* #define PIC_POOL_SIZE 8 */ - /* #define PIC_SYMS_SIZE 32 */ - /* #define PIC_ISEQ_SIZE 1024 */ diff --git a/extlib/benz/include/picrin/setup.h b/extlib/benz/include/picrin/setup.h index 34e36a49..86aee1b2 100644 --- a/extlib/benz/include/picrin/setup.h +++ b/extlib/benz/include/picrin/setup.h @@ -4,18 +4,6 @@ #include "picrin/config.h" -#ifndef PIC_DIRECT_THREADED_VM -# if (defined(__GNUC__) || defined(__clang__)) && ! defined(__STRICT_ANSI__) -# define PIC_DIRECT_THREADED_VM 1 -# endif -#endif - -#ifndef PIC_NAN_BOXING -# if __x86_64__ && (defined(__GNUC__) || defined(__clang__)) && ! defined(__STRICT_ANSI__) -# define PIC_NAN_BOXING 1 -# endif -#endif - #ifndef PIC_ENABLE_LIBC # define PIC_ENABLE_LIBC 1 #endif @@ -457,3 +445,17 @@ void PIC_DOUBLE_TO_CSTRING(double, char *); #define PIC_CSTRING_TO_DOUBLE atof #endif double PIC_CSTRING_TO_DOUBLE(const char *); + +/* optional features available? */ + +#if (defined(__GNUC__) || defined(__clang__)) && ! defined(__STRICT_ANSI__) +# define PIC_DIRECT_THREADED_VM 1 +#else +# define PIC_DIRECT_THREADED_VM 0 +#endif + +#if __x86_64__ && (defined(__GNUC__) || defined(__clang__)) && ! defined(__STRICT_ANSI__) +# define PIC_NAN_BOXING 1 +#else +# define PIC_NAN_BOXING 0 +#endif