11/*
22 * duk_config.h configuration header generated by genconfig.py.
33 *
4- * Git commit: 12e0741b105e53174202b7c15f55a95f6aa0bfb0
5- * Git describe: v2.0.2
6- * Git branch: v2.0-maintenance
4+ * Git commit: 1f1f51a4f9595ffe8def0e9ba45b20f14679393a
5+ * Git describe: v2.1.0
6+ * Git branch: master
77 *
88 * Supported platforms:
99 * - Mac OSX, iPhone, Darwin
1212 * - Generic BSD
1313 * - Atari ST TOS
1414 * - AmigaOS
15+ * - Durango (XboxOne)
1516 * - Windows
1617 * - Flashplayer (Crossbridge)
1718 * - QNX
128129#endif
129130#endif
130131
132+ /* Durango (Xbox One) */
133+ #if defined(_DURANGO) || defined(_XBOX_ONE)
134+ #define DUK_F_DURANGO
135+ #endif
136+
131137/* Windows, both 32-bit and 64-bit */
132138#if defined(_WIN32) || defined(WIN32) || defined(_WIN64) || defined(WIN64) || \
133139 defined (__WIN32__) || defined(__TOS_WIN__) || defined(__WINDOWS__)
354360#define DUK_F_ANDROID
355361#endif
356362
363+ /* Atari Mint */
364+ #if defined(__MINT__)
365+ #define DUK_F_MINT
366+ #endif
367+
357368/*
358369 * Platform autodetection
359370 */
478489#if !defined(DUK_USE_BYTEORDER) && (defined(DUK_F_M68K) || defined(DUK_F_PPC))
479490#define DUK_USE_BYTEORDER 3
480491#endif
492+ #elif defined(DUK_F_DURANGO)
493+ /* --- Durango (XboxOne) --- */
494+ /* Durango = XboxOne
495+ * Configuration is nearly identical to Windows, except for
496+ * DUK_USE_DATE_TZO_WINDOWS.
497+ */
498+
499+ /* Initial fix: disable secure CRT related warnings when compiling Duktape
500+ * itself (must be defined before including Windows headers). Don't define
501+ * for user code including duktape.h.
502+ */
503+ #if defined(DUK_COMPILING_DUKTAPE) && !defined(_CRT_SECURE_NO_WARNINGS)
504+ #define _CRT_SECURE_NO_WARNINGS
505+ #endif
506+
507+ /* MSVC does not have sys/param.h */
508+ #define DUK_USE_DATE_NOW_WINDOWS
509+ #define DUK_USE_DATE_TZO_WINDOWS_NO_DST
510+ /* Note: PRS and FMT are intentionally left undefined for now. This means
511+ * there is no platform specific date parsing/formatting but there is still
512+ * the ISO 8601 standard format.
513+ */
514+ #if defined(DUK_COMPILING_DUKTAPE)
515+ /* Only include when compiling Duktape to avoid polluting application build
516+ * with a lot of unnecessary defines.
517+ */
518+ #include < windows.h>
519+ #endif
520+
521+ #define DUK_USE_OS_STRING " durango"
522+
523+ #if !defined(DUK_USE_BYTEORDER)
524+ #define DUK_USE_BYTEORDER 1
525+ #endif
481526#elif defined(DUK_F_WINDOWS)
482527/* --- Windows --- */
483528/* Initial fix: disable secure CRT related warnings when compiling Duktape
547592#define DUK_USE_OS_STRING " qnx"
548593#elif defined(DUK_F_TINSPIRE)
549594/* --- TI-Nspire --- */
595+ #if defined(DUK_COMPILING_DUKTAPE) && !defined(_XOPEN_SOURCE)
596+ #define _XOPEN_SOURCE /* e.g. strptime */
597+ #endif
598+
550599#define DUK_USE_DATE_NOW_GETTIMEOFDAY
551600#define DUK_USE_DATE_TZO_GMTIME_R
552601#define DUK_USE_DATE_PRS_STRPTIME
827876/* --- MIPS 32-bit --- */
828877#define DUK_USE_ARCH_STRING " mips32"
829878/* MIPS byte order varies so rely on autodetection. */
830- /* Based on 'make checkalign' there are no alignment requirements on
831- * Linux MIPS except for doubles, which need align by 4. Alignment
832- * requirements vary based on target though.
833- */
834879#if !defined(DUK_USE_ALIGN_BY)
835- #define DUK_USE_ALIGN_BY 4
880+ #define DUK_USE_ALIGN_BY 8
836881#endif
837882#define DUK_USE_PACKED_TVAL
838883#define DUK_F_PACKED_TVAL_PROVIDED
839884#elif defined(DUK_F_MIPS64)
840885/* --- MIPS 64-bit --- */
841886#define DUK_USE_ARCH_STRING " mips64"
842887/* MIPS byte order varies so rely on autodetection. */
843- /* Good default is a bit arbitrary because alignment requirements
844- * depend on target. See https://github.com/svaarala/duktape/issues/102.
845- */
846888#if !defined(DUK_USE_ALIGN_BY)
847889#define DUK_USE_ALIGN_BY 8
848890#endif
9661008#define DUK_ALWAYS_INLINE inline __attribute__ ((always_inline))
9671009#endif
9681010
1011+ /* DUK_HOT */
1012+ /* DUK_COLD */
1013+
9691014#if defined(DUK_F_DLL_BUILD) && defined(DUK_F_WINDOWS)
9701015/* MSVC dllexport/dllimport: appropriate __declspec depends on whether we're
9711016 * compiling Duktape or the application.
10761121#define DUK_ALWAYS_INLINE inline __attribute__ ((always_inline))
10771122#endif
10781123
1124+ #if (defined(DUK_F_C99) || defined(DUK_F_CPP11)) && \
1125+ defined (DUK_F_GCC_VERSION) && (DUK_F_GCC_VERSION >= 40300 )
1126+ #define DUK_HOT __attribute__ ((hot))
1127+ #define DUK_COLD __attribute__ ((cold))
1128+ #endif
1129+
10791130#if defined(DUK_F_DLL_BUILD) && defined(DUK_F_WINDOWS)
10801131/* MSVC dllexport/dllimport: appropriate __declspec depends on whether we're
10811132 * compiling Duktape or the application.
@@ -2272,7 +2323,8 @@ typedef struct duk_hthread duk_context;
22722323 * these functions also exist in MSVC 2013 and later so include a clause for
22732324 * that too. Android doesn't have log2; disable all of these for Android.
22742325 */
2275- #if (defined(DUK_F_C99) || defined(DUK_F_CPP11) || (defined(_MSC_VER) && (_MSC_VER >= 1800))) && !defined(DUK_F_ANDROID)
2326+ #if (defined(DUK_F_C99) || defined(DUK_F_CPP11) || (defined(_MSC_VER) && (_MSC_VER >= 1800))) && \
2327+ !defined (DUK_F_ANDROID) && !defined (DUK_F_MINT)
22762328#if !defined(DUK_CBRT)
22772329#define DUK_CBRT cbrt
22782330#endif
@@ -2498,7 +2550,8 @@ typedef struct duk_hthread duk_context;
24982550/* Macro for suppressing warnings for potentially unreferenced variables.
24992551 * The variables can be actually unreferenced or unreferenced in some
25002552 * specific cases only; for instance, if a variable is only debug printed,
2501- * it is unreferenced when debug printing is disabled.
2553+ * it is unreferenced when debug printing is disabled. May cause warnings
2554+ * for volatile arguments.
25022555 */
25032556#define DUK_UNREF (x ) do { (void ) (x); } while (0 )
25042557#endif
@@ -2540,6 +2593,13 @@ typedef struct duk_hthread duk_context;
25402593#define DUK_ALWAYS_INLINE /* nop*/
25412594#endif
25422595
2596+ #if !defined(DUK_HOT)
2597+ #define DUK_HOT /* nop*/
2598+ #endif
2599+ #if !defined(DUK_COLD)
2600+ #define DUK_COLD /* nop*/
2601+ #endif
2602+
25432603#if !defined(DUK_EXTERNAL_DECL)
25442604#define DUK_EXTERNAL_DECL extern
25452605#endif
@@ -2763,6 +2823,7 @@ typedef struct duk_hthread duk_context;
27632823#define DUK_USE_FAST_REFCOUNT_DEFAULT
27642824#undef DUK_USE_FATAL_HANDLER
27652825#define DUK_USE_FINALIZER_SUPPORT
2826+ #undef DUK_USE_FINALIZER_TORTURE
27662827#undef DUK_USE_FUNCPTR16
27672828#undef DUK_USE_FUNCPTR_DEC16
27682829#undef DUK_USE_FUNCPTR_ENC16
@@ -2771,16 +2832,26 @@ typedef struct duk_hthread duk_context;
27712832#define DUK_USE_FUNC_NAME_PROPERTY
27722833#undef DUK_USE_GC_TORTURE
27732834#undef DUK_USE_GET_RANDOM_DOUBLE
2835+ #undef DUK_USE_GLOBAL_BINDING
27742836#define DUK_USE_GLOBAL_BUILTIN
27752837#undef DUK_USE_HEAPPTR16
27762838#undef DUK_USE_HEAPPTR_DEC16
27772839#undef DUK_USE_HEAPPTR_ENC16
27782840#define DUK_USE_HEX_FASTPATH
2841+ #define DUK_USE_HOBJECT_ARRAY_ABANDON_LIMIT 2
2842+ #define DUK_USE_HOBJECT_ARRAY_FAST_RESIZE_LIMIT 9
2843+ #define DUK_USE_HOBJECT_ARRAY_MINGROW_ADD 16
2844+ #define DUK_USE_HOBJECT_ARRAY_MINGROW_DIVISOR 8
2845+ #define DUK_USE_HOBJECT_ENTRY_MINGROW_ADD 16
2846+ #define DUK_USE_HOBJECT_ENTRY_MINGROW_DIVISOR 8
27792847#define DUK_USE_HOBJECT_HASH_PART
2848+ #define DUK_USE_HOBJECT_HASH_PROP_LIMIT 8
27802849#define DUK_USE_HSTRING_ARRIDX
27812850#define DUK_USE_HSTRING_CLEN
27822851#undef DUK_USE_HSTRING_EXTDATA
2852+ #define DUK_USE_HTML_COMMENTS
27832853#define DUK_USE_IDCHAR_FASTPATH
2854+ #undef DUK_USE_INJECT_HEAP_ALLOC_ERROR
27842855#undef DUK_USE_INTERRUPT_COUNTER
27852856#undef DUK_USE_INTERRUPT_DEBUG_FIXUP
27862857#define DUK_USE_JC
@@ -2796,10 +2867,8 @@ typedef struct duk_hthread duk_context;
27962867#define DUK_USE_JX
27972868#define DUK_USE_LEXER_SLIDING_WINDOW
27982869#undef DUK_USE_LIGHTFUNC_BUILTINS
2799- #undef DUK_USE_MARKANDSWEEP_FINALIZER_TORTURE
28002870#define DUK_USE_MARK_AND_SWEEP_RECLIMIT 256
28012871#define DUK_USE_MATH_BUILTIN
2802- #define DUK_USE_MS_STRINGTABLE_RESIZE
28032872#define DUK_USE_NATIVE_CALL_RECLIMIT 1000
28042873#define DUK_USE_NONSTD_ARRAY_CONCAT_TRAILER
28052874#define DUK_USE_NONSTD_ARRAY_MAP_TRAILER
@@ -2819,9 +2888,9 @@ typedef struct duk_hthread duk_context;
28192888#undef DUK_USE_PREFER_SIZE
28202889#define DUK_USE_PROVIDE_DEFAULT_ALLOC_FUNCTIONS
28212890#undef DUK_USE_REFCOUNT16
2891+ #define DUK_USE_REFCOUNT32
28222892#define DUK_USE_REFERENCE_COUNTING
28232893#define DUK_USE_REFLECT_BUILTIN
2824- #undef DUK_USE_REFZERO_FINALIZER_TORTURE
28252894#undef DUK_USE_REGEXP_CANON_WORKAROUND
28262895#define DUK_USE_REGEXP_COMPILER_RECLIMIT 10000
28272896#define DUK_USE_REGEXP_EXECUTOR_RECLIMIT 10000
@@ -2833,6 +2902,7 @@ typedef struct duk_hthread duk_context;
28332902#undef DUK_USE_ROM_STRINGS
28342903#define DUK_USE_SECTION_B
28352904#undef DUK_USE_SELF_TESTS
2905+ #define DUK_USE_SHEBANG_COMMENTS
28362906#undef DUK_USE_SHUFFLE_TORTURE
28372907#define DUK_USE_SOURCE_NONBMP
28382908#undef DUK_USE_STRHASH16
@@ -2842,9 +2912,13 @@ typedef struct duk_hthread duk_context;
28422912#undef DUK_USE_STRICT_UTF8_SOURCE
28432913#define DUK_USE_STRING_BUILTIN
28442914#undef DUK_USE_STRLEN16
2845- #undef DUK_USE_STRTAB_CHAIN
2846- #undef DUK_USE_STRTAB_CHAIN_SIZE
2847- #define DUK_USE_STRTAB_PROBE
2915+ #define DUK_USE_STRTAB_GROW_LIMIT 17
2916+ #define DUK_USE_STRTAB_MAXSIZE 268435456L
2917+ #define DUK_USE_STRTAB_MINSIZE 1024
2918+ #undef DUK_USE_STRTAB_PTRCOMP
2919+ #define DUK_USE_STRTAB_RESIZE_CHECK_MASK 255
2920+ #define DUK_USE_STRTAB_SHRINK_LIMIT 6
2921+ #undef DUK_USE_STRTAB_TORTURE
28482922#undef DUK_USE_SYMBOL_BUILTIN
28492923#define DUK_USE_TAILCALL
28502924#define DUK_USE_TARGET_INFO " unknown"
@@ -2889,10 +2963,12 @@ typedef struct duk_hthread duk_context;
28892963
28902964#if defined(DUK_USE_DATE_GET_LOCAL_TZOFFSET)
28912965/* External provider already defined. */
2892- #elif defined(DUK_USE_DATE_TZO_GMTIME_R) || defined(DUK_USE_DATE_TZO_GMTIME)
2966+ #elif defined(DUK_USE_DATE_TZO_GMTIME_R) || defined(DUK_USE_DATE_TZO_GMTIME_S) || defined( DUK_USE_DATE_TZO_GMTIME)
28932967#define DUK_USE_DATE_GET_LOCAL_TZOFFSET (d ) duk_bi_date_get_local_tzoffset_gmtime((d))
28942968#elif defined(DUK_USE_DATE_TZO_WINDOWS)
28952969#define DUK_USE_DATE_GET_LOCAL_TZOFFSET (d ) duk_bi_date_get_local_tzoffset_windows((d))
2970+ #elif defined(DUK_USE_DATE_TZO_WINDOWS_NO_DST)
2971+ #define DUK_USE_DATE_GET_LOCAL_TZOFFSET (d ) duk_bi_date_get_local_tzoffset_windows_no_dst((d))
28962972#else
28972973#error no provider for DUK_USE_DATE_GET_LOCAL_TZOFFSET()
28982974#endif
@@ -3374,6 +3450,9 @@ typedef struct duk_hthread duk_context;
33743450#if defined(DUK_USE_INTEGER_ME) && defined(DUK_USE_INTEGER_BE)
33753451#error config option DUK_USE_INTEGER_ME conflicts with option DUK_USE_INTEGER_BE (which is also defined)
33763452#endif
3453+ #if defined(DUK_USE_MARKANDSWEEP_FINALIZER_TORTURE)
3454+ #error unsupported config option used (option has been removed): DUK_USE_MARKANDSWEEP_FINALIZER_TORTURE
3455+ #endif
33773456#if defined(DUK_USE_MARK_AND_SWEEP)
33783457#error unsupported config option used (option has been removed): DUK_USE_MARK_AND_SWEEP
33793458#endif
@@ -3386,6 +3465,9 @@ typedef struct duk_hthread duk_context;
33863465#if defined(DUK_USE_MATH_ROUND)
33873466#error unsupported config option used (option has been removed): DUK_USE_MATH_ROUND
33883467#endif
3468+ #if defined(DUK_USE_MS_STRINGTABLE_RESIZE)
3469+ #error unsupported config option used (option has been removed): DUK_USE_MS_STRINGTABLE_RESIZE
3470+ #endif
33893471#if defined(DUK_USE_NONSTD_REGEXP_DOLLAR_ESCAPE)
33903472#error unsupported config option used (option has been removed): DUK_USE_NONSTD_REGEXP_DOLLAR_ESCAPE
33913473#endif
@@ -3416,6 +3498,9 @@ typedef struct duk_hthread duk_context;
34163498#if defined(DUK_USE_RDTSC)
34173499#error unsupported config option used (option has been removed): DUK_USE_RDTSC
34183500#endif
3501+ #if defined(DUK_USE_REFZERO_FINALIZER_TORTURE)
3502+ #error unsupported config option used (option has been removed): DUK_USE_REFZERO_FINALIZER_TORTURE
3503+ #endif
34193504#if defined(DUK_USE_ROM_GLOBAL_CLONE) && !defined(DUK_USE_ROM_STRINGS)
34203505#error config option DUK_USE_ROM_GLOBAL_CLONE requires option DUK_USE_ROM_STRINGS (which is missing)
34213506#endif
@@ -3446,9 +3531,21 @@ typedef struct duk_hthread duk_context;
34463531#if defined(DUK_USE_SIGSETJMP)
34473532#error unsupported config option used (option has been removed): DUK_USE_SIGSETJMP
34483533#endif
3534+ #if defined(DUK_USE_STRTAB_CHAIN)
3535+ #error unsupported config option used (option has been removed): DUK_USE_STRTAB_CHAIN
3536+ #endif
3537+ #if defined(DUK_USE_STRTAB_CHAIN_SIZE)
3538+ #error unsupported config option used (option has been removed): DUK_USE_STRTAB_CHAIN_SIZE
3539+ #endif
34493540#if defined(DUK_USE_STRTAB_CHAIN_SIZE) && !defined(DUK_USE_STRTAB_CHAIN)
34503541#error config option DUK_USE_STRTAB_CHAIN_SIZE requires option DUK_USE_STRTAB_CHAIN (which is missing)
34513542#endif
3543+ #if defined(DUK_USE_STRTAB_PROBE)
3544+ #error unsupported config option used (option has been removed): DUK_USE_STRTAB_PROBE
3545+ #endif
3546+ #if defined(DUK_USE_STRTAB_PTRCOMP) && !defined(DUK_USE_HEAPPTR16)
3547+ #error config option DUK_USE_STRTAB_PTRCOMP requires option DUK_USE_HEAPPTR16 (which is missing)
3548+ #endif
34523549#if defined(DUK_USE_TAILCALL) && defined(DUK_USE_NONSTD_FUNC_CALLER_PROPERTY)
34533550#error config option DUK_USE_TAILCALL conflicts with option DUK_USE_NONSTD_FUNC_CALLER_PROPERTY (which is also defined)
34543551#endif
0 commit comments