PIC_DIRECT_THREADED_VM and PIC_NAN_BOXING are now unconfigurable
This commit is contained in:
parent
4c376650ca
commit
b436207eba
|
@ -2,43 +2,26 @@
|
||||||
* See Copyright Notice in picrin.h
|
* 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 */
|
/** no dependency on libc */
|
||||||
/* #define PIC_ENABLE_LIBC 1 */
|
/* #define PIC_ENABLE_LIBC 1 */
|
||||||
|
|
||||||
/** use stdio or not */
|
/** use stdio or not */
|
||||||
/* #define PIC_ENABLE_STDIO 1 */
|
/* #define PIC_ENABLE_STDIO 1 */
|
||||||
|
|
||||||
/** custom setjmp/longjmp */
|
/** essential external functions */
|
||||||
/* #define PIC_JMPBUF jmp_buf */
|
/* #define PIC_JMPBUF jmp_buf */
|
||||||
/* #define PIC_SETJMP(pic, buf) setjmp(buf) */
|
/* #define PIC_SETJMP(pic, buf) setjmp(buf) */
|
||||||
/* #define PIC_LONGJMP(pic, buf, val) longjmp((buf), (val)) */
|
/* #define PIC_LONGJMP(pic, buf, val) longjmp((buf), (val)) */
|
||||||
|
|
||||||
/** custom abort */
|
|
||||||
/* #define PIC_ABORT(pic) abort() */
|
/* #define PIC_ABORT(pic) abort() */
|
||||||
|
|
||||||
/** initial memory size (to be dynamically extended if necessary) */
|
/** initial memory size (to be dynamically extended if necessary) */
|
||||||
/* #define PIC_ARENA_SIZE 1000 */
|
/* #define PIC_ARENA_SIZE 1000 */
|
||||||
|
|
||||||
/* #define PIC_HEAP_PAGE_SIZE 10000 */
|
/* #define PIC_HEAP_PAGE_SIZE 10000 */
|
||||||
|
|
||||||
/* #define PIC_PAGE_REQUEST_THRESHOLD(total) ((total) * 77 / 100) */
|
/* #define PIC_PAGE_REQUEST_THRESHOLD(total) ((total) * 77 / 100) */
|
||||||
|
|
||||||
/* #define PIC_STACK_SIZE 1024 */
|
/* #define PIC_STACK_SIZE 1024 */
|
||||||
|
|
||||||
/* #define PIC_RESCUE_SIZE 30 */
|
/* #define PIC_RESCUE_SIZE 30 */
|
||||||
|
|
||||||
/* #define PIC_SYM_POOL_SIZE 128 */
|
/* #define PIC_SYM_POOL_SIZE 128 */
|
||||||
|
|
||||||
/* #define PIC_IREP_SIZE 8 */
|
/* #define PIC_IREP_SIZE 8 */
|
||||||
|
|
||||||
/* #define PIC_POOL_SIZE 8 */
|
/* #define PIC_POOL_SIZE 8 */
|
||||||
|
|
||||||
/* #define PIC_SYMS_SIZE 32 */
|
/* #define PIC_SYMS_SIZE 32 */
|
||||||
|
|
||||||
/* #define PIC_ISEQ_SIZE 1024 */
|
/* #define PIC_ISEQ_SIZE 1024 */
|
||||||
|
|
|
@ -4,18 +4,6 @@
|
||||||
|
|
||||||
#include "picrin/config.h"
|
#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
|
#ifndef PIC_ENABLE_LIBC
|
||||||
# define PIC_ENABLE_LIBC 1
|
# define PIC_ENABLE_LIBC 1
|
||||||
#endif
|
#endif
|
||||||
|
@ -457,3 +445,17 @@ void PIC_DOUBLE_TO_CSTRING(double, char *);
|
||||||
#define PIC_CSTRING_TO_DOUBLE atof
|
#define PIC_CSTRING_TO_DOUBLE atof
|
||||||
#endif
|
#endif
|
||||||
double PIC_CSTRING_TO_DOUBLE(const char *);
|
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
|
||||||
|
|
Loading…
Reference in New Issue