summaryrefslogtreecommitdiff
path: root/javascript/duktape/duk_config.h
diff options
context:
space:
mode:
Diffstat (limited to 'javascript/duktape/duk_config.h')
-rw-r--r--javascript/duktape/duk_config.h217
1 files changed, 160 insertions, 57 deletions
diff --git a/javascript/duktape/duk_config.h b/javascript/duktape/duk_config.h
index 18cd9409c..a3da70a3f 100644
--- a/javascript/duktape/duk_config.h
+++ b/javascript/duktape/duk_config.h
@@ -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:
@@ -95,11 +95,6 @@
#define DUK_F_BSD
#endif
-/* Atari Mint */
-#if defined(__MINT__)
-#define DUK_F_MINT
-#endif
-
/* Atari ST TOS. __TOS__ defined by PureC. No platform define in VBCC
* apparently, so to use with VBCC user must define __TOS__ manually.
*/
@@ -339,6 +334,11 @@
#define DUK_F_VBCC
#endif
+/* Atari Mint */
+#if defined(__MINT__)
+#define DUK_F_MINT
+#endif
+
/*
* Platform autodetection
*/
@@ -371,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)
@@ -629,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)
@@ -914,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")))
@@ -940,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
@@ -951,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)
@@ -1008,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")))
@@ -1042,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
@@ -1058,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 */
@@ -1091,7 +1091,6 @@
#endif
#define DUK_LOCAL_DECL static
#define DUK_LOCAL static
-
#endif
#if defined(DUK_F_CPP)
@@ -1108,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
@@ -1121,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
@@ -1132,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))
@@ -1172,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
@@ -1183,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
@@ -1197,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
@@ -1218,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
@@ -1231,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 */
@@ -1244,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
@@ -1260,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 */
@@ -1834,11 +1868,18 @@ typedef struct duk_hthread duk_context;
*/
#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
@@ -2097,7 +2138,7 @@ typedef FILE duk_file;
#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*/
+/* 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
@@ -2492,13 +2533,8 @@ typedef FILE duk_file;
((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)
@@ -2758,6 +2794,14 @@ typedef FILE duk_file;
#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)
@@ -2868,6 +2912,14 @@ typedef FILE duk_file;
#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. */
@@ -2960,6 +3012,14 @@ typedef FILE duk_file;
#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)
@@ -3133,7 +3193,7 @@ typedef FILE duk_file;
#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
@@ -3199,6 +3259,38 @@ typedef FILE duk_file;
#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)
@@ -3215,14 +3307,6 @@ typedef FILE duk_file;
#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)
@@ -3231,14 +3315,6 @@ typedef FILE duk_file;
#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)
@@ -3321,14 +3397,6 @@ typedef FILE duk_file;
#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
@@ -3385,6 +3453,7 @@ typedef FILE duk_file;
#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
@@ -3403,6 +3472,7 @@ typedef FILE duk_file;
#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
@@ -3611,6 +3681,36 @@ typedef FILE duk_file;
#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
@@ -3620,6 +3720,9 @@ typedef FILE duk_file;
#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