diff extern/duktape/duk_config.h @ 425:70b0c9e40131

Irccd: import Duktape 2.0.1, closes #636
author David Demelier <markand@malikania.fr>
date Thu, 09 Feb 2017 18:44:22 +0100
parents c26b75fb97e3
children 65c7aecc9773
line wrap: on
line diff
--- a/extern/duktape/duk_config.h	Thu Feb 09 18:05:41 2017 +0100
+++ b/extern/duktape/duk_config.h	Thu Feb 09 18:44:22 2017 +0100
@@ -1,12 +1,13 @@
 /*
  *  duk_config.h configuration header generated by genconfig.py.
  *
- *  Git commit: 2cc76e9ff1f64869e1146ad7317d8cbe33bbd27e
- *  Git describe: v1.5.1
- *  Git branch: HEAD
+ *  Git commit: 3f5e91704aff97c754f6ef5d44aedc5e529d1b16
+ *  Git describe: v2.0.1
+ *  Git branch: v2.0-maintenance
  *
  *  Supported platforms:
  *      - Mac OSX, iPhone, Darwin
+ *      - Orbis
  *      - OpenBSD
  *      - Generic BSD
  *      - Atari ST TOS
@@ -60,20 +61,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 +89,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__)
@@ -230,9 +230,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,11 +334,6 @@
 #define DUK_F_VBCC
 #endif
 
-/* Atari Mint */
-#if defined(__MINT__)
-#define DUK_F_MINT
-#endif
-
 /*
  *  Platform autodetection
  */
@@ -380,6 +375,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 <sys/types.h>
+#include <machine/endian.h>
+#include <sys/param.h>
+#include <sys/time.h>
+#include <time.h>
+
+#define DUK_USE_OS_STRING  "orbis"
 #elif defined(DUK_F_OPENBSD)
 /* --- OpenBSD --- */
 /* http://www.monkey.org/openbsd/archive/ports/0401/msg00089.html */
@@ -436,7 +445,7 @@
 #define DUK_USE_DATE_PRS_STRPTIME
 #define DUK_USE_DATE_FMT_STRFTIME
 #include <time.h>
-#ifndef UINTPTR_MAX
+#if !defined(UINTPTR_MAX)
 #define UINTPTR_MAX UINT_MAX
 #endif
 #else
@@ -531,13 +540,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 +571,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 */
@@ -887,6 +896,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 +1009,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 +1196,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 +1212,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))
@@ -1912,6 +1935,11 @@
  *  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 +1953,6 @@
 #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 +2019,6 @@
 #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 +2039,9 @@
 #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
@@ -2176,29 +2150,6 @@
 #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 +2157,6 @@
 #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 +2200,42 @@
 #define DUK_SQRT             sqrt
 #endif
 
-/* 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.)
+/* 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.
  */
-#undef DUK_USE_POW_NETBSD_WORKAROUND
-#if defined(DUK_F_NETBSD)
-#define DUK_USE_POW_NETBSD_WORKAROUND
+#if defined(DUK_F_C99) || defined(DUK_F_CPP11) || (defined(_MSC_VER) && (_MSC_VER >= 1800))
+#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 */
+
+/* NetBSD 6.0 x86 (at least) has a few problems with pow() semantics,
+ * 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_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 +2278,6 @@
  *  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 +2380,6 @@
 #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 +2422,8 @@
 #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 +2459,9 @@
 #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 +2601,6 @@
 
 #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 +2631,164 @@
 #endif
 
 /*
- *  Feature option handling
- */
-
-#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
-#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_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
-#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
-#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_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_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_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
-
-#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_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_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
-#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
-#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_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_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_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
-#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
-#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
-#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_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
-#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
-#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_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)
-#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_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
-#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_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)
-#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
-#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
-#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
-#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_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
-#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_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_ARRAY_BUILTIN
+#define DUK_USE_ARRAY_FASTPATH
+#define DUK_USE_ARRAY_PROP_FASTPATH
+#undef DUK_USE_ASSERTIONS
+#define DUK_USE_AUGMENT_ERROR_CREATE
+#define DUK_USE_AUGMENT_ERROR_THROW
 #define DUK_USE_AVOID_PLATFORM_FUNCPTRS
 #define DUK_USE_BASE64_FASTPATH
-#define DUK_USE_BUILTIN_INITJS
+#define DUK_USE_BOOLEAN_BUILTIN
+#define DUK_USE_BUFFEROBJECT_SUPPORT
+#undef DUK_USE_BUFLEN16
+#define DUK_USE_BYTECODE_DUMP_SUPPORT
+#define DUK_USE_COMMONJS_MODULES
 #define DUK_USE_COMPILER_RECLIMIT 2500
+#define DUK_USE_COROUTINE_SUPPORT
+#undef DUK_USE_CPP_EXCEPTIONS
+#undef DUK_USE_DATAPTR16
+#undef DUK_USE_DATAPTR_DEC16
+#undef DUK_USE_DATAPTR_ENC16
+#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
+#undef DUK_USE_DEBUGGER_DUMPHEAP
+#undef DUK_USE_DEBUGGER_INSPECT
+#undef DUK_USE_DEBUGGER_PAUSE_UNCAUGHT
+#undef DUK_USE_DEBUGGER_SUPPORT
+#define DUK_USE_DEBUGGER_THROW_NOTIFY
+#undef DUK_USE_DEBUGGER_TRANSPORT_TORTURE
+#define DUK_USE_DEBUG_BUFSIZE 65536L
+#define DUK_USE_DEBUG_LEVEL 0
+#undef DUK_USE_DEBUG_WRITE
+#define DUK_USE_DOUBLE_LINKED_HEAP
+#define DUK_USE_DUKTAPE_BUILTIN
+#define DUK_USE_ENCODING_BUILTINS
+#define DUK_USE_ERRCREATE
+#define DUK_USE_ERRTHROW
+#define DUK_USE_ES6
+#define DUK_USE_ES6_OBJECT_PROTO_PROPERTY
+#define DUK_USE_ES6_OBJECT_SETPROTOTYPEOF
+#define DUK_USE_ES6_PROXY
+#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
+#undef DUK_USE_EXEC_PREFER_SIZE
+#define DUK_USE_EXEC_REGCONST_OPTIMIZE
+#undef DUK_USE_EXEC_TIMEOUT_CHECK
 #undef DUK_USE_EXPLICIT_NULL_INIT
+#undef DUK_USE_EXTSTR_FREE
+#undef DUK_USE_EXTSTR_INTERN_CHECK
+#undef DUK_USE_FASTINT
 #define DUK_USE_FAST_REFCOUNT_DEFAULT
+#undef DUK_USE_FATAL_HANDLER
+#define DUK_USE_FINALIZER_SUPPORT
+#undef DUK_USE_FUNCPTR16
+#undef DUK_USE_FUNCPTR_DEC16
+#undef DUK_USE_FUNCPTR_ENC16
+#define DUK_USE_FUNCTION_BUILTIN
+#define DUK_USE_FUNC_FILENAME_PROPERTY
+#define DUK_USE_FUNC_NAME_PROPERTY
+#undef DUK_USE_GC_TORTURE
+#undef DUK_USE_GET_RANDOM_DOUBLE
+#define DUK_USE_GLOBAL_BUILTIN
+#undef DUK_USE_HEAPPTR16
+#undef DUK_USE_HEAPPTR_DEC16
+#undef DUK_USE_HEAPPTR_ENC16
 #define DUK_USE_HEX_FASTPATH
+#define DUK_USE_HOBJECT_HASH_PART
+#define DUK_USE_HSTRING_ARRIDX
+#define DUK_USE_HSTRING_CLEN
+#undef DUK_USE_HSTRING_EXTDATA
 #define DUK_USE_IDCHAR_FASTPATH
+#undef DUK_USE_INTERRUPT_COUNTER
 #undef DUK_USE_INTERRUPT_DEBUG_FIXUP
+#define DUK_USE_JC
+#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
+#define DUK_USE_JSON_SUPPORT
+#define DUK_USE_JX
 #define DUK_USE_LEXER_SLIDING_WINDOW
+#undef DUK_USE_LIGHTFUNC_BUILTINS
 #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
 #define DUK_USE_NATIVE_CALL_RECLIMIT 1000
-#undef DUK_USE_PANIC_EXIT
+#define DUK_USE_NONSTD_ARRAY_CONCAT_TRAILER
+#define DUK_USE_NONSTD_ARRAY_MAP_TRAILER
+#define DUK_USE_NONSTD_ARRAY_SPLICE_DELCOUNT
+#undef DUK_USE_NONSTD_FUNC_CALLER_PROPERTY
+#undef DUK_USE_NONSTD_FUNC_SOURCE_PROPERTY
+#define DUK_USE_NONSTD_FUNC_STMT
+#define DUK_USE_NONSTD_GETTER_KEY_ARGUMENT
+#define DUK_USE_NONSTD_JSON_ESC_U2028_U2029
+#define DUK_USE_NONSTD_SETTER_KEY_ARGUMENT
+#define DUK_USE_NONSTD_STRING_FROMCHARCODE_32BIT
+#define DUK_USE_NUMBER_BUILTIN
+#define DUK_USE_OBJECT_BUILTIN
+#undef DUK_USE_OBJSIZES16
+#undef DUK_USE_PARANOID_ERRORS
+#define DUK_USE_PC2LINE
 #undef DUK_USE_PREFER_SIZE
 #define DUK_USE_PROVIDE_DEFAULT_ALLOC_FUNCTIONS
+#undef DUK_USE_REFCOUNT16
+#define DUK_USE_REFERENCE_COUNTING
+#define DUK_USE_REFLECT_BUILTIN
 #undef DUK_USE_REFZERO_FINALIZER_TORTURE
+#undef DUK_USE_REGEXP_CANON_WORKAROUND
 #define DUK_USE_REGEXP_COMPILER_RECLIMIT 10000
 #define DUK_USE_REGEXP_EXECUTOR_RECLIMIT 10000
+#define DUK_USE_REGEXP_SUPPORT
+#undef DUK_USE_ROM_GLOBAL_CLONE
+#undef DUK_USE_ROM_GLOBAL_INHERIT
+#undef DUK_USE_ROM_OBJECTS
 #define DUK_USE_ROM_PTRCOMP_FIRST 63488L
+#undef DUK_USE_ROM_STRINGS
+#define DUK_USE_SECTION_B
+#undef DUK_USE_SELF_TESTS
+#undef DUK_USE_SHUFFLE_TORTURE
+#define DUK_USE_SOURCE_NONBMP
+#undef DUK_USE_STRHASH16
 #undef DUK_USE_STRHASH_DENSE
 #define DUK_USE_STRHASH_SKIP_SHIFT 5
+#define DUK_USE_STRICT_DECL
+#undef DUK_USE_STRICT_UTF8_SOURCE
+#define DUK_USE_STRING_BUILTIN
+#undef DUK_USE_STRLEN16
+#undef DUK_USE_STRTAB_CHAIN
+#undef DUK_USE_STRTAB_CHAIN_SIZE
+#define DUK_USE_STRTAB_PROBE
+#undef DUK_USE_SYMBOL_BUILTIN
+#define DUK_USE_TAILCALL
+#define DUK_USE_TARGET_INFO "unknown"
+#define DUK_USE_TRACEBACKS
+#define DUK_USE_TRACEBACK_DEPTH 10
+#define DUK_USE_USER_DECLARE() /* no user declarations */
 #undef DUK_USE_VALSTACK_UNSAFE
+#define DUK_USE_VERBOSE_ERRORS
 #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.
- */
-
-#if defined(DUK_OPT_HAVE_CUSTOM_H)
-#include "duk_custom.h"
-#endif
+#define DUK_USE_VOLUNTARY_GC
+#define DUK_USE_ZERO_BUFFER_DATA
 
 /*
  *  You may add overriding #define/#undef directives below for
@@ -3603,6 +2852,305 @@
 #endif  /* DUK_COMPILING_DUKTAPE */
 
 /*
+ *  Checks for legacy feature options (DUK_OPT_xxx)
+ */
+
+#if defined(DUK_OPT_ASSERTIONS)
+#error unsupported legacy feature option DUK_OPT_ASSERTIONS used
+#endif
+#if defined(DUK_OPT_BUFFEROBJECT_SUPPORT)
+#error unsupported legacy feature option DUK_OPT_BUFFEROBJECT_SUPPORT used
+#endif
+#if defined(DUK_OPT_BUFLEN16)
+#error unsupported legacy feature option DUK_OPT_BUFLEN16 used
+#endif
+#if defined(DUK_OPT_DATAPTR16)
+#error unsupported legacy feature option DUK_OPT_DATAPTR16 used
+#endif
+#if defined(DUK_OPT_DATAPTR_DEC16)
+#error unsupported legacy feature option DUK_OPT_DATAPTR_DEC16 used
+#endif
+#if defined(DUK_OPT_DATAPTR_ENC16)
+#error unsupported legacy feature option DUK_OPT_DATAPTR_ENC16 used
+#endif
+#if defined(DUK_OPT_DDDPRINT)
+#error unsupported legacy feature option DUK_OPT_DDDPRINT used
+#endif
+#if defined(DUK_OPT_DDPRINT)
+#error unsupported legacy feature option DUK_OPT_DDPRINT used
+#endif
+#if defined(DUK_OPT_DEBUG)
+#error unsupported legacy feature option DUK_OPT_DEBUG used
+#endif
+#if defined(DUK_OPT_DEBUGGER_DUMPHEAP)
+#error unsupported legacy feature option DUK_OPT_DEBUGGER_DUMPHEAP used
+#endif
+#if defined(DUK_OPT_DEBUGGER_FWD_LOGGING)
+#error unsupported legacy feature option DUK_OPT_DEBUGGER_FWD_LOGGING used
+#endif
+#if defined(DUK_OPT_DEBUGGER_FWD_PRINTALERT)
+#error unsupported legacy feature option DUK_OPT_DEBUGGER_FWD_PRINTALERT used
+#endif
+#if defined(DUK_OPT_DEBUGGER_SUPPORT)
+#error unsupported legacy feature option DUK_OPT_DEBUGGER_SUPPORT used
+#endif
+#if defined(DUK_OPT_DEBUGGER_TRANSPORT_TORTURE)
+#error unsupported legacy feature option DUK_OPT_DEBUGGER_TRANSPORT_TORTURE used
+#endif
+#if defined(DUK_OPT_DEBUG_BUFSIZE)
+#error unsupported legacy feature option DUK_OPT_DEBUG_BUFSIZE used
+#endif
+#if defined(DUK_OPT_DECLARE)
+#error unsupported legacy feature option DUK_OPT_DECLARE used
+#endif
+#if defined(DUK_OPT_DEEP_C_STACK)
+#error unsupported legacy feature option DUK_OPT_DEEP_C_STACK used
+#endif
+#if defined(DUK_OPT_DLL_BUILD)
+#error unsupported legacy feature option DUK_OPT_DLL_BUILD used
+#endif
+#if defined(DUK_OPT_DPRINT)
+#error unsupported legacy feature option DUK_OPT_DPRINT used
+#endif
+#if defined(DUK_OPT_DPRINT_COLORS)
+#error unsupported legacy feature option DUK_OPT_DPRINT_COLORS used
+#endif
+#if defined(DUK_OPT_DPRINT_RDTSC)
+#error unsupported legacy feature option DUK_OPT_DPRINT_RDTSC used
+#endif
+#if defined(DUK_OPT_EXEC_TIMEOUT_CHECK)
+#error unsupported legacy feature option DUK_OPT_EXEC_TIMEOUT_CHECK used
+#endif
+#if defined(DUK_OPT_EXTERNAL_STRINGS)
+#error unsupported legacy feature option DUK_OPT_EXTERNAL_STRINGS used
+#endif
+#if defined(DUK_OPT_EXTSTR_FREE)
+#error unsupported legacy feature option DUK_OPT_EXTSTR_FREE used
+#endif
+#if defined(DUK_OPT_EXTSTR_INTERN_CHECK)
+#error unsupported legacy feature option DUK_OPT_EXTSTR_INTERN_CHECK used
+#endif
+#if defined(DUK_OPT_FASTINT)
+#error unsupported legacy feature option DUK_OPT_FASTINT used
+#endif
+#if defined(DUK_OPT_FORCE_ALIGN)
+#error unsupported legacy feature option DUK_OPT_FORCE_ALIGN used
+#endif
+#if defined(DUK_OPT_FORCE_BYTEORDER)
+#error unsupported legacy feature option DUK_OPT_FORCE_BYTEORDER used
+#endif
+#if defined(DUK_OPT_FUNCPTR16)
+#error unsupported legacy feature option DUK_OPT_FUNCPTR16 used
+#endif
+#if defined(DUK_OPT_FUNCPTR_DEC16)
+#error unsupported legacy feature option DUK_OPT_FUNCPTR_DEC16 used
+#endif
+#if defined(DUK_OPT_FUNCPTR_ENC16)
+#error unsupported legacy feature option DUK_OPT_FUNCPTR_ENC16 used
+#endif
+#if defined(DUK_OPT_FUNC_NONSTD_CALLER_PROPERTY)
+#error unsupported legacy feature option DUK_OPT_FUNC_NONSTD_CALLER_PROPERTY used
+#endif
+#if defined(DUK_OPT_FUNC_NONSTD_SOURCE_PROPERTY)
+#error unsupported legacy feature option DUK_OPT_FUNC_NONSTD_SOURCE_PROPERTY used
+#endif
+#if defined(DUK_OPT_GC_TORTURE)
+#error unsupported legacy feature option DUK_OPT_GC_TORTURE used
+#endif
+#if defined(DUK_OPT_HAVE_CUSTOM_H)
+#error unsupported legacy feature option DUK_OPT_HAVE_CUSTOM_H used
+#endif
+#if defined(DUK_OPT_HEAPPTR16)
+#error unsupported legacy feature option DUK_OPT_HEAPPTR16 used
+#endif
+#if defined(DUK_OPT_HEAPPTR_DEC16)
+#error unsupported legacy feature option DUK_OPT_HEAPPTR_DEC16 used
+#endif
+#if defined(DUK_OPT_HEAPPTR_ENC16)
+#error unsupported legacy feature option DUK_OPT_HEAPPTR_ENC16 used
+#endif
+#if defined(DUK_OPT_INTERRUPT_COUNTER)
+#error unsupported legacy feature option DUK_OPT_INTERRUPT_COUNTER used
+#endif
+#if defined(DUK_OPT_JSON_STRINGIFY_FASTPATH)
+#error unsupported legacy feature option DUK_OPT_JSON_STRINGIFY_FASTPATH used
+#endif
+#if defined(DUK_OPT_LIGHTFUNC_BUILTINS)
+#error unsupported legacy feature option DUK_OPT_LIGHTFUNC_BUILTINS used
+#endif
+#if defined(DUK_OPT_NONSTD_FUNC_CALLER_PROPERTY)
+#error unsupported legacy feature option DUK_OPT_NONSTD_FUNC_CALLER_PROPERTY used
+#endif
+#if defined(DUK_OPT_NONSTD_FUNC_SOURCE_PROPERTY)
+#error unsupported legacy feature option DUK_OPT_NONSTD_FUNC_SOURCE_PROPERTY used
+#endif
+#if defined(DUK_OPT_NO_ARRAY_SPLICE_NONSTD_DELCOUNT)
+#error unsupported legacy feature option DUK_OPT_NO_ARRAY_SPLICE_NONSTD_DELCOUNT used
+#endif
+#if defined(DUK_OPT_NO_AUGMENT_ERRORS)
+#error unsupported legacy feature option DUK_OPT_NO_AUGMENT_ERRORS used
+#endif
+#if defined(DUK_OPT_NO_BROWSER_LIKE)
+#error unsupported legacy feature option DUK_OPT_NO_BROWSER_LIKE used
+#endif
+#if defined(DUK_OPT_NO_BUFFEROBJECT_SUPPORT)
+#error unsupported legacy feature option DUK_OPT_NO_BUFFEROBJECT_SUPPORT used
+#endif
+#if defined(DUK_OPT_NO_BYTECODE_DUMP_SUPPORT)
+#error unsupported legacy feature option DUK_OPT_NO_BYTECODE_DUMP_SUPPORT used
+#endif
+#if defined(DUK_OPT_NO_COMMONJS_MODULES)
+#error unsupported legacy feature option DUK_OPT_NO_COMMONJS_MODULES used
+#endif
+#if defined(DUK_OPT_NO_ES6_OBJECT_PROTO_PROPERTY)
+#error unsupported legacy feature option DUK_OPT_NO_ES6_OBJECT_PROTO_PROPERTY used
+#endif
+#if defined(DUK_OPT_NO_ES6_OBJECT_SETPROTOTYPEOF)
+#error unsupported legacy feature option DUK_OPT_NO_ES6_OBJECT_SETPROTOTYPEOF used
+#endif
+#if defined(DUK_OPT_NO_ES6_PROXY)
+#error unsupported legacy feature option DUK_OPT_NO_ES6_PROXY used
+#endif
+#if defined(DUK_OPT_NO_FILE_IO)
+#error unsupported legacy feature option DUK_OPT_NO_FILE_IO used
+#endif
+#if defined(DUK_OPT_NO_FUNC_STMT)
+#error unsupported legacy feature option DUK_OPT_NO_FUNC_STMT used
+#endif
+#if defined(DUK_OPT_NO_JC)
+#error unsupported legacy feature option DUK_OPT_NO_JC used
+#endif
+#if defined(DUK_OPT_NO_JSONC)
+#error unsupported legacy feature option DUK_OPT_NO_JSONC used
+#endif
+#if defined(DUK_OPT_NO_JSONX)
+#error unsupported legacy feature option DUK_OPT_NO_JSONX used
+#endif
+#if defined(DUK_OPT_NO_JX)
+#error unsupported legacy feature option DUK_OPT_NO_JX used
+#endif
+#if defined(DUK_OPT_NO_MARK_AND_SWEEP)
+#error unsupported legacy feature option DUK_OPT_NO_MARK_AND_SWEEP used
+#endif
+#if defined(DUK_OPT_NO_MS_STRINGTABLE_RESIZE)
+#error unsupported legacy feature option DUK_OPT_NO_MS_STRINGTABLE_RESIZE used
+#endif
+#if defined(DUK_OPT_NO_NONSTD_ACCESSOR_KEY_ARGUMENT)
+#error unsupported legacy feature option DUK_OPT_NO_NONSTD_ACCESSOR_KEY_ARGUMENT used
+#endif
+#if defined(DUK_OPT_NO_NONSTD_ARRAY_CONCAT_TRAILER)
+#error unsupported legacy feature option DUK_OPT_NO_NONSTD_ARRAY_CONCAT_TRAILER used
+#endif
+#if defined(DUK_OPT_NO_NONSTD_ARRAY_MAP_TRAILER)
+#error unsupported legacy feature option DUK_OPT_NO_NONSTD_ARRAY_MAP_TRAILER used
+#endif
+#if defined(DUK_OPT_NO_NONSTD_ARRAY_SPLICE_DELCOUNT)
+#error unsupported legacy feature option DUK_OPT_NO_NONSTD_ARRAY_SPLICE_DELCOUNT used
+#endif
+#if defined(DUK_OPT_NO_NONSTD_FUNC_STMT)
+#error unsupported legacy feature option DUK_OPT_NO_NONSTD_FUNC_STMT used
+#endif
+#if defined(DUK_OPT_NO_NONSTD_JSON_ESC_U2028_U2029)
+#error unsupported legacy feature option DUK_OPT_NO_NONSTD_JSON_ESC_U2028_U2029 used
+#endif
+#if defined(DUK_OPT_NO_NONSTD_STRING_FROMCHARCODE_32BIT)
+#error unsupported legacy feature option DUK_OPT_NO_NONSTD_STRING_FROMCHARCODE_32BIT used
+#endif
+#if defined(DUK_OPT_NO_OBJECT_ES6_PROTO_PROPERTY)
+#error unsupported legacy feature option DUK_OPT_NO_OBJECT_ES6_PROTO_PROPERTY used
+#endif
+#if defined(DUK_OPT_NO_OBJECT_ES6_SETPROTOTYPEOF)
+#error unsupported legacy feature option DUK_OPT_NO_OBJECT_ES6_SETPROTOTYPEOF used
+#endif
+#if defined(DUK_OPT_NO_OCTAL_SUPPORT)
+#error unsupported legacy feature option DUK_OPT_NO_OCTAL_SUPPORT used
+#endif
+#if defined(DUK_OPT_NO_PACKED_TVAL)
+#error unsupported legacy feature option DUK_OPT_NO_PACKED_TVAL used
+#endif
+#if defined(DUK_OPT_NO_PC2LINE)
+#error unsupported legacy feature option DUK_OPT_NO_PC2LINE used
+#endif
+#if defined(DUK_OPT_NO_REFERENCE_COUNTING)
+#error unsupported legacy feature option DUK_OPT_NO_REFERENCE_COUNTING used
+#endif
+#if defined(DUK_OPT_NO_REGEXP_SUPPORT)
+#error unsupported legacy feature option DUK_OPT_NO_REGEXP_SUPPORT used
+#endif
+#if defined(DUK_OPT_NO_SECTION_B)
+#error unsupported legacy feature option DUK_OPT_NO_SECTION_B used
+#endif
+#if defined(DUK_OPT_NO_SOURCE_NONBMP)
+#error unsupported legacy feature option DUK_OPT_NO_SOURCE_NONBMP used
+#endif
+#if defined(DUK_OPT_NO_STRICT_DECL)
+#error unsupported legacy feature option DUK_OPT_NO_STRICT_DECL used
+#endif
+#if defined(DUK_OPT_NO_TRACEBACKS)
+#error unsupported legacy feature option DUK_OPT_NO_TRACEBACKS used
+#endif
+#if defined(DUK_OPT_NO_VERBOSE_ERRORS)
+#error unsupported legacy feature option DUK_OPT_NO_VERBOSE_ERRORS used
+#endif
+#if defined(DUK_OPT_NO_VOLUNTARY_GC)
+#error unsupported legacy feature option DUK_OPT_NO_VOLUNTARY_GC used
+#endif
+#if defined(DUK_OPT_NO_ZERO_BUFFER_DATA)
+#error unsupported legacy feature option DUK_OPT_NO_ZERO_BUFFER_DATA used
+#endif
+#if defined(DUK_OPT_OBJSIZES16)
+#error unsupported legacy feature option DUK_OPT_OBJSIZES16 used
+#endif
+#if defined(DUK_OPT_PANIC_HANDLER)
+#error unsupported legacy feature option DUK_OPT_PANIC_HANDLER used
+#endif
+#if defined(DUK_OPT_REFCOUNT16)
+#error unsupported legacy feature option DUK_OPT_REFCOUNT16 used
+#endif
+#if defined(DUK_OPT_SEGFAULT_ON_PANIC)
+#error unsupported legacy feature option DUK_OPT_SEGFAULT_ON_PANIC used
+#endif
+#if defined(DUK_OPT_SELF_TESTS)
+#error unsupported legacy feature option DUK_OPT_SELF_TESTS used
+#endif
+#if defined(DUK_OPT_SETJMP)
+#error unsupported legacy feature option DUK_OPT_SETJMP used
+#endif
+#if defined(DUK_OPT_SHUFFLE_TORTURE)
+#error unsupported legacy feature option DUK_OPT_SHUFFLE_TORTURE used
+#endif
+#if defined(DUK_OPT_SIGSETJMP)
+#error unsupported legacy feature option DUK_OPT_SIGSETJMP used
+#endif
+#if defined(DUK_OPT_STRHASH16)
+#error unsupported legacy feature option DUK_OPT_STRHASH16 used
+#endif
+#if defined(DUK_OPT_STRICT_UTF8_SOURCE)
+#error unsupported legacy feature option DUK_OPT_STRICT_UTF8_SOURCE used
+#endif
+#if defined(DUK_OPT_STRLEN16)
+#error unsupported legacy feature option DUK_OPT_STRLEN16 used
+#endif
+#if defined(DUK_OPT_STRTAB_CHAIN)
+#error unsupported legacy feature option DUK_OPT_STRTAB_CHAIN used
+#endif
+#if defined(DUK_OPT_STRTAB_CHAIN_SIZE)
+#error unsupported legacy feature option DUK_OPT_STRTAB_CHAIN_SIZE used
+#endif
+#if defined(DUK_OPT_TARGET_INFO)
+#error unsupported legacy feature option DUK_OPT_TARGET_INFO used
+#endif
+#if defined(DUK_OPT_TRACEBACK_DEPTH)
+#error unsupported legacy feature option DUK_OPT_TRACEBACK_DEPTH used
+#endif
+#if defined(DUK_OPT_UNDERSCORE_SETJMP)
+#error unsupported legacy feature option DUK_OPT_UNDERSCORE_SETJMP used
+#endif
+#if defined(DUK_OPT_USER_INITJS)
+#error unsupported legacy feature option DUK_OPT_USER_INITJS used
+#endif
+
+/*
  *  Checks for config option consistency (DUK_USE_xxx)
  */
 
@@ -3615,6 +3163,12 @@
 #if defined(DUK_USE_ALIGN_8)
 #error unsupported config option used (option has been removed): DUK_USE_ALIGN_8
 #endif
+#if defined(DUK_USE_BROWSER_LIKE)
+#error unsupported config option used (option has been removed): DUK_USE_BROWSER_LIKE
+#endif
+#if defined(DUK_USE_BUILTIN_INITJS)
+#error unsupported config option used (option has been removed): DUK_USE_BUILTIN_INITJS
+#endif
 #if defined(DUK_USE_BYTEORDER_FORCED)
 #error unsupported config option used (option has been removed): DUK_USE_BYTEORDER_FORCED
 #endif
@@ -3624,6 +3178,18 @@
 #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_DDDPRINT)
+#error unsupported config option used (option has been removed): DUK_USE_DDDPRINT
+#endif
+#if defined(DUK_USE_DDPRINT)
+#error unsupported config option used (option has been removed): DUK_USE_DDPRINT
+#endif
+#if defined(DUK_USE_DEBUGGER_FWD_LOGGING)
+#error unsupported config option used (option has been removed): DUK_USE_DEBUGGER_FWD_LOGGING
+#endif
+#if defined(DUK_USE_DEBUGGER_FWD_PRINTALERT)
+#error unsupported config option used (option has been removed): DUK_USE_DEBUGGER_FWD_PRINTALERT
+#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
@@ -3657,9 +3223,21 @@
 #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)
+#error unsupported config option used (option has been removed): DUK_USE_DPRINT
+#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_DPRINT_COLORS)
+#error unsupported config option used (option has been removed): DUK_USE_DPRINT_COLORS
+#endif
+#if defined(DUK_USE_DPRINT_RDTSC)
+#error unsupported config option used (option has been removed): DUK_USE_DPRINT_RDTSC
+#endif
+#if defined(DUK_USE_ES6_REGEXP_BRACES)
+#error unsupported config option used (option has been removed): DUK_USE_ES6_REGEXP_BRACES
+#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
@@ -3675,6 +3253,12 @@
 #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_FASTINT) && !defined(DUK_USE_64BIT_OPS)
+#error config option DUK_USE_FASTINT requires option DUK_USE_64BIT_OPS (which is missing)
+#endif
+#if defined(DUK_USE_FILE_IO)
+#error unsupported config option used (option has been removed): DUK_USE_FILE_IO
+#endif
 #if defined(DUK_USE_FULL_TVAL)
 #error unsupported config option used (option has been removed): DUK_USE_FULL_TVAL
 #endif
@@ -3723,12 +3307,45 @@
 #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_MARK_AND_SWEEP)
+#error unsupported config option used (option has been removed): DUK_USE_MARK_AND_SWEEP
+#endif
+#if defined(DUK_USE_MATH_FMAX)
+#error unsupported config option used (option has been removed): DUK_USE_MATH_FMAX
+#endif
+#if defined(DUK_USE_MATH_FMIN)
+#error unsupported config option used (option has been removed): DUK_USE_MATH_FMIN
+#endif
+#if defined(DUK_USE_MATH_ROUND)
+#error unsupported config option used (option has been removed): DUK_USE_MATH_ROUND
+#endif
+#if defined(DUK_USE_NONSTD_REGEXP_DOLLAR_ESCAPE)
+#error unsupported config option used (option has been removed): DUK_USE_NONSTD_REGEXP_DOLLAR_ESCAPE
+#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_OCTAL_SUPPORT)
+#error unsupported config option used (option has been removed): DUK_USE_OCTAL_SUPPORT
+#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_PANIC_ABORT)
+#error unsupported config option used (option has been removed): DUK_USE_PANIC_ABORT
+#endif
+#if defined(DUK_USE_PANIC_EXIT)
+#error unsupported config option used (option has been removed): DUK_USE_PANIC_EXIT
+#endif
+#if defined(DUK_USE_PANIC_HANDLER)
+#error unsupported config option used (option has been removed): DUK_USE_PANIC_HANDLER
+#endif
+#if defined(DUK_USE_PANIC_SEGFAULT)
+#error unsupported config option used (option has been removed): DUK_USE_PANIC_SEGFAULT
+#endif
+#if defined(DUK_USE_POW_NETBSD_WORKAROUND)
+#error unsupported config option used (option has been removed): DUK_USE_POW_NETBSD_WORKAROUND
+#endif
 #if defined(DUK_USE_RDTSC)
 #error unsupported config option used (option has been removed): DUK_USE_RDTSC
 #endif
@@ -3774,6 +3391,9 @@
 #if defined(DUK_USE_UNDERSCORE_SETJMP)
 #error unsupported config option used (option has been removed): DUK_USE_UNDERSCORE_SETJMP
 #endif
+#if defined(DUK_USE_USER_INITJS)
+#error unsupported config option used (option has been removed): DUK_USE_USER_INITJS
+#endif
 
 #if defined(DUK_USE_CPP_EXCEPTIONS) && !defined(__cplusplus)
 #error DUK_USE_CPP_EXCEPTIONS enabled but not compiling with a C++ compiler