From 736bbbed715d6db1eec2a9947b86787d8f9e680e Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 22 Mar 2017 15:35:19 +0000 Subject: Duktape 2.X: Update to Duktape 2.0.2. Note that DUK_OPT_XXX feature selection has been removed. This means we can't use `DUK_OPT_HAVE_CUSTOM_H`, so we need another way to tell duktape about our custom header. This means assembling our own duktape distribution with a duktape "tools/configure.py" invocation. Instructions for updating duktape have been added to NetSurf's `Docs/` directory. See: https://github.com/svaarala/duktape/blob/master/doc/release-notes-v2-0.rst#duk_opt_xxx-feature-option-support-removed --- content/handlers/javascript/duktape/duk_config.h | 1349 ++++------------------ 1 file changed, 247 insertions(+), 1102 deletions(-) (limited to 'content/handlers/javascript/duktape/duk_config.h') diff --git a/content/handlers/javascript/duktape/duk_config.h b/content/handlers/javascript/duktape/duk_config.h index f9c95ae33..1b31a0b16 100644 --- a/content/handlers/javascript/duktape/duk_config.h +++ b/content/handlers/javascript/duktape/duk_config.h @@ -1,12 +1,13 @@ /* * duk_config.h configuration header generated by genconfig.py. * - * Git commit: 17e3d86cf8b4788bd0d37658f833ab440ce43a1c - * Git describe: v1.6.0 - * Git branch: HEAD + * Git commit: external + * Git describe: external + * Git branch: external * * Supported platforms: * - Mac OSX, iPhone, Darwin + * - Orbis * - OpenBSD * - Generic BSD * - Atari ST TOS @@ -18,6 +19,8 @@ * - Emscripten * - Linux * - Solaris + * - AIX + * - HPUX * - Generic POSIX * - Cygwin * - Generic UNIX @@ -60,20 +63,24 @@ */ /* DLL build detection */ -#if defined(DUK_OPT_DLL_BUILD) -#define DUK_F_DLL_BUILD -#elif defined(DUK_OPT_NO_DLL_BUILD) -#undef DUK_F_DLL_BUILD -#else /* not configured for DLL build */ #undef DUK_F_DLL_BUILD -#endif /* Apple OSX, iOS */ #if defined(__APPLE__) #define DUK_F_APPLE #endif +/* FreeBSD */ +#if defined(__FreeBSD__) || defined(__FreeBSD) +#define DUK_F_FREEBSD +#endif + +/* Orbis (PS4) variant */ +#if defined(DUK_F_FREEBSD) && defined(__ORBIS__) +#define DUK_F_ORBIS +#endif + /* OpenBSD */ #if defined(__OpenBSD__) || defined(__OpenBSD) #define DUK_F_OPENBSD @@ -84,11 +91,6 @@ #define DUK_F_NETBSD #endif -/* FreeBSD */ -#if defined(__FreeBSD__) || defined(__FreeBSD) -#define DUK_F_FREEBSD -#endif - /* BSD variant */ #if defined(DUK_F_FREEBSD) || defined(DUK_F_NETBSD) || defined(DUK_F_OPENBSD) || \ defined(__bsdi__) || defined(__DragonFly__) @@ -170,6 +172,28 @@ /* illumos / Solaris */ #if defined(__sun) && defined(__SVR4) #define DUK_F_SUN +#if defined(__SUNPRO_C) && (__SUNPRO_C < 0x550) +#define DUK_F_OLD_SOLARIS +/* Defines _ILP32 / _LP64 required by DUK_F_X86/DUK_F_X64. Platforms + * are processed before architectures, so this happens before the + * DUK_F_X86/DUK_F_X64 detection is emitted. + */ +#include +#endif +#endif + +/* AIX */ +#if defined(_AIX) +/* defined(__xlc__) || defined(__IBMC__): works but too wide */ +#define DUK_F_AIX +#endif + +/* HPUX */ +#if defined(__hpux) +#define DUK_F_HPUX +#if defined(__ia64) +#define DUK_F_HPUX_ITANIUM +#endif #endif /* POSIX */ @@ -188,17 +212,6 @@ #define DUK_F_UNIX #endif -/* stdint.h not available */ -#if defined(DUK_F_WINDOWS) && defined(_MSC_VER) -#if (_MSC_VER < 1700) -/* VS2012+ has stdint.h, < VS2012 does not (but it's available for download). */ -#define DUK_F_NO_STDINT_H -#endif -#endif -#if !defined(DUK_F_NO_STDINT_H) && (defined(DUK_F_TOS) || defined(DUK_F_BCC)) -#define DUK_F_NO_STDINT_H -#endif - /* C++ */ #undef DUK_F_CPP #if defined(__cplusplus) @@ -208,6 +221,9 @@ /* Intel x86 (32-bit), x64 (64-bit) or x32 (64-bit but 32-bit pointers), * define only one of DUK_F_X86, DUK_F_X64, DUK_F_X32. * https://sites.google.com/site/x32abi/ + * + * With DUK_F_OLD_SOLARIS the header must be included + * before this. */ #if defined(__amd64__) || defined(__amd64) || \ defined(__x86_64__) || defined(__x86_64) || \ @@ -230,9 +246,9 @@ #endif /* ARM */ -#if defined(__arm__) || defined(__thumb__) || defined(_ARM) || defined(_M_ARM) +#if defined(__arm__) || defined(__thumb__) || defined(_ARM) || defined(_M_ARM) || defined(__aarch64__) #define DUK_F_ARM -#if defined(__LP64__) || defined(_LP64) || defined(__arm64) || defined(__arm64__) +#if defined(__LP64__) || defined(_LP64) || defined(__arm64) || defined(__arm64__) || defined(__aarch64__) #define DUK_F_ARM64 #else #define DUK_F_ARM32 @@ -334,9 +350,8 @@ #define DUK_F_VBCC #endif -/* Atari Mint */ -#if defined(__MINT__) -#define DUK_F_MINT +#if defined(ANDROID) || defined(__ANDROID__) +#define DUK_F_ANDROID #endif /* @@ -380,6 +395,20 @@ #define DUK_JMPBUF_TYPE jmp_buf #define DUK_SETJMP(jb) _setjmp((jb)) #define DUK_LONGJMP(jb) _longjmp((jb), 1) +#elif defined(DUK_F_ORBIS) +/* --- Orbis --- */ +/* Orbis = PS4 */ +#define DUK_USE_DATE_NOW_GETTIMEOFDAY +#define DUK_USE_DATE_TZO_GMTIME_S +/* no parsing (not an error) */ +#define DUK_USE_DATE_FMT_STRFTIME +#include +#include +#include +#include +#include + +#define DUK_USE_OS_STRING "orbis" #elif defined(DUK_F_OPENBSD) /* --- OpenBSD --- */ /* http://www.monkey.org/openbsd/archive/ports/0401/msg00089.html */ @@ -436,7 +465,7 @@ #define DUK_USE_DATE_PRS_STRPTIME #define DUK_USE_DATE_FMT_STRFTIME #include -#ifndef UINTPTR_MAX +#if !defined(UINTPTR_MAX) #define UINTPTR_MAX UINT_MAX #endif #else @@ -531,13 +560,13 @@ #elif defined(DUK_F_EMSCRIPTEN) /* --- Emscripten --- */ #if defined(DUK_COMPILING_DUKTAPE) -#ifndef _POSIX_C_SOURCE +#if !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 200809L #endif -#ifndef _GNU_SOURCE +#if !defined(_GNU_SOURCE) #define _GNU_SOURCE /* e.g. getdate_r */ #endif -#ifndef _XOPEN_SOURCE +#if !defined(_XOPEN_SOURCE) #define _XOPEN_SOURCE /* e.g. strptime */ #endif #endif /* DUK_COMPILING_DUKTAPE */ @@ -562,13 +591,13 @@ #elif defined(DUK_F_LINUX) /* --- Linux --- */ #if defined(DUK_COMPILING_DUKTAPE) -#ifndef _POSIX_C_SOURCE +#if !defined(_POSIX_C_SOURCE) #define _POSIX_C_SOURCE 200809L #endif -#ifndef _GNU_SOURCE +#if !defined(_GNU_SOURCE) #define _GNU_SOURCE /* e.g. getdate_r */ #endif -#ifndef _XOPEN_SOURCE +#if !defined(_XOPEN_SOURCE) #define _XOPEN_SOURCE /* e.g. strptime */ #endif #endif /* DUK_COMPILING_DUKTAPE */ @@ -598,12 +627,50 @@ #define DUK_USE_DATE_FMT_STRFTIME #include +#if defined(DUK_F_OLD_SOLARIS) +/* Old Solaris with no endian.h, stdint.h */ +#define DUK_F_NO_STDINT_H +#if !defined(DUK_USE_BYTEORDER) +#define DUK_USE_BYTEORDER 3 +#endif +#else /* DUK_F_OLD_SOLARIS */ #include +#endif /* DUK_F_OLD_SOLARIS */ + #include #include #include #define DUK_USE_OS_STRING "solaris" +#elif defined(DUK_F_AIX) +/* --- AIX --- */ +#if !defined(DUK_USE_BYTEORDER) +#define DUK_USE_BYTEORDER 3 +#endif +#define DUK_USE_DATE_NOW_GETTIMEOFDAY +#define DUK_USE_DATE_TZO_GMTIME_R +#define DUK_USE_DATE_PRS_STRPTIME +#define DUK_USE_DATE_FMT_STRFTIME +#include +#include +#include + +#define DUK_USE_OS_STRING "aix" +#elif defined(DUK_F_HPUX) +/* --- HPUX --- */ +#define DUK_F_NO_STDINT_H +#if !defined(DUK_USE_BYTEORDER) +#define DUK_USE_BYTEORDER 3 +#endif +#define DUK_USE_DATE_NOW_GETTIMEOFDAY +#define DUK_USE_DATE_TZO_GMTIME_R +#define DUK_USE_DATE_PRS_STRPTIME +#define DUK_USE_DATE_FMT_STRFTIME +#include +#include +#include + +#define DUK_USE_OS_STRING "hpux" #elif defined(DUK_F_POSIX) /* --- Generic POSIX --- */ #define DUK_USE_DATE_NOW_GETTIMEOFDAY @@ -887,6 +954,11 @@ #define DUK_USE_BRANCH_HINTS #define DUK_LIKELY(x) __builtin_expect((x), 1) #define DUK_UNLIKELY(x) __builtin_expect((x), 0) +#if defined(__clang__) && defined(__has_builtin) +#if __has_builtin(__builtin_unpredictable) +#define DUK_UNPREDICTABLE(x) __builtin_unpredictable((x)) +#endif +#endif #if defined(DUK_F_C99) || defined(DUK_F_CPP11) #define DUK_NOINLINE __attribute__((noinline)) @@ -995,6 +1067,7 @@ #define DUK_LIKELY(x) __builtin_expect((x), 1) #define DUK_UNLIKELY(x) __builtin_expect((x), 0) #endif +/* XXX: equivalent of clang __builtin_unpredictable? */ #if (defined(DUK_F_C99) || defined(DUK_F_CPP11)) && \ defined(DUK_F_GCC_VERSION) && (DUK_F_GCC_VERSION >= 30101) @@ -1181,6 +1254,9 @@ #define DUK_SNPRINTF _snprintf #define DUK_VSNPRINTF _vsnprintf #endif + +/* Avoid warning when doing DUK_UNREF(some_function). */ +#define DUK_UNREF(x) do { __pragma(warning(suppress:4100 4101 4550 4551)) (x); } while (0) #elif defined(DUK_F_EMSCRIPTEN) /* --- Emscripten --- */ #define DUK_NORETURN(decl) decl __attribute__((noreturn)) @@ -1194,6 +1270,11 @@ #define DUK_USE_BRANCH_HINTS #define DUK_LIKELY(x) __builtin_expect((x), 1) #define DUK_UNLIKELY(x) __builtin_expect((x), 0) +#if defined(__clang__) && defined(__has_builtin) +#if __has_builtin(__builtin_unpredictable) +#define DUK_UNPREDICTABLE(x) __builtin_unpredictable((x)) +#endif +#endif #if defined(DUK_F_C99) || defined(DUK_F_CPP11) #define DUK_NOINLINE __attribute__((noinline)) @@ -1401,10 +1482,14 @@ #if defined(DUK_F_X86) || defined(DUK_F_X32) || \ defined(DUK_F_M68K) || defined(DUK_F_PPC32) || \ defined(DUK_F_BCC) || \ - (defined(__WORDSIZE) && (__WORDSIZE == 32)) + (defined(__WORDSIZE) && (__WORDSIZE == 32)) || \ + ((defined(DUK_F_OLD_SOLARIS) || defined(DUK_F_AIX) || \ + defined(DUK_F_HPUX)) && defined(_ILP32)) #define DUK_F_32BIT_PTRS #elif defined(DUK_F_X64) || \ - (defined(__WORDSIZE) && (__WORDSIZE == 64)) + (defined(__WORDSIZE) && (__WORDSIZE == 64)) || \ + ((defined(DUK_F_OLD_SOLARIS) || defined(DUK_F_AIX) || \ + defined(DUK_F_HPUX)) && defined(_LP64)) #define DUK_F_64BIT_PTRS #else /* not sure, not needed with C99 anyway */ @@ -1912,6 +1997,11 @@ typedef struct duk_hthread duk_context; * Fill-ins for platform, architecture, and compiler */ +/* An abort()-like primitive is needed by the default fatal error handler. */ +#if !defined(DUK_ABORT) +#define DUK_ABORT abort +#endif + #if !defined(DUK_SETJMP) #define DUK_JMPBUF_TYPE jmp_buf #define DUK_SETJMP(jb) setjmp((jb)) @@ -1925,17 +2015,6 @@ typedef struct duk_hthread duk_context; #define DUK_LONGJMP(jb) siglongjmp((jb), 1) #endif -typedef FILE duk_file; -#if !defined(DUK_STDIN) -#define DUK_STDIN stdin -#endif -#if !defined(DUK_STDOUT) -#define DUK_STDOUT stdout -#endif -#if !defined(DUK_STDERR) -#define DUK_STDERR stderr -#endif - /* Special naming to avoid conflict with e.g. DUK_FREE() in duk_heap.h * (which is unfortunately named). May sometimes need replacement, e.g. * some compilers don't handle zero length or NULL correctly in realloc(). @@ -2002,12 +2081,6 @@ typedef FILE duk_file; #if !defined(DUK_STRNCMP) #define DUK_STRNCMP strncmp #endif -#if !defined(DUK_PRINTF) -#define DUK_PRINTF printf -#endif -#if !defined(DUK_FPRINTF) -#define DUK_FPRINTF fprintf -#endif #if !defined(DUK_SPRINTF) #define DUK_SPRINTF sprintf #endif @@ -2028,46 +2101,9 @@ typedef FILE duk_file; #if !defined(DUK_VSSCANF) #define DUK_VSSCANF vsscanf #endif -#if !defined(DUK_FOPEN) -#define DUK_FOPEN fopen -#endif -#if !defined(DUK_FCLOSE) -#define DUK_FCLOSE fclose -#endif -#if !defined(DUK_FREAD) -#define DUK_FREAD fread -#endif -#if !defined(DUK_FWRITE) -#define DUK_FWRITE fwrite -#endif -#if !defined(DUK_FSEEK) -#define DUK_FSEEK fseek -#endif -#if !defined(DUK_FTELL) -#define DUK_FTELL ftell -#endif -#if !defined(DUK_FFLUSH) -#define DUK_FFLUSH fflush -#endif -#if !defined(DUK_FPUTC) -#define DUK_FPUTC fputc -#endif #if !defined(DUK_MEMZERO) #define DUK_MEMZERO(p,n) DUK_MEMSET((p), 0, (n)) #endif -#if !defined(DUK_ABORT) -#define DUK_ABORT abort -#endif -#if !defined(DUK_EXIT) -#define DUK_EXIT exit -#endif - -#if !defined(DUK_DOUBLE_2TO32) -#define DUK_DOUBLE_2TO32 4294967296.0 -#endif -#if !defined(DUK_DOUBLE_2TO31) -#define DUK_DOUBLE_2TO31 2147483648.0 -#endif #if !defined(DUK_DOUBLE_INFINITY) #undef DUK_USE_COMPUTED_INFINITY @@ -2076,7 +2112,8 @@ typedef FILE duk_file; #define DUK_DOUBLE_INFINITY (__builtin_inf()) #elif defined(INFINITY) #define DUK_DOUBLE_INFINITY ((double) INFINITY) -#elif !defined(DUK_F_VBCC) && !defined(DUK_F_MSVC) && !defined(DUK_F_BCC) +#elif !defined(DUK_F_VBCC) && !defined(DUK_F_MSVC) && !defined(DUK_F_BCC) && \ + !defined(DUK_F_OLD_SOLARIS) && !defined(DUK_F_AIX) #define DUK_DOUBLE_INFINITY (1.0 / 0.0) #else /* In VBCC (1.0 / 0.0) results in a warning and 0.0 instead of infinity. @@ -2092,7 +2129,8 @@ typedef FILE duk_file; #undef DUK_USE_COMPUTED_NAN #if defined(NAN) #define DUK_DOUBLE_NAN NAN -#elif !defined(DUK_F_VBCC) && !defined(DUK_F_MSVC) && !defined(DUK_F_BCC) +#elif !defined(DUK_F_VBCC) && !defined(DUK_F_MSVC) && !defined(DUK_F_BCC) && \ + !defined(DUK_F_OLD_SOLARIS) && !defined(DUK_F_AIX) #define DUK_DOUBLE_NAN (0.0 / 0.0) #else /* In VBCC (0.0 / 0.0) results in a warning and 0.0 instead of NaN. @@ -2141,6 +2179,9 @@ typedef FILE duk_file; * To be safe, use replacements. */ #define DUK_F_USE_REPL_ALL +#elif defined(DUK_F_AIX) +/* Older versions may be missing isnan(), etc. */ +#define DUK_F_USE_REPL_ALL #endif #if defined(DUK_F_USE_REPL_ALL) @@ -2176,29 +2217,6 @@ typedef FILE duk_file; #undef DUK_F_USE_REPL_ALL #endif -/* Some math functions are C99 only. This is also an issue with some - * embedded environments using uclibc where uclibc has been configured - * not to provide some functions. For now, use replacements whenever - * using uclibc. - */ -#undef DUK_USE_MATH_FMIN -#undef DUK_USE_MATH_FMAX -#undef DUK_USE_MATH_ROUND -#if defined(DUK_F_UCLIBC) -/* 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 -/* C99 or C++11, no known issues */ -#define DUK_USE_MATH_FMIN -#define DUK_USE_MATH_FMAX -#define DUK_USE_MATH_ROUND -#endif - /* These functions don't currently need replacement but are wrapped for * completeness. Because these are used as function pointers, they need * to be defined as concrete C functions (not macros). @@ -2206,12 +2224,6 @@ typedef FILE duk_file; #if !defined(DUK_FABS) #define DUK_FABS fabs #endif -#if !defined(DUK_FMIN) -#define DUK_FMIN fmin -#endif -#if !defined(DUK_FMAX) -#define DUK_FMAX fmax -#endif #if !defined(DUK_FLOOR) #define DUK_FLOOR floor #endif @@ -2255,13 +2267,42 @@ typedef FILE duk_file; #define DUK_SQRT sqrt #endif +/* The functions below exist only in C99/C++11 or later and need a workaround + * for platforms that don't include them. MSVC isn't detected as C99, but + * these functions also exist in MSVC 2013 and later so include a clause for + * that too. Android doesn't have log2; disable all of these for Android. + */ +#if (defined(DUK_F_C99) || defined(DUK_F_CPP11) || (defined(_MSC_VER) && (_MSC_VER >= 1800))) && !defined(DUK_F_ANDROID) +#if !defined(DUK_CBRT) +#define DUK_CBRT cbrt +#endif +#if !defined(DUK_LOG2) +#define DUK_LOG2 log2 +#endif +#if !defined(DUK_LOG10) +#define DUK_LOG10 log10 +#endif +#if !defined(DUK_TRUNC) +#define DUK_TRUNC trunc +#endif +#endif /* DUK_F_C99 etc */ + /* NetBSD 6.0 x86 (at least) has a few problems with pow() semantics, - * see test-bug-netbsd-math-pow.js. Use NetBSD specific workaround. - * (This might be a wider problem; if so, generalize the define name.) + * see test-bug-netbsd-math-pow.js. MinGW has similar (but different) + * issues, see test-bug-mingw-math-issues.js. Enable pow() workarounds + * for these targets. + */ +#undef DUK_USE_POW_WORKAROUNDS +#if defined(DUK_F_NETBSD) || defined(DUK_F_MINGW) +#define DUK_USE_POW_WORKAROUNDS +#endif + +/* Similar workarounds for atan2() semantics issues. MinGW issues are + * documented in test-bug-mingw-math-issues.js. */ -#undef DUK_USE_POW_NETBSD_WORKAROUND -#if defined(DUK_F_NETBSD) -#define DUK_USE_POW_NETBSD_WORKAROUND +#undef DUK_USE_ATAN2_WORKAROUNDS +#if defined(DUK_F_MINGW) +#define DUK_USE_ATAN2_WORKAROUNDS #endif /* Rely as little as possible on compiler behavior for NaN comparison, @@ -2304,25 +2345,6 @@ typedef FILE duk_file; * byte order for doubles is referred to as "mixed endian". */ -/* For custom platforms allow user to define byteorder explicitly. - * Since endianness headers are not standardized, this is a useful - * workaround for custom platforms for which endianness detection - * is not directly supported. Perhaps custom hardware is used and - * user cannot submit upstream patches. - */ -#if defined(DUK_OPT_FORCE_BYTEORDER) -#undef DUK_USE_BYTEORDER -#if (DUK_OPT_FORCE_BYTEORDER == 1) -#define DUK_USE_BYTEORDER 1 -#elif (DUK_OPT_FORCE_BYTEORDER == 2) -#define DUK_USE_BYTEORDER 2 -#elif (DUK_OPT_FORCE_BYTEORDER == 3) -#define DUK_USE_BYTEORDER 3 -#else -#error invalid DUK_OPT_FORCE_BYTEORDER value -#endif -#endif /* DUK_OPT_FORCE_BYTEORDER */ - /* GCC and Clang provide endianness defines as built-in predefines, with * leading and trailing double underscores (e.g. __BYTE_ORDER__). See * output of "make gccpredefs" and "make clangpredefs". Clang doesn't @@ -2425,18 +2447,6 @@ typedef FILE duk_file; #define DUK_USE_ALIGN_BY 8 #endif -/* User forced alignment to 4 or 8. */ -#if defined(DUK_OPT_FORCE_ALIGN) -#undef DUK_USE_ALIGN_BY -#if (DUK_OPT_FORCE_ALIGN == 4) -#define DUK_USE_ALIGN_BY 4 -#elif (DUK_OPT_FORCE_ALIGN == 8) -#define DUK_USE_ALIGN_BY 8 -#else -#error invalid DUK_OPT_FORCE_ALIGN value -#endif -#endif - /* Compiler specific hackery needed to force struct size to match aligment, * see e.g. duk_hbuffer.h. * @@ -2479,9 +2489,8 @@ typedef FILE duk_file; #endif #if !defined(DUK_CAUSE_SEGFAULT) -/* This is optionally used by panic handling to cause the program to segfault - * (instead of e.g. abort()) on panic. Valgrind will then indicate the C - * call stack leading to the panic. +/* This can be used for testing; valgrind will then indicate the C call stack + * leading to the call site. */ #define DUK_CAUSE_SEGFAULT() do { *((volatile duk_uint32_t *) NULL) = (duk_uint32_t) 0xdeadbeefUL; } while (0) #endif @@ -2517,6 +2526,9 @@ typedef FILE duk_file; #if !defined(DUK_UNLIKELY) #define DUK_UNLIKELY(x) (x) #endif +#if !defined(DUK_UNPREDICTABLE) +#define DUK_UNPREDICTABLE(x) (x) +#endif #if !defined(DUK_NOINLINE) #define DUK_NOINLINE /*nop*/ @@ -2656,14 +2668,6 @@ typedef FILE duk_file; #undef DUK_F_PACKED_TVAL_POSSIBLE #endif /* DUK_F_PACKED_TVAL_PROVIDED */ - -/* Feature option forcing. */ -#if defined(DUK_OPT_NO_PACKED_TVAL) -#undef DUK_USE_PACKED_TVAL -#elif defined(DUK_OPT_PACKED_TVAL) -#undef DUK_USE_PACKED_TVAL -#define DUK_USE_PACKED_TVAL -#endif /* Object property allocation layout has implications for memory and code * footprint and generated code size/speed. The best layout also depends * on whether the platform has alignment requirements or benefits from @@ -2694,852 +2698,170 @@ typedef FILE duk_file; #endif /* - * Feature option handling + * Autogenerated defaults */ -#if !defined(DUK_USE_ALIGN_BY) -#if defined(DUK_OPT_FORCE_ALIGN) -#define DUK_USE_ALIGN_BY DUK_OPT_FORCE_ALIGN -#else -#define DUK_USE_ALIGN_BY 8 -#endif -#endif - -#if defined(DUK_OPT_ASSERTIONS) -#define DUK_USE_ASSERTIONS -#elif defined(DUK_OPT_NO_ASSERTIONS) -#undef DUK_USE_ASSERTIONS -#else +#define DUK_USE_ARRAY_BUILTIN +#define DUK_USE_ARRAY_FASTPATH +#define DUK_USE_ARRAY_PROP_FASTPATH #undef DUK_USE_ASSERTIONS -#endif - -#if defined(DUK_OPT_AUGMENT_ERRORS) -#define DUK_USE_AUGMENT_ERROR_CREATE -#elif defined(DUK_OPT_NO_AUGMENT_ERRORS) -#undef DUK_USE_AUGMENT_ERROR_CREATE -#else #define DUK_USE_AUGMENT_ERROR_CREATE -#endif - -#if defined(DUK_OPT_AUGMENT_ERRORS) -#define DUK_USE_AUGMENT_ERROR_THROW -#elif defined(DUK_OPT_NO_AUGMENT_ERRORS) -#undef DUK_USE_AUGMENT_ERROR_THROW -#else #define DUK_USE_AUGMENT_ERROR_THROW -#endif - -#if defined(DUK_OPT_BROWSER_LIKE) -#define DUK_USE_BROWSER_LIKE -#elif defined(DUK_OPT_NO_BROWSER_LIKE) -#undef DUK_USE_BROWSER_LIKE -#else -#define DUK_USE_BROWSER_LIKE -#endif - -#if defined(DUK_OPT_BUFFEROBJECT_SUPPORT) -#define DUK_USE_BUFFEROBJECT_SUPPORT -#elif defined(DUK_OPT_NO_BUFFEROBJECT_SUPPORT) -#undef DUK_USE_BUFFEROBJECT_SUPPORT -#else +#define DUK_USE_AVOID_PLATFORM_FUNCPTRS +#define DUK_USE_BASE64_FASTPATH +#define DUK_USE_BOOLEAN_BUILTIN #define DUK_USE_BUFFEROBJECT_SUPPORT -#endif - -#if defined(DUK_OPT_BUFLEN16) -#define DUK_USE_BUFLEN16 -#elif defined(DUK_OPT_NO_BUFLEN16) -#undef DUK_USE_BUFLEN16 -#else #undef DUK_USE_BUFLEN16 -#endif - -#if defined(DUK_OPT_BYTECODE_DUMP_SUPPORT) -#define DUK_USE_BYTECODE_DUMP_SUPPORT -#elif defined(DUK_OPT_NO_BYTECODE_DUMP_SUPPORT) -#undef DUK_USE_BYTECODE_DUMP_SUPPORT -#else #define DUK_USE_BYTECODE_DUMP_SUPPORT -#endif - -#if defined(DUK_OPT_COMMONJS_MODULES) -#define DUK_USE_COMMONJS_MODULES -#elif defined(DUK_OPT_NO_COMMONJS_MODULES) -#undef DUK_USE_COMMONJS_MODULES -#else #define DUK_USE_COMMONJS_MODULES -#endif - -#if defined(DUK_OPT_CPP_EXCEPTIONS) -#define DUK_USE_CPP_EXCEPTIONS -#elif defined(DUK_OPT_NO_CPP_EXCEPTIONS) -#undef DUK_USE_CPP_EXCEPTIONS -#else +#define DUK_USE_COMPILER_RECLIMIT 2500 +#define DUK_USE_COROUTINE_SUPPORT #undef DUK_USE_CPP_EXCEPTIONS -#endif - -#if defined(DUK_OPT_DATAPTR16) -#define DUK_USE_DATAPTR16 -#elif defined(DUK_OPT_NO_DATAPTR16) -#undef DUK_USE_DATAPTR16 -#else #undef DUK_USE_DATAPTR16 -#endif - -#if defined(DUK_OPT_DATAPTR_DEC16) -#define DUK_USE_DATAPTR_DEC16(udata,ptr) DUK_OPT_DATAPTR_DEC16((udata),(ptr)) -#else #undef DUK_USE_DATAPTR_DEC16 -#endif - -#if defined(DUK_OPT_DATAPTR_ENC16) -#define DUK_USE_DATAPTR_ENC16(udata,ptr) DUK_OPT_DATAPTR_ENC16((udata),(ptr)) -#else #undef DUK_USE_DATAPTR_ENC16 -#endif - -#if defined(DUK_OPT_DDDPRINT) -#define DUK_USE_DDDPRINT -#elif defined(DUK_OPT_NO_DDDPRINT) -#undef DUK_USE_DDDPRINT -#else -#undef DUK_USE_DDDPRINT -#endif - -#if defined(DUK_OPT_DDPRINT) -#define DUK_USE_DDPRINT -#elif defined(DUK_OPT_NO_DDPRINT) -#undef DUK_USE_DDPRINT -#else -#undef DUK_USE_DDPRINT -#endif - -#if defined(DUK_OPT_DEBUG) -#define DUK_USE_DEBUG -#elif defined(DUK_OPT_NO_DEBUG) -#undef DUK_USE_DEBUG -#else +#define DUK_USE_DATE_BUILTIN +#undef DUK_USE_DATE_FORMAT_STRING +#undef DUK_USE_DATE_GET_LOCAL_TZOFFSET +#undef DUK_USE_DATE_GET_NOW +#undef DUK_USE_DATE_PARSE_STRING +#undef DUK_USE_DATE_PRS_GETDATE #undef DUK_USE_DEBUG -#endif - -#if defined(DUK_OPT_DEBUGGER_DUMPHEAP) -#define DUK_USE_DEBUGGER_DUMPHEAP -#elif defined(DUK_OPT_NO_DEBUGGER_DUMPHEAP) #undef DUK_USE_DEBUGGER_DUMPHEAP -#else -#undef DUK_USE_DEBUGGER_DUMPHEAP -#endif - -#if defined(DUK_OPT_DEBUGGER_FWD_LOGGING) -#define DUK_USE_DEBUGGER_FWD_LOGGING -#elif defined(DUK_OPT_NO_DEBUGGER_FWD_LOGGING) -#undef DUK_USE_DEBUGGER_FWD_LOGGING -#else -#undef DUK_USE_DEBUGGER_FWD_LOGGING -#endif - -#if defined(DUK_OPT_DEBUGGER_FWD_PRINTALERT) -#define DUK_USE_DEBUGGER_FWD_PRINTALERT -#elif defined(DUK_OPT_NO_DEBUGGER_FWD_PRINTALERT) -#undef DUK_USE_DEBUGGER_FWD_PRINTALERT -#else -#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) -#undef DUK_USE_DEBUGGER_PAUSE_UNCAUGHT -#else #undef DUK_USE_DEBUGGER_PAUSE_UNCAUGHT -#endif - -#if defined(DUK_OPT_DEBUGGER_SUPPORT) -#define DUK_USE_DEBUGGER_SUPPORT -#elif defined(DUK_OPT_NO_DEBUGGER_SUPPORT) -#undef DUK_USE_DEBUGGER_SUPPORT -#else #undef DUK_USE_DEBUGGER_SUPPORT -#endif - -#if defined(DUK_OPT_DEBUGGER_THROW_NOTIFY) -#define DUK_USE_DEBUGGER_THROW_NOTIFY -#elif defined(DUK_OPT_NO_DEBUGGER_THROW_NOTIFY) -#undef DUK_USE_DEBUGGER_THROW_NOTIFY -#else #define DUK_USE_DEBUGGER_THROW_NOTIFY -#endif - -#if defined(DUK_OPT_DEBUGGER_TRANSPORT_TORTURE) -#define DUK_USE_DEBUGGER_TRANSPORT_TORTURE -#elif defined(DUK_OPT_NO_DEBUGGER_TRANSPORT_TORTURE) -#undef DUK_USE_DEBUGGER_TRANSPORT_TORTURE -#else #undef DUK_USE_DEBUGGER_TRANSPORT_TORTURE -#endif - -#if defined(DUK_OPT_DEBUG_BUFSIZE) -#define DUK_USE_DEBUG_BUFSIZE DUK_OPT_DEBUG_BUFSIZE -#else #define DUK_USE_DEBUG_BUFSIZE 65536L -#endif - -#if defined(DUK_OPT_REFERENCE_COUNTING) -#define DUK_USE_DOUBLE_LINKED_HEAP -#elif defined(DUK_OPT_NO_REFERENCE_COUNTING) -#undef DUK_USE_DOUBLE_LINKED_HEAP -#else +#define DUK_USE_DEBUG_LEVEL 0 +#undef DUK_USE_DEBUG_WRITE #define DUK_USE_DOUBLE_LINKED_HEAP -#endif - -#if defined(DUK_OPT_DPRINT) -#define DUK_USE_DPRINT -#elif defined(DUK_OPT_NO_DPRINT) -#undef DUK_USE_DPRINT -#else -#undef DUK_USE_DPRINT -#endif - -#if defined(DUK_OPT_DPRINT_COLORS) -#define DUK_USE_DPRINT_COLORS -#elif defined(DUK_OPT_NO_DPRINT_COLORS) -#undef DUK_USE_DPRINT_COLORS -#else -#undef DUK_USE_DPRINT_COLORS -#endif - -#if defined(DUK_OPT_DPRINT_RDTSC) -#define DUK_USE_DPRINT_RDTSC -#elif defined(DUK_OPT_NO_DPRINT_RDTSC) -#undef DUK_USE_DPRINT_RDTSC -#else -#undef DUK_USE_DPRINT_RDTSC -#endif - -#if defined(DUK_OPT_AUGMENT_ERRORS) -#define DUK_USE_ERRCREATE -#elif defined(DUK_OPT_NO_AUGMENT_ERRORS) -#undef DUK_USE_ERRCREATE -#else +#define DUK_USE_DUKTAPE_BUILTIN +#define DUK_USE_ENCODING_BUILTINS #define DUK_USE_ERRCREATE -#endif - -#if defined(DUK_OPT_AUGMENT_ERRORS) -#define DUK_USE_ERRTHROW -#elif defined(DUK_OPT_NO_AUGMENT_ERRORS) -#undef DUK_USE_ERRTHROW -#else #define DUK_USE_ERRTHROW -#endif - -#if defined(DUK_OPT_ES6_OBJECT_PROTO_PROPERTY) -#define DUK_USE_ES6_OBJECT_PROTO_PROPERTY -#elif defined(DUK_OPT_NO_ES6_OBJECT_PROTO_PROPERTY) -#undef DUK_USE_ES6_OBJECT_PROTO_PROPERTY -#else +#define DUK_USE_ES6 #define DUK_USE_ES6_OBJECT_PROTO_PROPERTY -#endif - -#if defined(DUK_OPT_ES6_OBJECT_SETPROTOTYPEOF) #define DUK_USE_ES6_OBJECT_SETPROTOTYPEOF -#elif defined(DUK_OPT_NO_ES6_OBJECT_SETPROTOTYPEOF) -#undef DUK_USE_ES6_OBJECT_SETPROTOTYPEOF -#else -#define DUK_USE_ES6_OBJECT_SETPROTOTYPEOF -#endif - -#if defined(DUK_OPT_ES6_PROXY) #define DUK_USE_ES6_PROXY -#elif defined(DUK_OPT_NO_ES6_PROXY) -#undef DUK_USE_ES6_PROXY -#else -#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 - +#define DUK_USE_ES6_REGEXP_SYNTAX +#define DUK_USE_ES6_UNICODE_ESCAPE +#define DUK_USE_ES7_EXP_OPERATOR +#define DUK_USE_ESBC_LIMITS +#define DUK_USE_ESBC_MAX_BYTES 2147418112L +#define DUK_USE_ESBC_MAX_LINENUMBER 2147418112L +#undef DUK_USE_EXEC_FUN_LOCAL #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. */ -#define DUK_USE_EXEC_INDIRECT_BOUND_CHECK -#endif - +#undef DUK_USE_EXEC_PREFER_SIZE +#define DUK_USE_EXEC_REGCONST_OPTIMIZE #undef DUK_USE_EXEC_TIMEOUT_CHECK -#if defined(DUK_OPT_EXEC_TIMEOUT_CHECK) -#define DUK_USE_EXEC_TIMEOUT_CHECK(udata) DUK_OPT_EXEC_TIMEOUT_CHECK((udata)) -#endif - +#undef DUK_USE_EXPLICIT_NULL_INIT #undef DUK_USE_EXTSTR_FREE -#if defined(DUK_OPT_EXTERNAL_STRINGS) && defined(DUK_OPT_EXTSTR_FREE) -#define DUK_USE_EXTSTR_FREE(udata,ptr) DUK_OPT_EXTSTR_FREE((udata), (ptr)) -#endif - #undef DUK_USE_EXTSTR_INTERN_CHECK -#if defined(DUK_OPT_EXTERNAL_STRINGS) && defined(DUK_OPT_EXTSTR_INTERN_CHECK) -#define DUK_USE_EXTSTR_INTERN_CHECK(udata,ptr,len) DUK_OPT_EXTSTR_INTERN_CHECK((udata), (ptr), (len)) -#endif - -/* Support for 48-bit signed integer duk_tval with transparent semantics. */ #undef DUK_USE_FASTINT -#if defined(DUK_OPT_FASTINT) -#if !defined(DUK_F_HAVE_64BIT) -#error DUK_OPT_FASTINT requires 64-bit integer type support at the moment -#endif -#define DUK_USE_FASTINT -#endif - -#if defined(DUK_OPT_FILE_IO) -#define DUK_USE_FILE_IO -#elif defined(DUK_OPT_NO_FILE_IO) -#undef DUK_USE_FILE_IO -#else -#define DUK_USE_FILE_IO -#endif - -#if defined(DUK_OPT_FUNCPTR16) -#define DUK_USE_FUNCPTR16 -#elif defined(DUK_OPT_NO_FUNCPTR16) -#undef DUK_USE_FUNCPTR16 -#else +#define DUK_USE_FAST_REFCOUNT_DEFAULT +#undef DUK_USE_FATAL_HANDLER +#define DUK_USE_FINALIZER_SUPPORT #undef DUK_USE_FUNCPTR16 -#endif - -#if defined(DUK_OPT_FUNCPTR_DEC16) -#define DUK_USE_FUNCPTR_DEC16(udata,ptr) DUK_OPT_FUNCPTR_DEC16((udata),(ptr)) -#else #undef DUK_USE_FUNCPTR_DEC16 -#endif - -#if defined(DUK_OPT_FUNCPTR_ENC16) -#define DUK_USE_FUNCPTR_ENC16(udata,ptr) DUK_OPT_FUNCPTR_ENC16((udata),(ptr)) -#else #undef DUK_USE_FUNCPTR_ENC16 -#endif - -#if defined(DUK_OPT_GC_TORTURE) -#define DUK_USE_GC_TORTURE -#elif defined(DUK_OPT_NO_GC_TORTURE) -#undef DUK_USE_GC_TORTURE -#else +#define DUK_USE_FUNCTION_BUILTIN +#define DUK_USE_FUNC_FILENAME_PROPERTY +#define DUK_USE_FUNC_NAME_PROPERTY #undef DUK_USE_GC_TORTURE -#endif - -#if defined(DUK_OPT_HEAPPTR16) -#define DUK_USE_HEAPPTR16 -#elif defined(DUK_OPT_NO_HEAPPTR16) -#undef DUK_USE_HEAPPTR16 -#else +#undef DUK_USE_GET_RANDOM_DOUBLE +#define DUK_USE_GLOBAL_BUILTIN #undef DUK_USE_HEAPPTR16 -#endif - -#if defined(DUK_OPT_HEAPPTR_DEC16) -#define DUK_USE_HEAPPTR_DEC16(udata,ptr) DUK_OPT_HEAPPTR_DEC16((udata),(ptr)) -#else #undef DUK_USE_HEAPPTR_DEC16 -#endif - -#if defined(DUK_OPT_HEAPPTR_ENC16) -#define DUK_USE_HEAPPTR_ENC16(udata,ptr) DUK_OPT_HEAPPTR_ENC16((udata),(ptr)) -#else #undef DUK_USE_HEAPPTR_ENC16 -#endif - -/* For now, hash part is dropped if and only if 16-bit object fields are used. */ +#define DUK_USE_HEX_FASTPATH #define DUK_USE_HOBJECT_HASH_PART -#if defined(DUK_OPT_OBJSIZES16) -#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_ARRIDX #define DUK_USE_HSTRING_CLEN -#endif - -#if defined(DUK_OPT_EXTERNAL_STRINGS) -#define DUK_USE_HSTRING_EXTDATA -#elif defined(DUK_OPT_NO_EXTERNAL_STRINGS) #undef DUK_USE_HSTRING_EXTDATA -#else -#undef DUK_USE_HSTRING_EXTDATA -#endif - -#if defined(DUK_OPT_INTERRUPT_COUNTER) -#define DUK_USE_INTERRUPT_COUNTER -#elif defined(DUK_OPT_NO_INTERRUPT_COUNTER) -#undef DUK_USE_INTERRUPT_COUNTER -#else +#define DUK_USE_IDCHAR_FASTPATH #undef DUK_USE_INTERRUPT_COUNTER -#endif - -#if defined(DUK_OPT_JC) -#define DUK_USE_JC -#elif defined(DUK_OPT_NO_JC) -#undef DUK_USE_JC -#else +#undef DUK_USE_INTERRUPT_DEBUG_FIXUP #define DUK_USE_JC -#endif - -#if defined(DUK_OPT_JSON_STRINGIFY_FASTPATH) -#define DUK_USE_JSON_STRINGIFY_FASTPATH -#elif defined(DUK_OPT_NO_JSON_STRINGIFY_FASTPATH) -#undef DUK_USE_JSON_STRINGIFY_FASTPATH -#else +#define DUK_USE_JSON_BUILTIN +#define DUK_USE_JSON_DECNUMBER_FASTPATH +#define DUK_USE_JSON_DECSTRING_FASTPATH +#define DUK_USE_JSON_DEC_RECLIMIT 1000 +#define DUK_USE_JSON_EATWHITE_FASTPATH +#define DUK_USE_JSON_ENC_RECLIMIT 1000 +#define DUK_USE_JSON_QUOTESTRING_FASTPATH #undef DUK_USE_JSON_STRINGIFY_FASTPATH -#endif - -#if defined(DUK_OPT_JX) -#define DUK_USE_JX -#elif defined(DUK_OPT_NO_JX) -#undef DUK_USE_JX -#else +#define DUK_USE_JSON_SUPPORT #define DUK_USE_JX -#endif - -#if defined(DUK_OPT_LIGHTFUNC_BUILTINS) -#define DUK_USE_LIGHTFUNC_BUILTINS -#elif defined(DUK_OPT_NO_LIGHTFUNC_BUILTINS) -#undef DUK_USE_LIGHTFUNC_BUILTINS -#else +#define DUK_USE_LEXER_SLIDING_WINDOW #undef DUK_USE_LIGHTFUNC_BUILTINS -#endif - -#if defined(DUK_OPT_MARK_AND_SWEEP) -#define DUK_USE_MARK_AND_SWEEP -#elif defined(DUK_OPT_NO_MARK_AND_SWEEP) -#undef DUK_USE_MARK_AND_SWEEP -#else -#define DUK_USE_MARK_AND_SWEEP -#endif - -#if defined(DUK_OPT_MS_STRINGTABLE_RESIZE) -#define DUK_USE_MS_STRINGTABLE_RESIZE -#elif defined(DUK_OPT_NO_MS_STRINGTABLE_RESIZE) -#undef DUK_USE_MS_STRINGTABLE_RESIZE -#else +#undef DUK_USE_MARKANDSWEEP_FINALIZER_TORTURE +#define DUK_USE_MARK_AND_SWEEP_RECLIMIT 256 +#define DUK_USE_MATH_BUILTIN #define DUK_USE_MS_STRINGTABLE_RESIZE -#endif - -#if defined(DUK_OPT_NONSTD_ARRAY_CONCAT_TRAILER) -#define DUK_USE_NONSTD_ARRAY_CONCAT_TRAILER -#elif defined(DUK_OPT_NO_NONSTD_ARRAY_CONCAT_TRAILER) -#undef DUK_USE_NONSTD_ARRAY_CONCAT_TRAILER -#else +#define DUK_USE_NATIVE_CALL_RECLIMIT 1000 #define DUK_USE_NONSTD_ARRAY_CONCAT_TRAILER -#endif - -#if defined(DUK_OPT_NONSTD_ARRAY_MAP_TRAILER) -#define DUK_USE_NONSTD_ARRAY_MAP_TRAILER -#elif defined(DUK_OPT_NO_NONSTD_ARRAY_MAP_TRAILER) -#undef DUK_USE_NONSTD_ARRAY_MAP_TRAILER -#else #define DUK_USE_NONSTD_ARRAY_MAP_TRAILER -#endif - -#if defined(DUK_OPT_NONSTD_ARRAY_SPLICE_DELCOUNT) -#define DUK_USE_NONSTD_ARRAY_SPLICE_DELCOUNT -#elif defined(DUK_OPT_NO_NONSTD_ARRAY_SPLICE_DELCOUNT) -#undef DUK_USE_NONSTD_ARRAY_SPLICE_DELCOUNT -#else #define DUK_USE_NONSTD_ARRAY_SPLICE_DELCOUNT -#endif - -#if defined(DUK_OPT_NONSTD_FUNC_CALLER_PROPERTY) -#define DUK_USE_NONSTD_FUNC_CALLER_PROPERTY -#elif defined(DUK_OPT_NO_NONSTD_FUNC_CALLER_PROPERTY) #undef DUK_USE_NONSTD_FUNC_CALLER_PROPERTY -#else -#undef DUK_USE_NONSTD_FUNC_CALLER_PROPERTY -#endif - -#if defined(DUK_OPT_NONSTD_FUNC_SOURCE_PROPERTY) -#define DUK_USE_NONSTD_FUNC_SOURCE_PROPERTY -#elif defined(DUK_OPT_NO_NONSTD_FUNC_SOURCE_PROPERTY) #undef DUK_USE_NONSTD_FUNC_SOURCE_PROPERTY -#else -#undef DUK_USE_NONSTD_FUNC_SOURCE_PROPERTY -#endif - -#if defined(DUK_OPT_NONSTD_FUNC_STMT) -#define DUK_USE_NONSTD_FUNC_STMT -#elif defined(DUK_OPT_NO_NONSTD_FUNC_STMT) -#undef DUK_USE_NONSTD_FUNC_STMT -#else #define DUK_USE_NONSTD_FUNC_STMT -#endif - -#if defined(DUK_OPT_NONSTD_ACCESSOR_KEY_ARGUMENT) #define DUK_USE_NONSTD_GETTER_KEY_ARGUMENT -#elif defined(DUK_OPT_NO_NONSTD_ACCESSOR_KEY_ARGUMENT) -#undef DUK_USE_NONSTD_GETTER_KEY_ARGUMENT -#else -#define DUK_USE_NONSTD_GETTER_KEY_ARGUMENT -#endif - -#if defined(DUK_OPT_NONSTD_JSON_ESC_U2028_U2029) #define DUK_USE_NONSTD_JSON_ESC_U2028_U2029 -#elif defined(DUK_OPT_NO_NONSTD_JSON_ESC_U2028_U2029) -#undef DUK_USE_NONSTD_JSON_ESC_U2028_U2029 -#else -#define DUK_USE_NONSTD_JSON_ESC_U2028_U2029 -#endif - -#if defined(DUK_OPT_NONSTD_REGEXP_DOLLAR_ESCAPE) -#define DUK_USE_NONSTD_REGEXP_DOLLAR_ESCAPE -#elif defined(DUK_OPT_NO_NONSTD_REGEXP_DOLLAR_ESCAPE) -#undef DUK_USE_NONSTD_REGEXP_DOLLAR_ESCAPE -#else -#define DUK_USE_NONSTD_REGEXP_DOLLAR_ESCAPE -#endif - -#if defined(DUK_OPT_NONSTD_ACCESSOR_KEY_ARGUMENT) -#define DUK_USE_NONSTD_SETTER_KEY_ARGUMENT -#elif defined(DUK_OPT_NO_NONSTD_ACCESSOR_KEY_ARGUMENT) -#undef DUK_USE_NONSTD_SETTER_KEY_ARGUMENT -#else #define DUK_USE_NONSTD_SETTER_KEY_ARGUMENT -#endif - -#if defined(DUK_OPT_NONSTD_STRING_FROMCHARCODE_32BIT) -#define DUK_USE_NONSTD_STRING_FROMCHARCODE_32BIT -#elif defined(DUK_OPT_NO_NONSTD_STRING_FROMCHARCODE_32BIT) -#undef DUK_USE_NONSTD_STRING_FROMCHARCODE_32BIT -#else #define DUK_USE_NONSTD_STRING_FROMCHARCODE_32BIT -#endif - -#if defined(DUK_OPT_OBJSIZES16) -#define DUK_USE_OBJSIZES16 -#elif defined(DUK_OPT_NO_OBJSIZES16) +#define DUK_USE_NUMBER_BUILTIN +#define DUK_USE_OBJECT_BUILTIN #undef DUK_USE_OBJSIZES16 -#else -#undef DUK_USE_OBJSIZES16 -#endif - -#if defined(DUK_OPT_OCTAL_SUPPORT) -#define DUK_USE_OCTAL_SUPPORT -#elif defined(DUK_OPT_NO_OCTAL_SUPPORT) -#undef DUK_USE_OCTAL_SUPPORT -#else -#define DUK_USE_OCTAL_SUPPORT -#endif - -#if defined(DUK_OPT_PACKED_TVAL) -#define DUK_USE_PACKED_TVAL -#elif defined(DUK_OPT_NO_PACKED_TVAL) -#undef DUK_USE_PACKED_TVAL -#else -/* Already provided above */ -#endif - -#undef DUK_USE_PANIC_ABORT -#if !defined(DUK_OPT_SEGFAULT_ON_PANIC) -#define DUK_USE_PANIC_ABORT -#endif - -#undef DUK_USE_PANIC_HANDLER -#if defined(DUK_OPT_PANIC_HANDLER) -#define DUK_USE_PANIC_HANDLER(code,msg) DUK_OPT_PANIC_HANDLER((code),(msg)) -#endif - -#undef DUK_USE_PANIC_SEGFAULT -#if defined(DUK_OPT_SEGFAULT_ON_PANIC) -#define DUK_USE_PANIC_SEGFAULT -#endif - -#if defined(DUK_OPT_PARANOID_ERRORS) -#define DUK_USE_PARANOID_ERRORS -#elif defined(DUK_OPT_NO_PARANOID_ERRORS) #undef DUK_USE_PARANOID_ERRORS -#else -#undef DUK_USE_PARANOID_ERRORS -#endif - -#if defined(DUK_OPT_PC2LINE) #define DUK_USE_PC2LINE -#elif defined(DUK_OPT_NO_PC2LINE) -#undef DUK_USE_PC2LINE -#else -#define DUK_USE_PC2LINE -#endif - -#if defined(DUK_OPT_REFCOUNT16) -#define DUK_USE_REFCOUNT16 -#elif defined(DUK_OPT_NO_REFCOUNT16) -#undef DUK_USE_REFCOUNT16 -#else +#undef DUK_USE_PREFER_SIZE +#define DUK_USE_PROVIDE_DEFAULT_ALLOC_FUNCTIONS #undef DUK_USE_REFCOUNT16 -#endif - -#if defined(DUK_OPT_REFERENCE_COUNTING) -#define DUK_USE_REFERENCE_COUNTING -#elif defined(DUK_OPT_NO_REFERENCE_COUNTING) -#undef DUK_USE_REFERENCE_COUNTING -#else #define DUK_USE_REFERENCE_COUNTING -#endif - -#if defined(DUK_OPT_REGEXP_CANON_WORKAROUND) -#define DUK_USE_REGEXP_CANON_WORKAROUND -#elif defined(DUK_OPT_NO_REGEXP_CANON_WORKAROUND) -#undef DUK_USE_REGEXP_CANON_WORKAROUND -#else +#define DUK_USE_REFLECT_BUILTIN +#undef DUK_USE_REFZERO_FINALIZER_TORTURE #undef DUK_USE_REGEXP_CANON_WORKAROUND -#endif - -#if defined(DUK_OPT_REGEXP_SUPPORT) -#define DUK_USE_REGEXP_SUPPORT -#elif defined(DUK_OPT_NO_REGEXP_SUPPORT) -#undef DUK_USE_REGEXP_SUPPORT -#else +#define DUK_USE_REGEXP_COMPILER_RECLIMIT 10000 +#define DUK_USE_REGEXP_EXECUTOR_RECLIMIT 10000 #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 +#define DUK_USE_ROM_PTRCOMP_FIRST 63488L #undef DUK_USE_ROM_STRINGS -#endif - -#if defined(DUK_OPT_SECTION_B) -#define DUK_USE_SECTION_B -#elif defined(DUK_OPT_NO_SECTION_B) -#undef DUK_USE_SECTION_B -#else #define DUK_USE_SECTION_B -#endif - -#if defined(DUK_OPT_SELF_TESTS) -#define DUK_USE_SELF_TESTS -#elif defined(DUK_OPT_NO_SELF_TESTS) #undef DUK_USE_SELF_TESTS -#else -#undef DUK_USE_SELF_TESTS -#endif - -#if defined(DUK_OPT_SHUFFLE_TORTURE) -#define DUK_USE_SHUFFLE_TORTURE -#elif defined(DUK_OPT_NO_SHUFFLE_TORTURE) #undef DUK_USE_SHUFFLE_TORTURE -#else -#undef DUK_USE_SHUFFLE_TORTURE -#endif - -#if defined(DUK_OPT_SOURCE_NONBMP) -#define DUK_USE_SOURCE_NONBMP -#elif defined(DUK_OPT_NO_SOURCE_NONBMP) -#undef DUK_USE_SOURCE_NONBMP -#else #define DUK_USE_SOURCE_NONBMP -#endif - -#if defined(DUK_OPT_STRHASH16) -#define DUK_USE_STRHASH16 -#elif defined(DUK_OPT_NO_STRHASH16) #undef DUK_USE_STRHASH16 -#else -#undef DUK_USE_STRHASH16 -#endif - -#if defined(DUK_OPT_STRICT_DECL) -#define DUK_USE_STRICT_DECL -#elif defined(DUK_OPT_NO_STRICT_DECL) -#undef DUK_USE_STRICT_DECL -#else +#undef DUK_USE_STRHASH_DENSE +#define DUK_USE_STRHASH_SKIP_SHIFT 5 #define DUK_USE_STRICT_DECL -#endif - -#if defined(DUK_OPT_STRICT_UTF8_SOURCE) -#define DUK_USE_STRICT_UTF8_SOURCE -#elif defined(DUK_OPT_NO_STRICT_UTF8_SOURCE) #undef DUK_USE_STRICT_UTF8_SOURCE -#else -#undef DUK_USE_STRICT_UTF8_SOURCE -#endif - -#if defined(DUK_OPT_STRLEN16) -#define DUK_USE_STRLEN16 -#elif defined(DUK_OPT_NO_STRLEN16) -#undef DUK_USE_STRLEN16 -#else +#define DUK_USE_STRING_BUILTIN #undef DUK_USE_STRLEN16 -#endif - #undef DUK_USE_STRTAB_CHAIN -#if defined(DUK_OPT_STRTAB_CHAIN) && defined(DUK_OPT_STRTAB_CHAIN_SIZE) -#define DUK_USE_STRTAB_CHAIN -#endif - #undef DUK_USE_STRTAB_CHAIN_SIZE -#if defined(DUK_OPT_STRTAB_CHAIN) && defined(DUK_OPT_STRTAB_CHAIN_SIZE) -/* Low memory algorithm: separate chaining using arrays, fixed size hash */ -#define DUK_USE_STRTAB_CHAIN_SIZE DUK_OPT_STRTAB_CHAIN_SIZE -#endif - -#undef DUK_USE_STRTAB_PROBE -#if !(defined(DUK_OPT_STRTAB_CHAIN) && defined(DUK_OPT_STRTAB_CHAIN_SIZE)) #define DUK_USE_STRTAB_PROBE -#endif - -#if defined(DUK_OPT_NONSTD_FUNC_CALLER_PROPERTY) -#undef DUK_USE_TAILCALL -#else +#undef DUK_USE_SYMBOL_BUILTIN #define DUK_USE_TAILCALL -#endif - -#if defined(DUK_OPT_TARGET_INFO) -#define DUK_USE_TARGET_INFO DUK_OPT_TARGET_INFO -#else #define DUK_USE_TARGET_INFO "unknown" -#endif - -#if defined(DUK_OPT_NO_AUGMENT_ERRORS) -#undef DUK_USE_TRACEBACKS -#elif defined(DUK_OPT_NO_TRACEBACKS) -#undef DUK_USE_TRACEBACKS -#else #define DUK_USE_TRACEBACKS -#endif - -#if defined(DUK_OPT_TRACEBACK_DEPTH) -#define DUK_USE_TRACEBACK_DEPTH DUK_OPT_TRACEBACK_DEPTH -#else -#define DUK_USE_TRACEBACK_DEPTH 10 -#endif - -#if defined(DUK_OPT_DECLARE) -#define DUK_USE_USER_DECLARE() DUK_OPT_DECLARE -#else +#define DUK_USE_TRACEBACK_DEPTH 10 #define DUK_USE_USER_DECLARE() /* no user declarations */ -#endif - -/* User provided InitJS. */ -#undef DUK_USE_USER_INITJS -#if defined(DUK_OPT_USER_INITJS) -#define DUK_USE_USER_INITJS (DUK_OPT_USER_INITJS) -#endif - -#if defined(DUK_OPT_VERBOSE_ERRORS) -#define DUK_USE_VERBOSE_ERRORS -#elif defined(DUK_OPT_NO_VERBOSE_ERRORS) -#undef DUK_USE_VERBOSE_ERRORS -#else +#undef DUK_USE_VALSTACK_UNSAFE #define DUK_USE_VERBOSE_ERRORS -#endif - -#if defined(DUK_OPT_VOLUNTARY_GC) -#define DUK_USE_VOLUNTARY_GC -#elif defined(DUK_OPT_NO_VOLUNTARY_GC) -#undef DUK_USE_VOLUNTARY_GC -#else +#define DUK_USE_VERBOSE_EXECUTOR_ERRORS #define DUK_USE_VOLUNTARY_GC -#endif - -#if defined(DUK_OPT_ZERO_BUFFER_DATA) -#define DUK_USE_ZERO_BUFFER_DATA -#elif defined(DUK_OPT_NO_ZERO_BUFFER_DATA) -#undef DUK_USE_ZERO_BUFFER_DATA -#else #define DUK_USE_ZERO_BUFFER_DATA -#endif - -/* - * Autogenerated defaults - */ - -#define DUK_USE_AVOID_PLATFORM_FUNCPTRS -#define DUK_USE_BASE64_FASTPATH -#define DUK_USE_BUILTIN_INITJS -#define DUK_USE_COMPILER_RECLIMIT 2500 -#undef DUK_USE_DATE_FORMAT_STRING -#undef DUK_USE_DATE_GET_LOCAL_TZOFFSET -#undef DUK_USE_DATE_GET_NOW -#undef DUK_USE_DATE_PARSE_STRING -#undef DUK_USE_DATE_PRS_GETDATE -#define DUK_USE_ESBC_LIMITS -#define DUK_USE_ESBC_MAX_BYTES 2147418112L -#define DUK_USE_ESBC_MAX_LINENUMBER 2147418112L -#undef DUK_USE_EXEC_FUN_LOCAL -#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 -#define DUK_USE_JSON_DEC_RECLIMIT 1000 -#define DUK_USE_JSON_EATWHITE_FASTPATH -#define DUK_USE_JSON_ENC_RECLIMIT 1000 -#define DUK_USE_JSON_QUOTESTRING_FASTPATH -#define DUK_USE_LEXER_SLIDING_WINDOW -#undef DUK_USE_MARKANDSWEEP_FINALIZER_TORTURE -#define DUK_USE_MARK_AND_SWEEP_RECLIMIT 256 -#define DUK_USE_MATH_BUILTIN -#define DUK_USE_NATIVE_CALL_RECLIMIT 1000 -#undef DUK_USE_PANIC_EXIT -#undef DUK_USE_PREFER_SIZE -#define DUK_USE_PROVIDE_DEFAULT_ALLOC_FUNCTIONS -#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 -#define DUK_USE_VERBOSE_EXECUTOR_ERRORS /* - * Alternative customization header - * - * If you want to modify the final DUK_USE_xxx flags directly (without - * using the available DUK_OPT_xxx flags), define DUK_OPT_HAVE_CUSTOM_H - * and tweak the final flags there. + * Fixups */ -#if defined(DUK_OPT_HAVE_CUSTOM_H) #include "duk_custom.h" -#endif /* * You may add overriding #define/#undef directives below for @@ -3602,183 +2924,6 @@ typedef FILE duk_file; #endif /* DUK_COMPILING_DUKTAPE */ -/* - * Checks for config option consistency (DUK_USE_xxx) - */ - -#if defined(DUK_USE_32BIT_PTRS) -#error unsupported config option used (option has been removed): DUK_USE_32BIT_PTRS -#endif -#if defined(DUK_USE_ALIGN_4) -#error unsupported config option used (option has been removed): DUK_USE_ALIGN_4 -#endif -#if defined(DUK_USE_ALIGN_8) -#error unsupported config option used (option has been removed): DUK_USE_ALIGN_8 -#endif -#if defined(DUK_USE_BYTEORDER_FORCED) -#error unsupported config option used (option has been removed): DUK_USE_BYTEORDER_FORCED -#endif -#if defined(DUK_USE_DATAPTR_DEC16) && !defined(DUK_USE_DATAPTR16) -#error config option DUK_USE_DATAPTR_DEC16 requires option DUK_USE_DATAPTR16 (which is missing) -#endif -#if defined(DUK_USE_DATAPTR_ENC16) && !defined(DUK_USE_DATAPTR16) -#error config option DUK_USE_DATAPTR_ENC16 requires option DUK_USE_DATAPTR16 (which is missing) -#endif -#if defined(DUK_USE_DEBUGGER_SUPPORT) && !defined(DUK_USE_INTERRUPT_COUNTER) -#error config option DUK_USE_DEBUGGER_SUPPORT requires option DUK_USE_INTERRUPT_COUNTER (which is missing) -#endif -#if defined(DUK_USE_DEEP_C_STACK) -#error unsupported config option used (option has been removed): DUK_USE_DEEP_C_STACK -#endif -#if defined(DUK_USE_DOUBLE_BE) -#error unsupported config option used (option has been removed): DUK_USE_DOUBLE_BE -#endif -#if defined(DUK_USE_DOUBLE_BE) && defined(DUK_USE_DOUBLE_LE) -#error config option DUK_USE_DOUBLE_BE conflicts with option DUK_USE_DOUBLE_LE (which is also defined) -#endif -#if defined(DUK_USE_DOUBLE_BE) && defined(DUK_USE_DOUBLE_ME) -#error config option DUK_USE_DOUBLE_BE conflicts with option DUK_USE_DOUBLE_ME (which is also defined) -#endif -#if defined(DUK_USE_DOUBLE_LE) -#error unsupported config option used (option has been removed): DUK_USE_DOUBLE_LE -#endif -#if defined(DUK_USE_DOUBLE_LE) && defined(DUK_USE_DOUBLE_BE) -#error config option DUK_USE_DOUBLE_LE conflicts with option DUK_USE_DOUBLE_BE (which is also defined) -#endif -#if defined(DUK_USE_DOUBLE_LE) && defined(DUK_USE_DOUBLE_ME) -#error config option DUK_USE_DOUBLE_LE conflicts with option DUK_USE_DOUBLE_ME (which is also defined) -#endif -#if defined(DUK_USE_DOUBLE_ME) -#error unsupported config option used (option has been removed): DUK_USE_DOUBLE_ME -#endif -#if defined(DUK_USE_DOUBLE_ME) && defined(DUK_USE_DOUBLE_LE) -#error config option DUK_USE_DOUBLE_ME conflicts with option DUK_USE_DOUBLE_LE (which is also defined) -#endif -#if defined(DUK_USE_DOUBLE_ME) && defined(DUK_USE_DOUBLE_BE) -#error config option DUK_USE_DOUBLE_ME conflicts with option DUK_USE_DOUBLE_BE (which is also defined) -#endif -#if defined(DUK_USE_DPRINT) && !defined(DUK_USE_DEBUG) -#error config option DUK_USE_DPRINT requires option DUK_USE_DEBUG (which is missing) -#endif -#if defined(DUK_USE_ESBC_MAX_BYTES) && !defined(DUK_USE_ESBC_LIMITS) -#error config option DUK_USE_ESBC_MAX_BYTES requires option DUK_USE_ESBC_LIMITS (which is missing) -#endif -#if defined(DUK_USE_ESBC_MAX_LINENUMBER) && !defined(DUK_USE_ESBC_LIMITS) -#error config option DUK_USE_ESBC_MAX_LINENUMBER requires option DUK_USE_ESBC_LIMITS (which is missing) -#endif -#if defined(DUK_USE_EXEC_TIMEOUT_CHECK) && !defined(DUK_USE_INTERRUPT_COUNTER) -#error config option DUK_USE_EXEC_TIMEOUT_CHECK requires option DUK_USE_INTERRUPT_COUNTER (which is missing) -#endif -#if defined(DUK_USE_EXTSTR_FREE) && !defined(DUK_USE_HSTRING_EXTDATA) -#error config option DUK_USE_EXTSTR_FREE requires option DUK_USE_HSTRING_EXTDATA (which is missing) -#endif -#if defined(DUK_USE_EXTSTR_INTERN_CHECK) && !defined(DUK_USE_HSTRING_EXTDATA) -#error config option DUK_USE_EXTSTR_INTERN_CHECK requires option DUK_USE_HSTRING_EXTDATA (which is missing) -#endif -#if defined(DUK_USE_FULL_TVAL) -#error unsupported config option used (option has been removed): DUK_USE_FULL_TVAL -#endif -#if defined(DUK_USE_FUNCPTR_DEC16) && !defined(DUK_USE_FUNCPTR16) -#error config option DUK_USE_FUNCPTR_DEC16 requires option DUK_USE_FUNCPTR16 (which is missing) -#endif -#if defined(DUK_USE_FUNCPTR_ENC16) && !defined(DUK_USE_FUNCPTR16) -#error config option DUK_USE_FUNCPTR_ENC16 requires option DUK_USE_FUNCPTR16 (which is missing) -#endif -#if defined(DUK_USE_HASHBYTES_UNALIGNED_U32_ACCESS) -#error unsupported config option used (option has been removed): DUK_USE_HASHBYTES_UNALIGNED_U32_ACCESS -#endif -#if defined(DUK_USE_HEAPPTR16) && defined(DUK_USE_DEBUG) -#error config option DUK_USE_HEAPPTR16 conflicts with option DUK_USE_DEBUG (which is also defined) -#endif -#if defined(DUK_USE_HEAPPTR_DEC16) && !defined(DUK_USE_HEAPPTR16) -#error config option DUK_USE_HEAPPTR_DEC16 requires option DUK_USE_HEAPPTR16 (which is missing) -#endif -#if defined(DUK_USE_HEAPPTR_ENC16) && !defined(DUK_USE_HEAPPTR16) -#error config option DUK_USE_HEAPPTR_ENC16 requires option DUK_USE_HEAPPTR16 (which is missing) -#endif -#if defined(DUK_USE_INTEGER_BE) -#error unsupported config option used (option has been removed): DUK_USE_INTEGER_BE -#endif -#if defined(DUK_USE_INTEGER_BE) && defined(DUK_USE_INTEGER_LE) -#error config option DUK_USE_INTEGER_BE conflicts with option DUK_USE_INTEGER_LE (which is also defined) -#endif -#if defined(DUK_USE_INTEGER_BE) && defined(DUK_USE_INTEGER_ME) -#error config option DUK_USE_INTEGER_BE conflicts with option DUK_USE_INTEGER_ME (which is also defined) -#endif -#if defined(DUK_USE_INTEGER_LE) -#error unsupported config option used (option has been removed): DUK_USE_INTEGER_LE -#endif -#if defined(DUK_USE_INTEGER_LE) && defined(DUK_USE_INTEGER_BE) -#error config option DUK_USE_INTEGER_LE conflicts with option DUK_USE_INTEGER_BE (which is also defined) -#endif -#if defined(DUK_USE_INTEGER_LE) && defined(DUK_USE_INTEGER_ME) -#error config option DUK_USE_INTEGER_LE conflicts with option DUK_USE_INTEGER_ME (which is also defined) -#endif -#if defined(DUK_USE_INTEGER_ME) -#error unsupported config option used (option has been removed): DUK_USE_INTEGER_ME -#endif -#if defined(DUK_USE_INTEGER_ME) && defined(DUK_USE_INTEGER_LE) -#error config option DUK_USE_INTEGER_ME conflicts with option DUK_USE_INTEGER_LE (which is also defined) -#endif -#if defined(DUK_USE_INTEGER_ME) && defined(DUK_USE_INTEGER_BE) -#error config option DUK_USE_INTEGER_ME conflicts with option DUK_USE_INTEGER_BE (which is also defined) -#endif -#if defined(DUK_USE_NO_DOUBLE_ALIASING_SELFTEST) -#error unsupported config option used (option has been removed): DUK_USE_NO_DOUBLE_ALIASING_SELFTEST -#endif -#if defined(DUK_USE_PACKED_TVAL_POSSIBLE) -#error unsupported config option used (option has been removed): DUK_USE_PACKED_TVAL_POSSIBLE -#endif -#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 -#if defined(DUK_USE_TAILCALL) && defined(DUK_USE_NONSTD_FUNC_CALLER_PROPERTY) -#error config option DUK_USE_TAILCALL conflicts with option DUK_USE_NONSTD_FUNC_CALLER_PROPERTY (which is also defined) -#endif -#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 -#endif - /* * Convert DUK_USE_BYTEORDER, from whatever source, into currently used * internal defines. If detection failed, #error out. -- cgit v1.2.3