Mercurial > irccd
diff extern/duktape/duk_config.h @ 162:a24e2de22565
Irccd: import Duktape 1.5.0, #509
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 24 May 2016 17:11:49 +0200 |
parents | 1158cffe5a5e |
children | c26b75fb97e3 |
line wrap: on
line diff
--- a/extern/duktape/duk_config.h Tue May 24 13:56:35 2016 +0200 +++ b/extern/duktape/duk_config.h Tue May 24 17:11:49 2016 +0200 @@ -1,8 +1,8 @@ /* * duk_config.h configuration header generated by genconfig.py. * - * Git commit: cad6f595382a0cc1a7e4207794ade5be11b3e397 - * Git describe: v1.4.0 + * Git commit: 83d557704ee63f68ab40b6fcb00995c9b3d6777c + * Git describe: v1.5.0 * Git branch: master * * Supported platforms: @@ -334,6 +334,11 @@ #define DUK_F_VBCC #endif +/* Atari Mint */ +#if defined(__MINT__) +#define DUK_F_MINT +#endif + /* * Platform autodetection */ @@ -366,13 +371,13 @@ #elif TARGET_OS_IPHONE #define DUK_USE_OS_STRING "iphone" #elif TARGET_OS_MAC -#define DUK_USE_OS_STRING "ios" +#define DUK_USE_OS_STRING "osx" #else -#define DUK_USE_OS_STRING "ios-unknown" +#define DUK_USE_OS_STRING "osx-unknown" #endif /* Use _setjmp() on Apple by default, see GH-55. */ -#define DUK_USE_UNDERSCORE_SETJMP +#define DUK_JMPBUF_TYPE jmp_buf #define DUK_SETJMP(jb) _setjmp((jb)) #define DUK_LONGJMP(jb) _longjmp((jb), 1) #elif defined(DUK_F_OPENBSD) @@ -624,7 +629,7 @@ #include <sys/time.h> #include <time.h> -#define DUK_USE_UNDERSCORE_SETJMP +#define DUK_JMPBUF_TYPE jmp_buf #define DUK_SETJMP(jb) _setjmp((jb)) #define DUK_LONGJMP(jb) _longjmp((jb), 1) @@ -909,7 +914,6 @@ #endif #define DUK_LOCAL_DECL static #define DUK_LOCAL static - #else #define DUK_EXTERNAL_DECL __attribute__ ((visibility("default"))) extern #define DUK_EXTERNAL __attribute__ ((visibility("default"))) @@ -935,6 +939,8 @@ #define DUK_USE_VARIADIC_MACROS #endif +#define DUK_USE_UNION_INITIALIZERS + #undef DUK_USE_FLEX_C99 #undef DUK_USE_FLEX_ZEROSIZE #undef DUK_USE_FLEX_ONESIZE @@ -946,7 +952,6 @@ #undef DUK_USE_GCC_PRAGMAS #define DUK_USE_PACK_CLANG_ATTR -#define DUK_F_VARIADIC_MACROS_PROVIDED #elif defined(DUK_F_GCC) /* --- GCC --- */ #if defined(DUK_F_C99) || defined(DUK_F_CPP11) @@ -1003,7 +1008,6 @@ #endif #define DUK_LOCAL_DECL static #define DUK_LOCAL static - #elif defined(DUK_F_GCC_VERSION) && (DUK_F_GCC_VERSION >= 40000) #define DUK_EXTERNAL_DECL __attribute__ ((visibility("default"))) extern #define DUK_EXTERNAL __attribute__ ((visibility("default"))) @@ -1037,6 +1041,8 @@ #define DUK_USE_VARIADIC_MACROS #endif +#define DUK_USE_UNION_INITIALIZERS + #undef DUK_USE_FLEX_C99 #undef DUK_USE_FLEX_ZEROSIZE #undef DUK_USE_FLEX_ONESIZE @@ -1053,7 +1059,6 @@ #endif #define DUK_USE_PACK_GCC_ATTR -#define DUK_F_VARIADIC_MACROS_PROVIDED #elif defined(DUK_F_MSVC) /* --- MSVC --- */ /* http://msdn.microsoft.com/en-us/library/aa235362(VS.60).aspx */ @@ -1086,7 +1091,6 @@ #endif #define DUK_LOCAL_DECL static #define DUK_LOCAL static - #endif #if defined(DUK_F_CPP) @@ -1103,6 +1107,17 @@ #define DUK_USE_VARIADIC_MACROS #endif +#undef DUK_USE_UNION_INITIALIZERS +#if defined(_MSC_VER) && (_MSC_VER >= 1800) +/* VS2013+ supports union initializers but there's a bug involving union-inside-struct: + * https://connect.microsoft.com/VisualStudio/feedback/details/805981 + * The bug was fixed (at least) in VS2015 so check for VS2015 for now: + * https://blogs.msdn.microsoft.com/vcblog/2015/07/01/c-compiler-front-end-fixes-in-vs2015/ + * Manually tested using VS2013, CL reports 18.00.31101, so enable for VS2013 too. + */ +#define DUK_USE_UNION_INITIALIZERS +#endif + #undef DUK_USE_FLEX_C99 #undef DUK_USE_FLEX_ZEROSIZE #undef DUK_USE_FLEX_ONESIZE @@ -1116,6 +1131,15 @@ #define DUK_USE_PACK_MSVC_PRAGMA +/* These have been tested from VS2008 onwards; may work in older VS versions + * too but not enabled by default. + */ +#if defined(_MSC_VER) && (_MSC_VER >= 1500) +#define DUK_NOINLINE __declspec(noinline) +#define DUK_INLINE __inline +#define DUK_ALWAYS_INLINE __forceinline +#endif + #if defined(_MSC_VER) && (_MSC_VER >= 1900) #define DUK_SNPRINTF snprintf #define DUK_VSNPRINTF vsnprintf @@ -1127,7 +1151,6 @@ #define DUK_SNPRINTF _snprintf #define DUK_VSNPRINTF _vsnprintf #endif -#define DUK_F_VARIADIC_MACROS_PROVIDED #elif defined(DUK_F_EMSCRIPTEN) /* --- Emscripten --- */ #define DUK_NORETURN(decl) decl __attribute__((noreturn)) @@ -1167,6 +1190,8 @@ #define DUK_USE_VARIADIC_MACROS #endif +#define DUK_USE_UNION_INITIALIZERS + #undef DUK_USE_FLEX_C99 #undef DUK_USE_FLEX_ZEROSIZE #undef DUK_USE_FLEX_ONESIZE @@ -1178,7 +1203,6 @@ #undef DUK_USE_GCC_PRAGMAS #define DUK_USE_PACK_CLANG_ATTR -#define DUK_F_VARIADIC_MACROS_PROVIDED #elif defined(DUK_F_TINYC) /* --- TinyC --- */ #undef DUK_USE_BRANCH_HINTS @@ -1192,12 +1216,13 @@ /* http://bellard.org/tcc/tcc-doc.html#SEC7 */ #define DUK_USE_VARIADIC_MACROS +#define DUK_USE_UNION_INITIALIZERS + /* Most portable, wastes space */ #define DUK_USE_FLEX_ONESIZE /* Most portable, potentially wastes space */ #define DUK_USE_PACK_DUMMY_MEMBER -#define DUK_F_VARIADIC_MACROS_PROVIDED #elif defined(DUK_F_VBCC) /* --- VBCC --- */ #undef DUK_USE_BRANCH_HINTS @@ -1213,9 +1238,16 @@ #define DUK_USE_VARIADIC_MACROS #endif +/* VBCC supports C99 so check only for C99 for union initializer support. + * Designated union initializers would possibly work even without a C99 check. + */ +#undef DUK_USE_UNION_INITIALIZERS +#if defined(DUK_F_C99) +#define DUK_USE_UNION_INITIALIZERS +#endif + #define DUK_USE_FLEX_ZEROSIZE #define DUK_USE_PACK_DUMMY_MEMBER -#define DUK_F_VARIADIC_MACROS_PROVIDED #elif defined(DUK_F_BCC) /* --- Bruce's C compiler --- */ #undef DUK_USE_BRANCH_HINTS @@ -1226,10 +1258,13 @@ #define DUK_USE_COMPILER_STRING "bcc" #endif -/* XXX */ +/* Most portable */ #undef DUK_USE_VARIADIC_MACROS /* Most portable, wastes space */ +#undef DUK_USE_UNION_INITIALIZERS + +/* Most portable, wastes space */ #define DUK_USE_FLEX_ONESIZE /* Most portable, potentially wastes space */ @@ -1239,7 +1274,6 @@ #if !defined(DUK_USE_BYTEORDER) #define DUK_USE_BYTEORDER 1 #endif -#define DUK_F_VARIADIC_MACROS_PROVIDED #else /* --- Generic --- */ #undef DUK_USE_BRANCH_HINTS @@ -1255,12 +1289,17 @@ #define DUK_USE_VARIADIC_MACROS #endif +/* C++ doesn't have standard designated union initializers ({ .foo = 1 }). */ +#undef DUK_USE_UNION_INITIALIZERS +#if defined(DUK_F_C99) +#define DUK_USE_UNION_INITIALIZERS +#endif + /* Most portable, wastes space */ #define DUK_USE_FLEX_ONESIZE /* Most portable, potentially wastes space */ #define DUK_USE_PACK_DUMMY_MEMBER -#define DUK_F_VARIADIC_MACROS_PROVIDED #endif /* autodetect compiler */ /* uclibc */ @@ -1829,11 +1868,18 @@ */ #if !defined(DUK_SETJMP) -#define DUK_USE_SETJMP +#define DUK_JMPBUF_TYPE jmp_buf #define DUK_SETJMP(jb) setjmp((jb)) #define DUK_LONGJMP(jb) longjmp((jb), 1) #endif +#if 0 +/* sigsetjmp() alternative */ +#define DUK_JMPBUF_TYPE sigjmp_buf +#define DUK_SETJMP(jb) sigsetjmp((jb)) +#define DUK_LONGJMP(jb) siglongjmp((jb), 1) +#endif + typedef FILE duk_file; #if !defined(DUK_STDIN) #define DUK_STDIN stdin @@ -2091,6 +2137,8 @@ /* uclibc may be missing these */ #elif defined(DUK_F_AMIGAOS) && defined(DUK_F_VBCC) /* vbcc + AmigaOS may be missing these */ +#elif defined(DUK_F_MINT) +/* mint clib is missing these */ #elif !defined(DUK_F_C99) && !defined(DUK_F_CPP11) /* build is not C99 or C++11, play it safe */ #else @@ -2485,13 +2533,8 @@ ((duk_uint16_t) (x) << 8) #endif -/* Explicit marker needed; may be 'defined', 'undefined, 'or 'not provided'. */ -#if !defined(DUK_F_VARIADIC_MACROS_PROVIDED) -#undef DUK_USE_VARIADIC_MACROS -#if defined(DUK_F_C99) || defined(DUK_F_CPP11) -#define DUK_USE_VARIADIC_MACROS -#endif -#endif +/* DUK_USE_VARIADIC_MACROS: required from compilers, so no fill-in. */ +/* DUK_USE_UNION_INITIALIZERS: required from compilers, so no fill-in. */ #if !(defined(DUK_USE_FLEX_C99) || defined(DUK_USE_FLEX_ZEROSIZE) || defined(DUK_USE_FLEX_ONESIZE)) #if defined(DUK_F_C99) @@ -2751,6 +2794,14 @@ #undef DUK_USE_DEBUGGER_FWD_PRINTALERT #endif +#if defined(DUK_OPT_DEBUGGER_INSPECT) +#define DUK_USE_DEBUGGER_INSPECT +#elif defined(DUK_OPT_NO_DEBUGGER_INSPECT) +#undef DUK_USE_DEBUGGER_INSPECT +#else +#undef DUK_USE_DEBUGGER_INSPECT +#endif + #if defined(DUK_OPT_DEBUGGER_PAUSE_UNCAUGHT) #define DUK_USE_DEBUGGER_PAUSE_UNCAUGHT #elif defined(DUK_OPT_NO_DEBUGGER_PAUSE_UNCAUGHT) @@ -2861,6 +2912,14 @@ #define DUK_USE_ES6_PROXY #endif +#if defined(DUK_OPT_ES6_REGEXP_BRACES) +#define DUK_USE_ES6_REGEXP_BRACES +#elif defined(DUK_OPT_NO_ES6_REGEXP_BRACES) +#undef DUK_USE_ES6_REGEXP_BRACES +#else +#define DUK_USE_ES6_REGEXP_BRACES +#endif + #undef DUK_USE_EXEC_INDIRECT_BOUND_CHECK #if defined(DUK_OPT_DEBUG) || defined(DUK_OPT_ASSERTIONS) /* Enabled with debug/assertions just so that any issues can be caught. */ @@ -2953,6 +3012,14 @@ #undef DUK_USE_HOBJECT_HASH_PART #endif +#if defined(DUK_OPT_HSTRING_CLEN) +#define DUK_USE_HSTRING_CLEN +#elif defined(DUK_OPT_NO_HSTRING_CLEN) +#undef DUK_USE_HSTRING_CLEN +#else +#define DUK_USE_HSTRING_CLEN +#endif + #if defined(DUK_OPT_EXTERNAL_STRINGS) #define DUK_USE_HSTRING_EXTDATA #elif defined(DUK_OPT_NO_EXTERNAL_STRINGS) @@ -3126,7 +3193,7 @@ #elif defined(DUK_OPT_NO_PACKED_TVAL) #undef DUK_USE_PACKED_TVAL #else -#undef DUK_USE_PACKED_TVAL +/* Already provided above */ #endif #undef DUK_USE_PANIC_ABORT @@ -3192,6 +3259,38 @@ #define DUK_USE_REGEXP_SUPPORT #endif +#if defined(DUK_OPT_ROM_GLOBAL_CLONE) +#define DUK_USE_ROM_GLOBAL_CLONE +#elif defined(DUK_OPT_NO_ROM_GLOBAL_CLONE) +#undef DUK_USE_ROM_GLOBAL_CLONE +#else +#undef DUK_USE_ROM_GLOBAL_CLONE +#endif + +#if defined(DUK_OPT_ROM_GLOBAL_INHERIT) +#define DUK_USE_ROM_GLOBAL_INHERIT +#elif defined(DUK_OPT_NO_ROM_GLOBAL_INHERIT) +#undef DUK_USE_ROM_GLOBAL_INHERIT +#else +#undef DUK_USE_ROM_GLOBAL_INHERIT +#endif + +#if defined(DUK_OPT_ROM_OBJECTS) +#define DUK_USE_ROM_OBJECTS +#elif defined(DUK_OPT_NO_ROM_OBJECTS) +#undef DUK_USE_ROM_OBJECTS +#else +#undef DUK_USE_ROM_OBJECTS +#endif + +#if defined(DUK_OPT_ROM_STRINGS) +#define DUK_USE_ROM_STRINGS +#elif defined(DUK_OPT_NO_ROM_STRINGS) +#undef DUK_USE_ROM_STRINGS +#else +#undef DUK_USE_ROM_STRINGS +#endif + #if defined(DUK_OPT_SECTION_B) #define DUK_USE_SECTION_B #elif defined(DUK_OPT_NO_SECTION_B) @@ -3208,14 +3307,6 @@ #undef DUK_USE_SELF_TESTS #endif -#if defined(DUK_OPT_SETJMP) -#define DUK_USE_SETJMP -#elif defined(DUK_OPT_NO_SETJMP) -#undef DUK_USE_SETJMP -#else -#define DUK_USE_SETJMP -#endif - #if defined(DUK_OPT_SHUFFLE_TORTURE) #define DUK_USE_SHUFFLE_TORTURE #elif defined(DUK_OPT_NO_SHUFFLE_TORTURE) @@ -3224,14 +3315,6 @@ #undef DUK_USE_SHUFFLE_TORTURE #endif -#if defined(DUK_OPT_SIGSETJMP) -#define DUK_USE_SIGSETJMP -#elif defined(DUK_OPT_NO_SIGSETJMP) -#undef DUK_USE_SIGSETJMP -#else -#undef DUK_USE_SIGSETJMP -#endif - #if defined(DUK_OPT_SOURCE_NONBMP) #define DUK_USE_SOURCE_NONBMP #elif defined(DUK_OPT_NO_SOURCE_NONBMP) @@ -3314,14 +3397,6 @@ #define DUK_USE_TRACEBACK_DEPTH 10 #endif -#if defined(DUK_OPT_UNDERSCORE_SETJMP) -#define DUK_USE_UNDERSCORE_SETJMP -#elif defined(DUK_OPT_NO_UNDERSCORE_SETJMP) -#undef DUK_USE_UNDERSCORE_SETJMP -#else -#undef DUK_USE_UNDERSCORE_SETJMP -#endif - #if defined(DUK_OPT_DECLARE) #define DUK_USE_USER_DECLARE() DUK_OPT_DECLARE #else @@ -3378,6 +3453,7 @@ #undef DUK_USE_EXPLICIT_NULL_INIT #define DUK_USE_FAST_REFCOUNT_DEFAULT #define DUK_USE_HEX_FASTPATH +#define DUK_USE_IDCHAR_FASTPATH #undef DUK_USE_INTERRUPT_DEBUG_FIXUP #define DUK_USE_JSON_DECNUMBER_FASTPATH #define DUK_USE_JSON_DECSTRING_FASTPATH @@ -3396,6 +3472,7 @@ #undef DUK_USE_REFZERO_FINALIZER_TORTURE #define DUK_USE_REGEXP_COMPILER_RECLIMIT 10000 #define DUK_USE_REGEXP_EXECUTOR_RECLIMIT 10000 +#define DUK_USE_ROM_PTRCOMP_FIRST 63488L #undef DUK_USE_STRHASH_DENSE #define DUK_USE_STRHASH_SKIP_SHIFT 5 #undef DUK_USE_VALSTACK_UNSAFE @@ -3604,6 +3681,36 @@ #if defined(DUK_USE_RDTSC) #error unsupported config option used (option has been removed): DUK_USE_RDTSC #endif +#if defined(DUK_USE_ROM_GLOBAL_CLONE) && !defined(DUK_USE_ROM_STRINGS) +#error config option DUK_USE_ROM_GLOBAL_CLONE requires option DUK_USE_ROM_STRINGS (which is missing) +#endif +#if defined(DUK_USE_ROM_GLOBAL_CLONE) && !defined(DUK_USE_ROM_OBJECTS) +#error config option DUK_USE_ROM_GLOBAL_CLONE requires option DUK_USE_ROM_OBJECTS (which is missing) +#endif +#if defined(DUK_USE_ROM_GLOBAL_CLONE) && defined(DUK_USE_ROM_GLOBAL_INHERIT) +#error config option DUK_USE_ROM_GLOBAL_CLONE conflicts with option DUK_USE_ROM_GLOBAL_INHERIT (which is also defined) +#endif +#if defined(DUK_USE_ROM_GLOBAL_INHERIT) && !defined(DUK_USE_ROM_STRINGS) +#error config option DUK_USE_ROM_GLOBAL_INHERIT requires option DUK_USE_ROM_STRINGS (which is missing) +#endif +#if defined(DUK_USE_ROM_GLOBAL_INHERIT) && !defined(DUK_USE_ROM_OBJECTS) +#error config option DUK_USE_ROM_GLOBAL_INHERIT requires option DUK_USE_ROM_OBJECTS (which is missing) +#endif +#if defined(DUK_USE_ROM_GLOBAL_INHERIT) && defined(DUK_USE_ROM_GLOBAL_CLONE) +#error config option DUK_USE_ROM_GLOBAL_INHERIT conflicts with option DUK_USE_ROM_GLOBAL_CLONE (which is also defined) +#endif +#if defined(DUK_USE_ROM_OBJECTS) && !defined(DUK_USE_ROM_STRINGS) +#error config option DUK_USE_ROM_OBJECTS requires option DUK_USE_ROM_STRINGS (which is missing) +#endif +#if defined(DUK_USE_ROM_STRINGS) && !defined(DUK_USE_ROM_OBJECTS) +#error config option DUK_USE_ROM_STRINGS requires option DUK_USE_ROM_OBJECTS (which is missing) +#endif +#if defined(DUK_USE_SETJMP) +#error unsupported config option used (option has been removed): DUK_USE_SETJMP +#endif +#if defined(DUK_USE_SIGSETJMP) +#error unsupported config option used (option has been removed): DUK_USE_SIGSETJMP +#endif #if defined(DUK_USE_STRTAB_CHAIN_SIZE) && !defined(DUK_USE_STRTAB_CHAIN) #error config option DUK_USE_STRTAB_CHAIN_SIZE requires option DUK_USE_STRTAB_CHAIN (which is missing) #endif @@ -3613,6 +3720,9 @@ #if defined(DUK_USE_UNALIGNED_ACCESSES_POSSIBLE) #error unsupported config option used (option has been removed): DUK_USE_UNALIGNED_ACCESSES_POSSIBLE #endif +#if defined(DUK_USE_UNDERSCORE_SETJMP) +#error unsupported config option used (option has been removed): DUK_USE_UNDERSCORE_SETJMP +#endif #if defined(DUK_USE_CPP_EXCEPTIONS) && !defined(__cplusplus) #error DUK_USE_CPP_EXCEPTIONS enabled but not compiling with a C++ compiler