Mercurial > irccd
comparison 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 |
comparison
equal
deleted
inserted
replaced
424:cd3f7c712d9e | 425:70b0c9e40131 |
---|---|
1 /* | 1 /* |
2 * duk_config.h configuration header generated by genconfig.py. | 2 * duk_config.h configuration header generated by genconfig.py. |
3 * | 3 * |
4 * Git commit: 2cc76e9ff1f64869e1146ad7317d8cbe33bbd27e | 4 * Git commit: 3f5e91704aff97c754f6ef5d44aedc5e529d1b16 |
5 * Git describe: v1.5.1 | 5 * Git describe: v2.0.1 |
6 * Git branch: HEAD | 6 * Git branch: v2.0-maintenance |
7 * | 7 * |
8 * Supported platforms: | 8 * Supported platforms: |
9 * - Mac OSX, iPhone, Darwin | 9 * - Mac OSX, iPhone, Darwin |
10 * - Orbis | |
10 * - OpenBSD | 11 * - OpenBSD |
11 * - Generic BSD | 12 * - Generic BSD |
12 * - Atari ST TOS | 13 * - Atari ST TOS |
13 * - AmigaOS | 14 * - AmigaOS |
14 * - Windows | 15 * - Windows |
58 /* | 59 /* |
59 * Intermediate helper defines | 60 * Intermediate helper defines |
60 */ | 61 */ |
61 | 62 |
62 /* DLL build detection */ | 63 /* DLL build detection */ |
63 #if defined(DUK_OPT_DLL_BUILD) | |
64 #define DUK_F_DLL_BUILD | |
65 #elif defined(DUK_OPT_NO_DLL_BUILD) | |
66 #undef DUK_F_DLL_BUILD | |
67 #else | |
68 /* not configured for DLL build */ | 64 /* not configured for DLL build */ |
69 #undef DUK_F_DLL_BUILD | 65 #undef DUK_F_DLL_BUILD |
70 #endif | |
71 | 66 |
72 /* Apple OSX, iOS */ | 67 /* Apple OSX, iOS */ |
73 #if defined(__APPLE__) | 68 #if defined(__APPLE__) |
74 #define DUK_F_APPLE | 69 #define DUK_F_APPLE |
75 #endif | 70 #endif |
76 | 71 |
72 /* FreeBSD */ | |
73 #if defined(__FreeBSD__) || defined(__FreeBSD) | |
74 #define DUK_F_FREEBSD | |
75 #endif | |
76 | |
77 /* Orbis (PS4) variant */ | |
78 #if defined(DUK_F_FREEBSD) && defined(__ORBIS__) | |
79 #define DUK_F_ORBIS | |
80 #endif | |
81 | |
77 /* OpenBSD */ | 82 /* OpenBSD */ |
78 #if defined(__OpenBSD__) || defined(__OpenBSD) | 83 #if defined(__OpenBSD__) || defined(__OpenBSD) |
79 #define DUK_F_OPENBSD | 84 #define DUK_F_OPENBSD |
80 #endif | 85 #endif |
81 | 86 |
82 /* NetBSD */ | 87 /* NetBSD */ |
83 #if defined(__NetBSD__) || defined(__NetBSD) | 88 #if defined(__NetBSD__) || defined(__NetBSD) |
84 #define DUK_F_NETBSD | 89 #define DUK_F_NETBSD |
85 #endif | |
86 | |
87 /* FreeBSD */ | |
88 #if defined(__FreeBSD__) || defined(__FreeBSD) | |
89 #define DUK_F_FREEBSD | |
90 #endif | 90 #endif |
91 | 91 |
92 /* BSD variant */ | 92 /* BSD variant */ |
93 #if defined(DUK_F_FREEBSD) || defined(DUK_F_NETBSD) || defined(DUK_F_OPENBSD) || \ | 93 #if defined(DUK_F_FREEBSD) || defined(DUK_F_NETBSD) || defined(DUK_F_OPENBSD) || \ |
94 defined(__bsdi__) || defined(__DragonFly__) | 94 defined(__bsdi__) || defined(__DragonFly__) |
228 #define DUK_F_X86 | 228 #define DUK_F_X86 |
229 #endif | 229 #endif |
230 #endif | 230 #endif |
231 | 231 |
232 /* ARM */ | 232 /* ARM */ |
233 #if defined(__arm__) || defined(__thumb__) || defined(_ARM) || defined(_M_ARM) | 233 #if defined(__arm__) || defined(__thumb__) || defined(_ARM) || defined(_M_ARM) || defined(__aarch64__) |
234 #define DUK_F_ARM | 234 #define DUK_F_ARM |
235 #if defined(__LP64__) || defined(_LP64) || defined(__arm64) || defined(__arm64__) | 235 #if defined(__LP64__) || defined(_LP64) || defined(__arm64) || defined(__arm64__) || defined(__aarch64__) |
236 #define DUK_F_ARM64 | 236 #define DUK_F_ARM64 |
237 #else | 237 #else |
238 #define DUK_F_ARM32 | 238 #define DUK_F_ARM32 |
239 #endif | 239 #endif |
240 #endif | 240 #endif |
330 #endif | 330 #endif |
331 | 331 |
332 /* VBCC */ | 332 /* VBCC */ |
333 #if defined(__VBCC__) | 333 #if defined(__VBCC__) |
334 #define DUK_F_VBCC | 334 #define DUK_F_VBCC |
335 #endif | |
336 | |
337 /* Atari Mint */ | |
338 #if defined(__MINT__) | |
339 #define DUK_F_MINT | |
340 #endif | 335 #endif |
341 | 336 |
342 /* | 337 /* |
343 * Platform autodetection | 338 * Platform autodetection |
344 */ | 339 */ |
378 | 373 |
379 /* Use _setjmp() on Apple by default, see GH-55. */ | 374 /* Use _setjmp() on Apple by default, see GH-55. */ |
380 #define DUK_JMPBUF_TYPE jmp_buf | 375 #define DUK_JMPBUF_TYPE jmp_buf |
381 #define DUK_SETJMP(jb) _setjmp((jb)) | 376 #define DUK_SETJMP(jb) _setjmp((jb)) |
382 #define DUK_LONGJMP(jb) _longjmp((jb), 1) | 377 #define DUK_LONGJMP(jb) _longjmp((jb), 1) |
378 #elif defined(DUK_F_ORBIS) | |
379 /* --- Orbis --- */ | |
380 /* Orbis = PS4 */ | |
381 #define DUK_USE_DATE_NOW_GETTIMEOFDAY | |
382 #define DUK_USE_DATE_TZO_GMTIME_S | |
383 /* no parsing (not an error) */ | |
384 #define DUK_USE_DATE_FMT_STRFTIME | |
385 #include <sys/types.h> | |
386 #include <machine/endian.h> | |
387 #include <sys/param.h> | |
388 #include <sys/time.h> | |
389 #include <time.h> | |
390 | |
391 #define DUK_USE_OS_STRING "orbis" | |
383 #elif defined(DUK_F_OPENBSD) | 392 #elif defined(DUK_F_OPENBSD) |
384 /* --- OpenBSD --- */ | 393 /* --- OpenBSD --- */ |
385 /* http://www.monkey.org/openbsd/archive/ports/0401/msg00089.html */ | 394 /* http://www.monkey.org/openbsd/archive/ports/0401/msg00089.html */ |
386 #define DUK_USE_DATE_NOW_GETTIMEOFDAY | 395 #define DUK_USE_DATE_NOW_GETTIMEOFDAY |
387 #define DUK_USE_DATE_TZO_GMTIME_R | 396 #define DUK_USE_DATE_TZO_GMTIME_R |
434 #define DUK_USE_DATE_NOW_GETTIMEOFDAY | 443 #define DUK_USE_DATE_NOW_GETTIMEOFDAY |
435 #define DUK_USE_DATE_TZO_GMTIME_R | 444 #define DUK_USE_DATE_TZO_GMTIME_R |
436 #define DUK_USE_DATE_PRS_STRPTIME | 445 #define DUK_USE_DATE_PRS_STRPTIME |
437 #define DUK_USE_DATE_FMT_STRFTIME | 446 #define DUK_USE_DATE_FMT_STRFTIME |
438 #include <time.h> | 447 #include <time.h> |
439 #ifndef UINTPTR_MAX | 448 #if !defined(UINTPTR_MAX) |
440 #define UINTPTR_MAX UINT_MAX | 449 #define UINTPTR_MAX UINT_MAX |
441 #endif | 450 #endif |
442 #else | 451 #else |
443 #error AmigaOS but not M68K/PPC, not supported now | 452 #error AmigaOS but not M68K/PPC, not supported now |
444 #endif | 453 #endif |
529 | 538 |
530 #define DUK_USE_OS_STRING "tinspire" | 539 #define DUK_USE_OS_STRING "tinspire" |
531 #elif defined(DUK_F_EMSCRIPTEN) | 540 #elif defined(DUK_F_EMSCRIPTEN) |
532 /* --- Emscripten --- */ | 541 /* --- Emscripten --- */ |
533 #if defined(DUK_COMPILING_DUKTAPE) | 542 #if defined(DUK_COMPILING_DUKTAPE) |
534 #ifndef _POSIX_C_SOURCE | 543 #if !defined(_POSIX_C_SOURCE) |
535 #define _POSIX_C_SOURCE 200809L | 544 #define _POSIX_C_SOURCE 200809L |
536 #endif | 545 #endif |
537 #ifndef _GNU_SOURCE | 546 #if !defined(_GNU_SOURCE) |
538 #define _GNU_SOURCE /* e.g. getdate_r */ | 547 #define _GNU_SOURCE /* e.g. getdate_r */ |
539 #endif | 548 #endif |
540 #ifndef _XOPEN_SOURCE | 549 #if !defined(_XOPEN_SOURCE) |
541 #define _XOPEN_SOURCE /* e.g. strptime */ | 550 #define _XOPEN_SOURCE /* e.g. strptime */ |
542 #endif | 551 #endif |
543 #endif /* DUK_COMPILING_DUKTAPE */ | 552 #endif /* DUK_COMPILING_DUKTAPE */ |
544 | 553 |
545 #include <sys/types.h> | 554 #include <sys/types.h> |
560 | 569 |
561 #define DUK_USE_OS_STRING "emscripten" | 570 #define DUK_USE_OS_STRING "emscripten" |
562 #elif defined(DUK_F_LINUX) | 571 #elif defined(DUK_F_LINUX) |
563 /* --- Linux --- */ | 572 /* --- Linux --- */ |
564 #if defined(DUK_COMPILING_DUKTAPE) | 573 #if defined(DUK_COMPILING_DUKTAPE) |
565 #ifndef _POSIX_C_SOURCE | 574 #if !defined(_POSIX_C_SOURCE) |
566 #define _POSIX_C_SOURCE 200809L | 575 #define _POSIX_C_SOURCE 200809L |
567 #endif | 576 #endif |
568 #ifndef _GNU_SOURCE | 577 #if !defined(_GNU_SOURCE) |
569 #define _GNU_SOURCE /* e.g. getdate_r */ | 578 #define _GNU_SOURCE /* e.g. getdate_r */ |
570 #endif | 579 #endif |
571 #ifndef _XOPEN_SOURCE | 580 #if !defined(_XOPEN_SOURCE) |
572 #define _XOPEN_SOURCE /* e.g. strptime */ | 581 #define _XOPEN_SOURCE /* e.g. strptime */ |
573 #endif | 582 #endif |
574 #endif /* DUK_COMPILING_DUKTAPE */ | 583 #endif /* DUK_COMPILING_DUKTAPE */ |
575 | 584 |
576 #include <sys/types.h> | 585 #include <sys/types.h> |
885 #endif | 894 #endif |
886 | 895 |
887 #define DUK_USE_BRANCH_HINTS | 896 #define DUK_USE_BRANCH_HINTS |
888 #define DUK_LIKELY(x) __builtin_expect((x), 1) | 897 #define DUK_LIKELY(x) __builtin_expect((x), 1) |
889 #define DUK_UNLIKELY(x) __builtin_expect((x), 0) | 898 #define DUK_UNLIKELY(x) __builtin_expect((x), 0) |
899 #if defined(__clang__) && defined(__has_builtin) | |
900 #if __has_builtin(__builtin_unpredictable) | |
901 #define DUK_UNPREDICTABLE(x) __builtin_unpredictable((x)) | |
902 #endif | |
903 #endif | |
890 | 904 |
891 #if defined(DUK_F_C99) || defined(DUK_F_CPP11) | 905 #if defined(DUK_F_C99) || defined(DUK_F_CPP11) |
892 #define DUK_NOINLINE __attribute__((noinline)) | 906 #define DUK_NOINLINE __attribute__((noinline)) |
893 #define DUK_INLINE inline | 907 #define DUK_INLINE inline |
894 #define DUK_ALWAYS_INLINE inline __attribute__((always_inline)) | 908 #define DUK_ALWAYS_INLINE inline __attribute__((always_inline)) |
993 * because of bugs in gcc-4.4 (http://lists.debian.org/debian-gcc/2010/04/msg00000.html) | 1007 * because of bugs in gcc-4.4 (http://lists.debian.org/debian-gcc/2010/04/msg00000.html) |
994 */ | 1008 */ |
995 #define DUK_LIKELY(x) __builtin_expect((x), 1) | 1009 #define DUK_LIKELY(x) __builtin_expect((x), 1) |
996 #define DUK_UNLIKELY(x) __builtin_expect((x), 0) | 1010 #define DUK_UNLIKELY(x) __builtin_expect((x), 0) |
997 #endif | 1011 #endif |
1012 /* XXX: equivalent of clang __builtin_unpredictable? */ | |
998 | 1013 |
999 #if (defined(DUK_F_C99) || defined(DUK_F_CPP11)) && \ | 1014 #if (defined(DUK_F_C99) || defined(DUK_F_CPP11)) && \ |
1000 defined(DUK_F_GCC_VERSION) && (DUK_F_GCC_VERSION >= 30101) | 1015 defined(DUK_F_GCC_VERSION) && (DUK_F_GCC_VERSION >= 30101) |
1001 #define DUK_NOINLINE __attribute__((noinline)) | 1016 #define DUK_NOINLINE __attribute__((noinline)) |
1002 #define DUK_INLINE inline | 1017 #define DUK_INLINE inline |
1179 * http://stackoverflow.com/questions/2915672/snprintf-and-visual-studio-2010 | 1194 * http://stackoverflow.com/questions/2915672/snprintf-and-visual-studio-2010 |
1180 */ | 1195 */ |
1181 #define DUK_SNPRINTF _snprintf | 1196 #define DUK_SNPRINTF _snprintf |
1182 #define DUK_VSNPRINTF _vsnprintf | 1197 #define DUK_VSNPRINTF _vsnprintf |
1183 #endif | 1198 #endif |
1199 | |
1200 /* Avoid warning when doing DUK_UNREF(some_function). */ | |
1201 #define DUK_UNREF(x) do { __pragma(warning(suppress:4100 4101 4550 4551)) (x); } while (0) | |
1184 #elif defined(DUK_F_EMSCRIPTEN) | 1202 #elif defined(DUK_F_EMSCRIPTEN) |
1185 /* --- Emscripten --- */ | 1203 /* --- Emscripten --- */ |
1186 #define DUK_NORETURN(decl) decl __attribute__((noreturn)) | 1204 #define DUK_NORETURN(decl) decl __attribute__((noreturn)) |
1187 | 1205 |
1188 #if defined(__clang__) && defined(__has_builtin) | 1206 #if defined(__clang__) && defined(__has_builtin) |
1192 #endif | 1210 #endif |
1193 | 1211 |
1194 #define DUK_USE_BRANCH_HINTS | 1212 #define DUK_USE_BRANCH_HINTS |
1195 #define DUK_LIKELY(x) __builtin_expect((x), 1) | 1213 #define DUK_LIKELY(x) __builtin_expect((x), 1) |
1196 #define DUK_UNLIKELY(x) __builtin_expect((x), 0) | 1214 #define DUK_UNLIKELY(x) __builtin_expect((x), 0) |
1215 #if defined(__clang__) && defined(__has_builtin) | |
1216 #if __has_builtin(__builtin_unpredictable) | |
1217 #define DUK_UNPREDICTABLE(x) __builtin_unpredictable((x)) | |
1218 #endif | |
1219 #endif | |
1197 | 1220 |
1198 #if defined(DUK_F_C99) || defined(DUK_F_CPP11) | 1221 #if defined(DUK_F_C99) || defined(DUK_F_CPP11) |
1199 #define DUK_NOINLINE __attribute__((noinline)) | 1222 #define DUK_NOINLINE __attribute__((noinline)) |
1200 #define DUK_INLINE inline | 1223 #define DUK_INLINE inline |
1201 #define DUK_ALWAYS_INLINE inline __attribute__((always_inline)) | 1224 #define DUK_ALWAYS_INLINE inline __attribute__((always_inline)) |
1910 | 1933 |
1911 /* | 1934 /* |
1912 * Fill-ins for platform, architecture, and compiler | 1935 * Fill-ins for platform, architecture, and compiler |
1913 */ | 1936 */ |
1914 | 1937 |
1938 /* An abort()-like primitive is needed by the default fatal error handler. */ | |
1939 #if !defined(DUK_ABORT) | |
1940 #define DUK_ABORT abort | |
1941 #endif | |
1942 | |
1915 #if !defined(DUK_SETJMP) | 1943 #if !defined(DUK_SETJMP) |
1916 #define DUK_JMPBUF_TYPE jmp_buf | 1944 #define DUK_JMPBUF_TYPE jmp_buf |
1917 #define DUK_SETJMP(jb) setjmp((jb)) | 1945 #define DUK_SETJMP(jb) setjmp((jb)) |
1918 #define DUK_LONGJMP(jb) longjmp((jb), 1) | 1946 #define DUK_LONGJMP(jb) longjmp((jb), 1) |
1919 #endif | 1947 #endif |
1921 #if 0 | 1949 #if 0 |
1922 /* sigsetjmp() alternative */ | 1950 /* sigsetjmp() alternative */ |
1923 #define DUK_JMPBUF_TYPE sigjmp_buf | 1951 #define DUK_JMPBUF_TYPE sigjmp_buf |
1924 #define DUK_SETJMP(jb) sigsetjmp((jb)) | 1952 #define DUK_SETJMP(jb) sigsetjmp((jb)) |
1925 #define DUK_LONGJMP(jb) siglongjmp((jb), 1) | 1953 #define DUK_LONGJMP(jb) siglongjmp((jb), 1) |
1926 #endif | |
1927 | |
1928 typedef FILE duk_file; | |
1929 #if !defined(DUK_STDIN) | |
1930 #define DUK_STDIN stdin | |
1931 #endif | |
1932 #if !defined(DUK_STDOUT) | |
1933 #define DUK_STDOUT stdout | |
1934 #endif | |
1935 #if !defined(DUK_STDERR) | |
1936 #define DUK_STDERR stderr | |
1937 #endif | 1954 #endif |
1938 | 1955 |
1939 /* Special naming to avoid conflict with e.g. DUK_FREE() in duk_heap.h | 1956 /* Special naming to avoid conflict with e.g. DUK_FREE() in duk_heap.h |
1940 * (which is unfortunately named). May sometimes need replacement, e.g. | 1957 * (which is unfortunately named). May sometimes need replacement, e.g. |
1941 * some compilers don't handle zero length or NULL correctly in realloc(). | 1958 * some compilers don't handle zero length or NULL correctly in realloc(). |
2000 #define DUK_STRCMP strcmp | 2017 #define DUK_STRCMP strcmp |
2001 #endif | 2018 #endif |
2002 #if !defined(DUK_STRNCMP) | 2019 #if !defined(DUK_STRNCMP) |
2003 #define DUK_STRNCMP strncmp | 2020 #define DUK_STRNCMP strncmp |
2004 #endif | 2021 #endif |
2005 #if !defined(DUK_PRINTF) | |
2006 #define DUK_PRINTF printf | |
2007 #endif | |
2008 #if !defined(DUK_FPRINTF) | |
2009 #define DUK_FPRINTF fprintf | |
2010 #endif | |
2011 #if !defined(DUK_SPRINTF) | 2022 #if !defined(DUK_SPRINTF) |
2012 #define DUK_SPRINTF sprintf | 2023 #define DUK_SPRINTF sprintf |
2013 #endif | 2024 #endif |
2014 #if !defined(DUK_SNPRINTF) | 2025 #if !defined(DUK_SNPRINTF) |
2015 /* snprintf() is technically not part of C89 but usually available. */ | 2026 /* snprintf() is technically not part of C89 but usually available. */ |
2026 #define DUK_SSCANF sscanf | 2037 #define DUK_SSCANF sscanf |
2027 #endif | 2038 #endif |
2028 #if !defined(DUK_VSSCANF) | 2039 #if !defined(DUK_VSSCANF) |
2029 #define DUK_VSSCANF vsscanf | 2040 #define DUK_VSSCANF vsscanf |
2030 #endif | 2041 #endif |
2031 #if !defined(DUK_FOPEN) | |
2032 #define DUK_FOPEN fopen | |
2033 #endif | |
2034 #if !defined(DUK_FCLOSE) | |
2035 #define DUK_FCLOSE fclose | |
2036 #endif | |
2037 #if !defined(DUK_FREAD) | |
2038 #define DUK_FREAD fread | |
2039 #endif | |
2040 #if !defined(DUK_FWRITE) | |
2041 #define DUK_FWRITE fwrite | |
2042 #endif | |
2043 #if !defined(DUK_FSEEK) | |
2044 #define DUK_FSEEK fseek | |
2045 #endif | |
2046 #if !defined(DUK_FTELL) | |
2047 #define DUK_FTELL ftell | |
2048 #endif | |
2049 #if !defined(DUK_FFLUSH) | |
2050 #define DUK_FFLUSH fflush | |
2051 #endif | |
2052 #if !defined(DUK_FPUTC) | |
2053 #define DUK_FPUTC fputc | |
2054 #endif | |
2055 #if !defined(DUK_MEMZERO) | 2042 #if !defined(DUK_MEMZERO) |
2056 #define DUK_MEMZERO(p,n) DUK_MEMSET((p), 0, (n)) | 2043 #define DUK_MEMZERO(p,n) DUK_MEMSET((p), 0, (n)) |
2057 #endif | |
2058 #if !defined(DUK_ABORT) | |
2059 #define DUK_ABORT abort | |
2060 #endif | |
2061 #if !defined(DUK_EXIT) | |
2062 #define DUK_EXIT exit | |
2063 #endif | |
2064 | |
2065 #if !defined(DUK_DOUBLE_2TO32) | |
2066 #define DUK_DOUBLE_2TO32 4294967296.0 | |
2067 #endif | |
2068 #if !defined(DUK_DOUBLE_2TO31) | |
2069 #define DUK_DOUBLE_2TO31 2147483648.0 | |
2070 #endif | 2044 #endif |
2071 | 2045 |
2072 #if !defined(DUK_DOUBLE_INFINITY) | 2046 #if !defined(DUK_DOUBLE_INFINITY) |
2073 #undef DUK_USE_COMPUTED_INFINITY | 2047 #undef DUK_USE_COMPUTED_INFINITY |
2074 #if defined(DUK_F_GCC_VERSION) && (DUK_F_GCC_VERSION < 40600) | 2048 #if defined(DUK_F_GCC_VERSION) && (DUK_F_GCC_VERSION < 40600) |
2174 | 2148 |
2175 #if defined(DUK_F_USE_REPL_ALL) | 2149 #if defined(DUK_F_USE_REPL_ALL) |
2176 #undef DUK_F_USE_REPL_ALL | 2150 #undef DUK_F_USE_REPL_ALL |
2177 #endif | 2151 #endif |
2178 | 2152 |
2179 /* Some math functions are C99 only. This is also an issue with some | |
2180 * embedded environments using uclibc where uclibc has been configured | |
2181 * not to provide some functions. For now, use replacements whenever | |
2182 * using uclibc. | |
2183 */ | |
2184 #undef DUK_USE_MATH_FMIN | |
2185 #undef DUK_USE_MATH_FMAX | |
2186 #undef DUK_USE_MATH_ROUND | |
2187 #if defined(DUK_F_UCLIBC) | |
2188 /* uclibc may be missing these */ | |
2189 #elif defined(DUK_F_AMIGAOS) && defined(DUK_F_VBCC) | |
2190 /* vbcc + AmigaOS may be missing these */ | |
2191 #elif defined(DUK_F_MINT) | |
2192 /* mint clib is missing these */ | |
2193 #elif !defined(DUK_F_C99) && !defined(DUK_F_CPP11) | |
2194 /* build is not C99 or C++11, play it safe */ | |
2195 #else | |
2196 /* C99 or C++11, no known issues */ | |
2197 #define DUK_USE_MATH_FMIN | |
2198 #define DUK_USE_MATH_FMAX | |
2199 #define DUK_USE_MATH_ROUND | |
2200 #endif | |
2201 | |
2202 /* These functions don't currently need replacement but are wrapped for | 2153 /* These functions don't currently need replacement but are wrapped for |
2203 * completeness. Because these are used as function pointers, they need | 2154 * completeness. Because these are used as function pointers, they need |
2204 * to be defined as concrete C functions (not macros). | 2155 * to be defined as concrete C functions (not macros). |
2205 */ | 2156 */ |
2206 #if !defined(DUK_FABS) | 2157 #if !defined(DUK_FABS) |
2207 #define DUK_FABS fabs | 2158 #define DUK_FABS fabs |
2208 #endif | 2159 #endif |
2209 #if !defined(DUK_FMIN) | |
2210 #define DUK_FMIN fmin | |
2211 #endif | |
2212 #if !defined(DUK_FMAX) | |
2213 #define DUK_FMAX fmax | |
2214 #endif | |
2215 #if !defined(DUK_FLOOR) | 2160 #if !defined(DUK_FLOOR) |
2216 #define DUK_FLOOR floor | 2161 #define DUK_FLOOR floor |
2217 #endif | 2162 #endif |
2218 #if !defined(DUK_CEIL) | 2163 #if !defined(DUK_CEIL) |
2219 #define DUK_CEIL ceil | 2164 #define DUK_CEIL ceil |
2253 #endif | 2198 #endif |
2254 #if !defined(DUK_SQRT) | 2199 #if !defined(DUK_SQRT) |
2255 #define DUK_SQRT sqrt | 2200 #define DUK_SQRT sqrt |
2256 #endif | 2201 #endif |
2257 | 2202 |
2203 /* The functions below exist only in C99/C++11 or later and need a workaround | |
2204 * for platforms that don't include them. MSVC isn't detected as C99, but | |
2205 * these functions also exist in MSVC 2013 and later so include a clause for | |
2206 * that too. | |
2207 */ | |
2208 #if defined(DUK_F_C99) || defined(DUK_F_CPP11) || (defined(_MSC_VER) && (_MSC_VER >= 1800)) | |
2209 #if !defined(DUK_CBRT) | |
2210 #define DUK_CBRT cbrt | |
2211 #endif | |
2212 #if !defined(DUK_LOG2) | |
2213 #define DUK_LOG2 log2 | |
2214 #endif | |
2215 #if !defined(DUK_LOG10) | |
2216 #define DUK_LOG10 log10 | |
2217 #endif | |
2218 #if !defined(DUK_TRUNC) | |
2219 #define DUK_TRUNC trunc | |
2220 #endif | |
2221 #endif /* DUK_F_C99 */ | |
2222 | |
2258 /* NetBSD 6.0 x86 (at least) has a few problems with pow() semantics, | 2223 /* NetBSD 6.0 x86 (at least) has a few problems with pow() semantics, |
2259 * see test-bug-netbsd-math-pow.js. Use NetBSD specific workaround. | 2224 * see test-bug-netbsd-math-pow.js. MinGW has similar (but different) |
2260 * (This might be a wider problem; if so, generalize the define name.) | 2225 * issues, see test-bug-mingw-math-issues.js. Enable pow() workarounds |
2261 */ | 2226 * for these targets. |
2262 #undef DUK_USE_POW_NETBSD_WORKAROUND | 2227 */ |
2263 #if defined(DUK_F_NETBSD) | 2228 #undef DUK_USE_POW_WORKAROUNDS |
2264 #define DUK_USE_POW_NETBSD_WORKAROUND | 2229 #if defined(DUK_F_NETBSD) || defined(DUK_F_MINGW) |
2230 #define DUK_USE_POW_WORKAROUNDS | |
2231 #endif | |
2232 | |
2233 /* Similar workarounds for atan2() semantics issues. MinGW issues are | |
2234 * documented in test-bug-mingw-math-issues.js. | |
2235 */ | |
2236 #undef DUK_USE_ATAN2_WORKAROUNDS | |
2237 #if defined(DUK_F_MINGW) | |
2238 #define DUK_USE_ATAN2_WORKAROUNDS | |
2265 #endif | 2239 #endif |
2266 | 2240 |
2267 /* Rely as little as possible on compiler behavior for NaN comparison, | 2241 /* Rely as little as possible on compiler behavior for NaN comparison, |
2268 * signed zero handling, etc. Currently never activated but may be needed | 2242 * signed zero handling, etc. Currently never activated but may be needed |
2269 * for broken compilers. | 2243 * for broken compilers. |
2302 * for a hybrid used by some ARM machines where integers are little endian | 2276 * for a hybrid used by some ARM machines where integers are little endian |
2303 * but IEEE double values use a mixed order (12345678 -> 43218765). This | 2277 * but IEEE double values use a mixed order (12345678 -> 43218765). This |
2304 * byte order for doubles is referred to as "mixed endian". | 2278 * byte order for doubles is referred to as "mixed endian". |
2305 */ | 2279 */ |
2306 | 2280 |
2307 /* For custom platforms allow user to define byteorder explicitly. | |
2308 * Since endianness headers are not standardized, this is a useful | |
2309 * workaround for custom platforms for which endianness detection | |
2310 * is not directly supported. Perhaps custom hardware is used and | |
2311 * user cannot submit upstream patches. | |
2312 */ | |
2313 #if defined(DUK_OPT_FORCE_BYTEORDER) | |
2314 #undef DUK_USE_BYTEORDER | |
2315 #if (DUK_OPT_FORCE_BYTEORDER == 1) | |
2316 #define DUK_USE_BYTEORDER 1 | |
2317 #elif (DUK_OPT_FORCE_BYTEORDER == 2) | |
2318 #define DUK_USE_BYTEORDER 2 | |
2319 #elif (DUK_OPT_FORCE_BYTEORDER == 3) | |
2320 #define DUK_USE_BYTEORDER 3 | |
2321 #else | |
2322 #error invalid DUK_OPT_FORCE_BYTEORDER value | |
2323 #endif | |
2324 #endif /* DUK_OPT_FORCE_BYTEORDER */ | |
2325 | |
2326 /* GCC and Clang provide endianness defines as built-in predefines, with | 2281 /* GCC and Clang provide endianness defines as built-in predefines, with |
2327 * leading and trailing double underscores (e.g. __BYTE_ORDER__). See | 2282 * leading and trailing double underscores (e.g. __BYTE_ORDER__). See |
2328 * output of "make gccpredefs" and "make clangpredefs". Clang doesn't | 2283 * output of "make gccpredefs" and "make clangpredefs". Clang doesn't |
2329 * seem to provide __FLOAT_WORD_ORDER__; assume not mixed endian for clang. | 2284 * seem to provide __FLOAT_WORD_ORDER__; assume not mixed endian for clang. |
2330 * http://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html | 2285 * http://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html |
2423 /* If not provided, use safe default for alignment. */ | 2378 /* If not provided, use safe default for alignment. */ |
2424 #if !defined(DUK_USE_ALIGN_BY) | 2379 #if !defined(DUK_USE_ALIGN_BY) |
2425 #define DUK_USE_ALIGN_BY 8 | 2380 #define DUK_USE_ALIGN_BY 8 |
2426 #endif | 2381 #endif |
2427 | 2382 |
2428 /* User forced alignment to 4 or 8. */ | |
2429 #if defined(DUK_OPT_FORCE_ALIGN) | |
2430 #undef DUK_USE_ALIGN_BY | |
2431 #if (DUK_OPT_FORCE_ALIGN == 4) | |
2432 #define DUK_USE_ALIGN_BY 4 | |
2433 #elif (DUK_OPT_FORCE_ALIGN == 8) | |
2434 #define DUK_USE_ALIGN_BY 8 | |
2435 #else | |
2436 #error invalid DUK_OPT_FORCE_ALIGN value | |
2437 #endif | |
2438 #endif | |
2439 | |
2440 /* Compiler specific hackery needed to force struct size to match aligment, | 2383 /* Compiler specific hackery needed to force struct size to match aligment, |
2441 * see e.g. duk_hbuffer.h. | 2384 * see e.g. duk_hbuffer.h. |
2442 * | 2385 * |
2443 * http://stackoverflow.com/questions/11130109/c-struct-size-alignment | 2386 * http://stackoverflow.com/questions/11130109/c-struct-size-alignment |
2444 * http://stackoverflow.com/questions/10951039/specifying-64-bit-alignment | 2387 * http://stackoverflow.com/questions/10951039/specifying-64-bit-alignment |
2477 #define DUK_MACRO_STRINGIFY_HELPER(x) #x | 2420 #define DUK_MACRO_STRINGIFY_HELPER(x) #x |
2478 #define DUK_MACRO_STRINGIFY(x) DUK_MACRO_STRINGIFY_HELPER(x) | 2421 #define DUK_MACRO_STRINGIFY(x) DUK_MACRO_STRINGIFY_HELPER(x) |
2479 #endif | 2422 #endif |
2480 | 2423 |
2481 #if !defined(DUK_CAUSE_SEGFAULT) | 2424 #if !defined(DUK_CAUSE_SEGFAULT) |
2482 /* This is optionally used by panic handling to cause the program to segfault | 2425 /* This can be used for testing; valgrind will then indicate the C call stack |
2483 * (instead of e.g. abort()) on panic. Valgrind will then indicate the C | 2426 * leading to the call site. |
2484 * call stack leading to the panic. | |
2485 */ | 2427 */ |
2486 #define DUK_CAUSE_SEGFAULT() do { *((volatile duk_uint32_t *) NULL) = (duk_uint32_t) 0xdeadbeefUL; } while (0) | 2428 #define DUK_CAUSE_SEGFAULT() do { *((volatile duk_uint32_t *) NULL) = (duk_uint32_t) 0xdeadbeefUL; } while (0) |
2487 #endif | 2429 #endif |
2488 #if !defined(DUK_UNREF) | 2430 #if !defined(DUK_UNREF) |
2489 /* Macro for suppressing warnings for potentially unreferenced variables. | 2431 /* Macro for suppressing warnings for potentially unreferenced variables. |
2514 #if !defined(DUK_LIKELY) | 2456 #if !defined(DUK_LIKELY) |
2515 #define DUK_LIKELY(x) (x) | 2457 #define DUK_LIKELY(x) (x) |
2516 #endif | 2458 #endif |
2517 #if !defined(DUK_UNLIKELY) | 2459 #if !defined(DUK_UNLIKELY) |
2518 #define DUK_UNLIKELY(x) (x) | 2460 #define DUK_UNLIKELY(x) (x) |
2461 #endif | |
2462 #if !defined(DUK_UNPREDICTABLE) | |
2463 #define DUK_UNPREDICTABLE(x) (x) | |
2519 #endif | 2464 #endif |
2520 | 2465 |
2521 #if !defined(DUK_NOINLINE) | 2466 #if !defined(DUK_NOINLINE) |
2522 #define DUK_NOINLINE /*nop*/ | 2467 #define DUK_NOINLINE /*nop*/ |
2523 #endif | 2468 #endif |
2654 #define DUK_USE_PACKED_TVAL | 2599 #define DUK_USE_PACKED_TVAL |
2655 #endif | 2600 #endif |
2656 | 2601 |
2657 #undef DUK_F_PACKED_TVAL_POSSIBLE | 2602 #undef DUK_F_PACKED_TVAL_POSSIBLE |
2658 #endif /* DUK_F_PACKED_TVAL_PROVIDED */ | 2603 #endif /* DUK_F_PACKED_TVAL_PROVIDED */ |
2659 | |
2660 /* Feature option forcing. */ | |
2661 #if defined(DUK_OPT_NO_PACKED_TVAL) | |
2662 #undef DUK_USE_PACKED_TVAL | |
2663 #elif defined(DUK_OPT_PACKED_TVAL) | |
2664 #undef DUK_USE_PACKED_TVAL | |
2665 #define DUK_USE_PACKED_TVAL | |
2666 #endif | |
2667 /* Object property allocation layout has implications for memory and code | 2604 /* Object property allocation layout has implications for memory and code |
2668 * footprint and generated code size/speed. The best layout also depends | 2605 * footprint and generated code size/speed. The best layout also depends |
2669 * on whether the platform has alignment requirements or benefits from | 2606 * on whether the platform has alignment requirements or benefits from |
2670 * having mostly aligned accesses. | 2607 * having mostly aligned accesses. |
2671 */ | 2608 */ |
2692 #if defined(__FAST_MATH__) | 2629 #if defined(__FAST_MATH__) |
2693 #error __FAST_MATH__ defined, refusing to compile | 2630 #error __FAST_MATH__ defined, refusing to compile |
2694 #endif | 2631 #endif |
2695 | 2632 |
2696 /* | 2633 /* |
2697 * Feature option handling | 2634 * Autogenerated defaults |
2698 */ | 2635 */ |
2699 | 2636 |
2700 #if !defined(DUK_USE_ALIGN_BY) | 2637 #define DUK_USE_ARRAY_BUILTIN |
2701 #if defined(DUK_OPT_FORCE_ALIGN) | 2638 #define DUK_USE_ARRAY_FASTPATH |
2702 #define DUK_USE_ALIGN_BY DUK_OPT_FORCE_ALIGN | 2639 #define DUK_USE_ARRAY_PROP_FASTPATH |
2703 #else | |
2704 #define DUK_USE_ALIGN_BY 8 | |
2705 #endif | |
2706 #endif | |
2707 | |
2708 #if defined(DUK_OPT_ASSERTIONS) | |
2709 #define DUK_USE_ASSERTIONS | |
2710 #elif defined(DUK_OPT_NO_ASSERTIONS) | |
2711 #undef DUK_USE_ASSERTIONS | 2640 #undef DUK_USE_ASSERTIONS |
2712 #else | |
2713 #undef DUK_USE_ASSERTIONS | |
2714 #endif | |
2715 | |
2716 #if defined(DUK_OPT_AUGMENT_ERRORS) | |
2717 #define DUK_USE_AUGMENT_ERROR_CREATE | 2641 #define DUK_USE_AUGMENT_ERROR_CREATE |
2718 #elif defined(DUK_OPT_NO_AUGMENT_ERRORS) | |
2719 #undef DUK_USE_AUGMENT_ERROR_CREATE | |
2720 #else | |
2721 #define DUK_USE_AUGMENT_ERROR_CREATE | |
2722 #endif | |
2723 | |
2724 #if defined(DUK_OPT_AUGMENT_ERRORS) | |
2725 #define DUK_USE_AUGMENT_ERROR_THROW | 2642 #define DUK_USE_AUGMENT_ERROR_THROW |
2726 #elif defined(DUK_OPT_NO_AUGMENT_ERRORS) | |
2727 #undef DUK_USE_AUGMENT_ERROR_THROW | |
2728 #else | |
2729 #define DUK_USE_AUGMENT_ERROR_THROW | |
2730 #endif | |
2731 | |
2732 #if defined(DUK_OPT_BROWSER_LIKE) | |
2733 #define DUK_USE_BROWSER_LIKE | |
2734 #elif defined(DUK_OPT_NO_BROWSER_LIKE) | |
2735 #undef DUK_USE_BROWSER_LIKE | |
2736 #else | |
2737 #define DUK_USE_BROWSER_LIKE | |
2738 #endif | |
2739 | |
2740 #if defined(DUK_OPT_BUFFEROBJECT_SUPPORT) | |
2741 #define DUK_USE_BUFFEROBJECT_SUPPORT | |
2742 #elif defined(DUK_OPT_NO_BUFFEROBJECT_SUPPORT) | |
2743 #undef DUK_USE_BUFFEROBJECT_SUPPORT | |
2744 #else | |
2745 #define DUK_USE_BUFFEROBJECT_SUPPORT | |
2746 #endif | |
2747 | |
2748 #if defined(DUK_OPT_BUFLEN16) | |
2749 #define DUK_USE_BUFLEN16 | |
2750 #elif defined(DUK_OPT_NO_BUFLEN16) | |
2751 #undef DUK_USE_BUFLEN16 | |
2752 #else | |
2753 #undef DUK_USE_BUFLEN16 | |
2754 #endif | |
2755 | |
2756 #if defined(DUK_OPT_BYTECODE_DUMP_SUPPORT) | |
2757 #define DUK_USE_BYTECODE_DUMP_SUPPORT | |
2758 #elif defined(DUK_OPT_NO_BYTECODE_DUMP_SUPPORT) | |
2759 #undef DUK_USE_BYTECODE_DUMP_SUPPORT | |
2760 #else | |
2761 #define DUK_USE_BYTECODE_DUMP_SUPPORT | |
2762 #endif | |
2763 | |
2764 #if defined(DUK_OPT_COMMONJS_MODULES) | |
2765 #define DUK_USE_COMMONJS_MODULES | |
2766 #elif defined(DUK_OPT_NO_COMMONJS_MODULES) | |
2767 #undef DUK_USE_COMMONJS_MODULES | |
2768 #else | |
2769 #define DUK_USE_COMMONJS_MODULES | |
2770 #endif | |
2771 | |
2772 #if defined(DUK_OPT_CPP_EXCEPTIONS) | |
2773 #define DUK_USE_CPP_EXCEPTIONS | |
2774 #elif defined(DUK_OPT_NO_CPP_EXCEPTIONS) | |
2775 #undef DUK_USE_CPP_EXCEPTIONS | |
2776 #else | |
2777 #undef DUK_USE_CPP_EXCEPTIONS | |
2778 #endif | |
2779 | |
2780 #if defined(DUK_OPT_DATAPTR16) | |
2781 #define DUK_USE_DATAPTR16 | |
2782 #elif defined(DUK_OPT_NO_DATAPTR16) | |
2783 #undef DUK_USE_DATAPTR16 | |
2784 #else | |
2785 #undef DUK_USE_DATAPTR16 | |
2786 #endif | |
2787 | |
2788 #if defined(DUK_OPT_DATAPTR_DEC16) | |
2789 #define DUK_USE_DATAPTR_DEC16(udata,ptr) DUK_OPT_DATAPTR_DEC16((udata),(ptr)) | |
2790 #else | |
2791 #undef DUK_USE_DATAPTR_DEC16 | |
2792 #endif | |
2793 | |
2794 #if defined(DUK_OPT_DATAPTR_ENC16) | |
2795 #define DUK_USE_DATAPTR_ENC16(udata,ptr) DUK_OPT_DATAPTR_ENC16((udata),(ptr)) | |
2796 #else | |
2797 #undef DUK_USE_DATAPTR_ENC16 | |
2798 #endif | |
2799 | |
2800 #if defined(DUK_OPT_DDDPRINT) | |
2801 #define DUK_USE_DDDPRINT | |
2802 #elif defined(DUK_OPT_NO_DDDPRINT) | |
2803 #undef DUK_USE_DDDPRINT | |
2804 #else | |
2805 #undef DUK_USE_DDDPRINT | |
2806 #endif | |
2807 | |
2808 #if defined(DUK_OPT_DDPRINT) | |
2809 #define DUK_USE_DDPRINT | |
2810 #elif defined(DUK_OPT_NO_DDPRINT) | |
2811 #undef DUK_USE_DDPRINT | |
2812 #else | |
2813 #undef DUK_USE_DDPRINT | |
2814 #endif | |
2815 | |
2816 #if defined(DUK_OPT_DEBUG) | |
2817 #define DUK_USE_DEBUG | |
2818 #elif defined(DUK_OPT_NO_DEBUG) | |
2819 #undef DUK_USE_DEBUG | |
2820 #else | |
2821 #undef DUK_USE_DEBUG | |
2822 #endif | |
2823 | |
2824 #if defined(DUK_OPT_DEBUGGER_DUMPHEAP) | |
2825 #define DUK_USE_DEBUGGER_DUMPHEAP | |
2826 #elif defined(DUK_OPT_NO_DEBUGGER_DUMPHEAP) | |
2827 #undef DUK_USE_DEBUGGER_DUMPHEAP | |
2828 #else | |
2829 #undef DUK_USE_DEBUGGER_DUMPHEAP | |
2830 #endif | |
2831 | |
2832 #if defined(DUK_OPT_DEBUGGER_FWD_LOGGING) | |
2833 #define DUK_USE_DEBUGGER_FWD_LOGGING | |
2834 #elif defined(DUK_OPT_NO_DEBUGGER_FWD_LOGGING) | |
2835 #undef DUK_USE_DEBUGGER_FWD_LOGGING | |
2836 #else | |
2837 #undef DUK_USE_DEBUGGER_FWD_LOGGING | |
2838 #endif | |
2839 | |
2840 #if defined(DUK_OPT_DEBUGGER_FWD_PRINTALERT) | |
2841 #define DUK_USE_DEBUGGER_FWD_PRINTALERT | |
2842 #elif defined(DUK_OPT_NO_DEBUGGER_FWD_PRINTALERT) | |
2843 #undef DUK_USE_DEBUGGER_FWD_PRINTALERT | |
2844 #else | |
2845 #undef DUK_USE_DEBUGGER_FWD_PRINTALERT | |
2846 #endif | |
2847 | |
2848 #if defined(DUK_OPT_DEBUGGER_INSPECT) | |
2849 #define DUK_USE_DEBUGGER_INSPECT | |
2850 #elif defined(DUK_OPT_NO_DEBUGGER_INSPECT) | |
2851 #undef DUK_USE_DEBUGGER_INSPECT | |
2852 #else | |
2853 #undef DUK_USE_DEBUGGER_INSPECT | |
2854 #endif | |
2855 | |
2856 #if defined(DUK_OPT_DEBUGGER_PAUSE_UNCAUGHT) | |
2857 #define DUK_USE_DEBUGGER_PAUSE_UNCAUGHT | |
2858 #elif defined(DUK_OPT_NO_DEBUGGER_PAUSE_UNCAUGHT) | |
2859 #undef DUK_USE_DEBUGGER_PAUSE_UNCAUGHT | |
2860 #else | |
2861 #undef DUK_USE_DEBUGGER_PAUSE_UNCAUGHT | |
2862 #endif | |
2863 | |
2864 #if defined(DUK_OPT_DEBUGGER_SUPPORT) | |
2865 #define DUK_USE_DEBUGGER_SUPPORT | |
2866 #elif defined(DUK_OPT_NO_DEBUGGER_SUPPORT) | |
2867 #undef DUK_USE_DEBUGGER_SUPPORT | |
2868 #else | |
2869 #undef DUK_USE_DEBUGGER_SUPPORT | |
2870 #endif | |
2871 | |
2872 #if defined(DUK_OPT_DEBUGGER_THROW_NOTIFY) | |
2873 #define DUK_USE_DEBUGGER_THROW_NOTIFY | |
2874 #elif defined(DUK_OPT_NO_DEBUGGER_THROW_NOTIFY) | |
2875 #undef DUK_USE_DEBUGGER_THROW_NOTIFY | |
2876 #else | |
2877 #define DUK_USE_DEBUGGER_THROW_NOTIFY | |
2878 #endif | |
2879 | |
2880 #if defined(DUK_OPT_DEBUGGER_TRANSPORT_TORTURE) | |
2881 #define DUK_USE_DEBUGGER_TRANSPORT_TORTURE | |
2882 #elif defined(DUK_OPT_NO_DEBUGGER_TRANSPORT_TORTURE) | |
2883 #undef DUK_USE_DEBUGGER_TRANSPORT_TORTURE | |
2884 #else | |
2885 #undef DUK_USE_DEBUGGER_TRANSPORT_TORTURE | |
2886 #endif | |
2887 | |
2888 #if defined(DUK_OPT_DEBUG_BUFSIZE) | |
2889 #define DUK_USE_DEBUG_BUFSIZE DUK_OPT_DEBUG_BUFSIZE | |
2890 #else | |
2891 #define DUK_USE_DEBUG_BUFSIZE 65536L | |
2892 #endif | |
2893 | |
2894 #if defined(DUK_OPT_REFERENCE_COUNTING) | |
2895 #define DUK_USE_DOUBLE_LINKED_HEAP | |
2896 #elif defined(DUK_OPT_NO_REFERENCE_COUNTING) | |
2897 #undef DUK_USE_DOUBLE_LINKED_HEAP | |
2898 #else | |
2899 #define DUK_USE_DOUBLE_LINKED_HEAP | |
2900 #endif | |
2901 | |
2902 #if defined(DUK_OPT_DPRINT) | |
2903 #define DUK_USE_DPRINT | |
2904 #elif defined(DUK_OPT_NO_DPRINT) | |
2905 #undef DUK_USE_DPRINT | |
2906 #else | |
2907 #undef DUK_USE_DPRINT | |
2908 #endif | |
2909 | |
2910 #if defined(DUK_OPT_DPRINT_COLORS) | |
2911 #define DUK_USE_DPRINT_COLORS | |
2912 #elif defined(DUK_OPT_NO_DPRINT_COLORS) | |
2913 #undef DUK_USE_DPRINT_COLORS | |
2914 #else | |
2915 #undef DUK_USE_DPRINT_COLORS | |
2916 #endif | |
2917 | |
2918 #if defined(DUK_OPT_DPRINT_RDTSC) | |
2919 #define DUK_USE_DPRINT_RDTSC | |
2920 #elif defined(DUK_OPT_NO_DPRINT_RDTSC) | |
2921 #undef DUK_USE_DPRINT_RDTSC | |
2922 #else | |
2923 #undef DUK_USE_DPRINT_RDTSC | |
2924 #endif | |
2925 | |
2926 #if defined(DUK_OPT_AUGMENT_ERRORS) | |
2927 #define DUK_USE_ERRCREATE | |
2928 #elif defined(DUK_OPT_NO_AUGMENT_ERRORS) | |
2929 #undef DUK_USE_ERRCREATE | |
2930 #else | |
2931 #define DUK_USE_ERRCREATE | |
2932 #endif | |
2933 | |
2934 #if defined(DUK_OPT_AUGMENT_ERRORS) | |
2935 #define DUK_USE_ERRTHROW | |
2936 #elif defined(DUK_OPT_NO_AUGMENT_ERRORS) | |
2937 #undef DUK_USE_ERRTHROW | |
2938 #else | |
2939 #define DUK_USE_ERRTHROW | |
2940 #endif | |
2941 | |
2942 #if defined(DUK_OPT_ES6_OBJECT_PROTO_PROPERTY) | |
2943 #define DUK_USE_ES6_OBJECT_PROTO_PROPERTY | |
2944 #elif defined(DUK_OPT_NO_ES6_OBJECT_PROTO_PROPERTY) | |
2945 #undef DUK_USE_ES6_OBJECT_PROTO_PROPERTY | |
2946 #else | |
2947 #define DUK_USE_ES6_OBJECT_PROTO_PROPERTY | |
2948 #endif | |
2949 | |
2950 #if defined(DUK_OPT_ES6_OBJECT_SETPROTOTYPEOF) | |
2951 #define DUK_USE_ES6_OBJECT_SETPROTOTYPEOF | |
2952 #elif defined(DUK_OPT_NO_ES6_OBJECT_SETPROTOTYPEOF) | |
2953 #undef DUK_USE_ES6_OBJECT_SETPROTOTYPEOF | |
2954 #else | |
2955 #define DUK_USE_ES6_OBJECT_SETPROTOTYPEOF | |
2956 #endif | |
2957 | |
2958 #if defined(DUK_OPT_ES6_PROXY) | |
2959 #define DUK_USE_ES6_PROXY | |
2960 #elif defined(DUK_OPT_NO_ES6_PROXY) | |
2961 #undef DUK_USE_ES6_PROXY | |
2962 #else | |
2963 #define DUK_USE_ES6_PROXY | |
2964 #endif | |
2965 | |
2966 #if defined(DUK_OPT_ES6_REGEXP_BRACES) | |
2967 #define DUK_USE_ES6_REGEXP_BRACES | |
2968 #elif defined(DUK_OPT_NO_ES6_REGEXP_BRACES) | |
2969 #undef DUK_USE_ES6_REGEXP_BRACES | |
2970 #else | |
2971 #define DUK_USE_ES6_REGEXP_BRACES | |
2972 #endif | |
2973 | |
2974 #undef DUK_USE_EXEC_INDIRECT_BOUND_CHECK | |
2975 #if defined(DUK_OPT_DEBUG) || defined(DUK_OPT_ASSERTIONS) | |
2976 /* Enabled with debug/assertions just so that any issues can be caught. */ | |
2977 #define DUK_USE_EXEC_INDIRECT_BOUND_CHECK | |
2978 #endif | |
2979 | |
2980 #undef DUK_USE_EXEC_TIMEOUT_CHECK | |
2981 #if defined(DUK_OPT_EXEC_TIMEOUT_CHECK) | |
2982 #define DUK_USE_EXEC_TIMEOUT_CHECK(udata) DUK_OPT_EXEC_TIMEOUT_CHECK((udata)) | |
2983 #endif | |
2984 | |
2985 #undef DUK_USE_EXTSTR_FREE | |
2986 #if defined(DUK_OPT_EXTERNAL_STRINGS) && defined(DUK_OPT_EXTSTR_FREE) | |
2987 #define DUK_USE_EXTSTR_FREE(udata,ptr) DUK_OPT_EXTSTR_FREE((udata), (ptr)) | |
2988 #endif | |
2989 | |
2990 #undef DUK_USE_EXTSTR_INTERN_CHECK | |
2991 #if defined(DUK_OPT_EXTERNAL_STRINGS) && defined(DUK_OPT_EXTSTR_INTERN_CHECK) | |
2992 #define DUK_USE_EXTSTR_INTERN_CHECK(udata,ptr,len) DUK_OPT_EXTSTR_INTERN_CHECK((udata), (ptr), (len)) | |
2993 #endif | |
2994 | |
2995 /* Support for 48-bit signed integer duk_tval with transparent semantics. */ | |
2996 #undef DUK_USE_FASTINT | |
2997 #if defined(DUK_OPT_FASTINT) | |
2998 #if !defined(DUK_F_HAVE_64BIT) | |
2999 #error DUK_OPT_FASTINT requires 64-bit integer type support at the moment | |
3000 #endif | |
3001 #define DUK_USE_FASTINT | |
3002 #endif | |
3003 | |
3004 #if defined(DUK_OPT_FILE_IO) | |
3005 #define DUK_USE_FILE_IO | |
3006 #elif defined(DUK_OPT_NO_FILE_IO) | |
3007 #undef DUK_USE_FILE_IO | |
3008 #else | |
3009 #define DUK_USE_FILE_IO | |
3010 #endif | |
3011 | |
3012 #if defined(DUK_OPT_FUNCPTR16) | |
3013 #define DUK_USE_FUNCPTR16 | |
3014 #elif defined(DUK_OPT_NO_FUNCPTR16) | |
3015 #undef DUK_USE_FUNCPTR16 | |
3016 #else | |
3017 #undef DUK_USE_FUNCPTR16 | |
3018 #endif | |
3019 | |
3020 #if defined(DUK_OPT_FUNCPTR_DEC16) | |
3021 #define DUK_USE_FUNCPTR_DEC16(udata,ptr) DUK_OPT_FUNCPTR_DEC16((udata),(ptr)) | |
3022 #else | |
3023 #undef DUK_USE_FUNCPTR_DEC16 | |
3024 #endif | |
3025 | |
3026 #if defined(DUK_OPT_FUNCPTR_ENC16) | |
3027 #define DUK_USE_FUNCPTR_ENC16(udata,ptr) DUK_OPT_FUNCPTR_ENC16((udata),(ptr)) | |
3028 #else | |
3029 #undef DUK_USE_FUNCPTR_ENC16 | |
3030 #endif | |
3031 | |
3032 #if defined(DUK_OPT_GC_TORTURE) | |
3033 #define DUK_USE_GC_TORTURE | |
3034 #elif defined(DUK_OPT_NO_GC_TORTURE) | |
3035 #undef DUK_USE_GC_TORTURE | |
3036 #else | |
3037 #undef DUK_USE_GC_TORTURE | |
3038 #endif | |
3039 | |
3040 #if defined(DUK_OPT_HEAPPTR16) | |
3041 #define DUK_USE_HEAPPTR16 | |
3042 #elif defined(DUK_OPT_NO_HEAPPTR16) | |
3043 #undef DUK_USE_HEAPPTR16 | |
3044 #else | |
3045 #undef DUK_USE_HEAPPTR16 | |
3046 #endif | |
3047 | |
3048 #if defined(DUK_OPT_HEAPPTR_DEC16) | |
3049 #define DUK_USE_HEAPPTR_DEC16(udata,ptr) DUK_OPT_HEAPPTR_DEC16((udata),(ptr)) | |
3050 #else | |
3051 #undef DUK_USE_HEAPPTR_DEC16 | |
3052 #endif | |
3053 | |
3054 #if defined(DUK_OPT_HEAPPTR_ENC16) | |
3055 #define DUK_USE_HEAPPTR_ENC16(udata,ptr) DUK_OPT_HEAPPTR_ENC16((udata),(ptr)) | |
3056 #else | |
3057 #undef DUK_USE_HEAPPTR_ENC16 | |
3058 #endif | |
3059 | |
3060 /* For now, hash part is dropped if and only if 16-bit object fields are used. */ | |
3061 #define DUK_USE_HOBJECT_HASH_PART | |
3062 #if defined(DUK_OPT_OBJSIZES16) | |
3063 #undef DUK_USE_HOBJECT_HASH_PART | |
3064 #endif | |
3065 | |
3066 #if defined(DUK_OPT_HSTRING_CLEN) | |
3067 #define DUK_USE_HSTRING_CLEN | |
3068 #elif defined(DUK_OPT_NO_HSTRING_CLEN) | |
3069 #undef DUK_USE_HSTRING_CLEN | |
3070 #else | |
3071 #define DUK_USE_HSTRING_CLEN | |
3072 #endif | |
3073 | |
3074 #if defined(DUK_OPT_EXTERNAL_STRINGS) | |
3075 #define DUK_USE_HSTRING_EXTDATA | |
3076 #elif defined(DUK_OPT_NO_EXTERNAL_STRINGS) | |
3077 #undef DUK_USE_HSTRING_EXTDATA | |
3078 #else | |
3079 #undef DUK_USE_HSTRING_EXTDATA | |
3080 #endif | |
3081 | |
3082 #if defined(DUK_OPT_INTERRUPT_COUNTER) | |
3083 #define DUK_USE_INTERRUPT_COUNTER | |
3084 #elif defined(DUK_OPT_NO_INTERRUPT_COUNTER) | |
3085 #undef DUK_USE_INTERRUPT_COUNTER | |
3086 #else | |
3087 #undef DUK_USE_INTERRUPT_COUNTER | |
3088 #endif | |
3089 | |
3090 #if defined(DUK_OPT_JC) | |
3091 #define DUK_USE_JC | |
3092 #elif defined(DUK_OPT_NO_JC) | |
3093 #undef DUK_USE_JC | |
3094 #else | |
3095 #define DUK_USE_JC | |
3096 #endif | |
3097 | |
3098 #if defined(DUK_OPT_JSON_STRINGIFY_FASTPATH) | |
3099 #define DUK_USE_JSON_STRINGIFY_FASTPATH | |
3100 #elif defined(DUK_OPT_NO_JSON_STRINGIFY_FASTPATH) | |
3101 #undef DUK_USE_JSON_STRINGIFY_FASTPATH | |
3102 #else | |
3103 #undef DUK_USE_JSON_STRINGIFY_FASTPATH | |
3104 #endif | |
3105 | |
3106 #if defined(DUK_OPT_JX) | |
3107 #define DUK_USE_JX | |
3108 #elif defined(DUK_OPT_NO_JX) | |
3109 #undef DUK_USE_JX | |
3110 #else | |
3111 #define DUK_USE_JX | |
3112 #endif | |
3113 | |
3114 #if defined(DUK_OPT_LIGHTFUNC_BUILTINS) | |
3115 #define DUK_USE_LIGHTFUNC_BUILTINS | |
3116 #elif defined(DUK_OPT_NO_LIGHTFUNC_BUILTINS) | |
3117 #undef DUK_USE_LIGHTFUNC_BUILTINS | |
3118 #else | |
3119 #undef DUK_USE_LIGHTFUNC_BUILTINS | |
3120 #endif | |
3121 | |
3122 #if defined(DUK_OPT_MARK_AND_SWEEP) | |
3123 #define DUK_USE_MARK_AND_SWEEP | |
3124 #elif defined(DUK_OPT_NO_MARK_AND_SWEEP) | |
3125 #undef DUK_USE_MARK_AND_SWEEP | |
3126 #else | |
3127 #define DUK_USE_MARK_AND_SWEEP | |
3128 #endif | |
3129 | |
3130 #if defined(DUK_OPT_MS_STRINGTABLE_RESIZE) | |
3131 #define DUK_USE_MS_STRINGTABLE_RESIZE | |
3132 #elif defined(DUK_OPT_NO_MS_STRINGTABLE_RESIZE) | |
3133 #undef DUK_USE_MS_STRINGTABLE_RESIZE | |
3134 #else | |
3135 #define DUK_USE_MS_STRINGTABLE_RESIZE | |
3136 #endif | |
3137 | |
3138 #if defined(DUK_OPT_NONSTD_ARRAY_CONCAT_TRAILER) | |
3139 #define DUK_USE_NONSTD_ARRAY_CONCAT_TRAILER | |
3140 #elif defined(DUK_OPT_NO_NONSTD_ARRAY_CONCAT_TRAILER) | |
3141 #undef DUK_USE_NONSTD_ARRAY_CONCAT_TRAILER | |
3142 #else | |
3143 #define DUK_USE_NONSTD_ARRAY_CONCAT_TRAILER | |
3144 #endif | |
3145 | |
3146 #if defined(DUK_OPT_NONSTD_ARRAY_MAP_TRAILER) | |
3147 #define DUK_USE_NONSTD_ARRAY_MAP_TRAILER | |
3148 #elif defined(DUK_OPT_NO_NONSTD_ARRAY_MAP_TRAILER) | |
3149 #undef DUK_USE_NONSTD_ARRAY_MAP_TRAILER | |
3150 #else | |
3151 #define DUK_USE_NONSTD_ARRAY_MAP_TRAILER | |
3152 #endif | |
3153 | |
3154 #if defined(DUK_OPT_NONSTD_ARRAY_SPLICE_DELCOUNT) | |
3155 #define DUK_USE_NONSTD_ARRAY_SPLICE_DELCOUNT | |
3156 #elif defined(DUK_OPT_NO_NONSTD_ARRAY_SPLICE_DELCOUNT) | |
3157 #undef DUK_USE_NONSTD_ARRAY_SPLICE_DELCOUNT | |
3158 #else | |
3159 #define DUK_USE_NONSTD_ARRAY_SPLICE_DELCOUNT | |
3160 #endif | |
3161 | |
3162 #if defined(DUK_OPT_NONSTD_FUNC_CALLER_PROPERTY) | |
3163 #define DUK_USE_NONSTD_FUNC_CALLER_PROPERTY | |
3164 #elif defined(DUK_OPT_NO_NONSTD_FUNC_CALLER_PROPERTY) | |
3165 #undef DUK_USE_NONSTD_FUNC_CALLER_PROPERTY | |
3166 #else | |
3167 #undef DUK_USE_NONSTD_FUNC_CALLER_PROPERTY | |
3168 #endif | |
3169 | |
3170 #if defined(DUK_OPT_NONSTD_FUNC_SOURCE_PROPERTY) | |
3171 #define DUK_USE_NONSTD_FUNC_SOURCE_PROPERTY | |
3172 #elif defined(DUK_OPT_NO_NONSTD_FUNC_SOURCE_PROPERTY) | |
3173 #undef DUK_USE_NONSTD_FUNC_SOURCE_PROPERTY | |
3174 #else | |
3175 #undef DUK_USE_NONSTD_FUNC_SOURCE_PROPERTY | |
3176 #endif | |
3177 | |
3178 #if defined(DUK_OPT_NONSTD_FUNC_STMT) | |
3179 #define DUK_USE_NONSTD_FUNC_STMT | |
3180 #elif defined(DUK_OPT_NO_NONSTD_FUNC_STMT) | |
3181 #undef DUK_USE_NONSTD_FUNC_STMT | |
3182 #else | |
3183 #define DUK_USE_NONSTD_FUNC_STMT | |
3184 #endif | |
3185 | |
3186 #if defined(DUK_OPT_NONSTD_ACCESSOR_KEY_ARGUMENT) | |
3187 #define DUK_USE_NONSTD_GETTER_KEY_ARGUMENT | |
3188 #elif defined(DUK_OPT_NO_NONSTD_ACCESSOR_KEY_ARGUMENT) | |
3189 #undef DUK_USE_NONSTD_GETTER_KEY_ARGUMENT | |
3190 #else | |
3191 #define DUK_USE_NONSTD_GETTER_KEY_ARGUMENT | |
3192 #endif | |
3193 | |
3194 #if defined(DUK_OPT_NONSTD_JSON_ESC_U2028_U2029) | |
3195 #define DUK_USE_NONSTD_JSON_ESC_U2028_U2029 | |
3196 #elif defined(DUK_OPT_NO_NONSTD_JSON_ESC_U2028_U2029) | |
3197 #undef DUK_USE_NONSTD_JSON_ESC_U2028_U2029 | |
3198 #else | |
3199 #define DUK_USE_NONSTD_JSON_ESC_U2028_U2029 | |
3200 #endif | |
3201 | |
3202 #if defined(DUK_OPT_NONSTD_REGEXP_DOLLAR_ESCAPE) | |
3203 #define DUK_USE_NONSTD_REGEXP_DOLLAR_ESCAPE | |
3204 #elif defined(DUK_OPT_NO_NONSTD_REGEXP_DOLLAR_ESCAPE) | |
3205 #undef DUK_USE_NONSTD_REGEXP_DOLLAR_ESCAPE | |
3206 #else | |
3207 #define DUK_USE_NONSTD_REGEXP_DOLLAR_ESCAPE | |
3208 #endif | |
3209 | |
3210 #if defined(DUK_OPT_NONSTD_ACCESSOR_KEY_ARGUMENT) | |
3211 #define DUK_USE_NONSTD_SETTER_KEY_ARGUMENT | |
3212 #elif defined(DUK_OPT_NO_NONSTD_ACCESSOR_KEY_ARGUMENT) | |
3213 #undef DUK_USE_NONSTD_SETTER_KEY_ARGUMENT | |
3214 #else | |
3215 #define DUK_USE_NONSTD_SETTER_KEY_ARGUMENT | |
3216 #endif | |
3217 | |
3218 #if defined(DUK_OPT_NONSTD_STRING_FROMCHARCODE_32BIT) | |
3219 #define DUK_USE_NONSTD_STRING_FROMCHARCODE_32BIT | |
3220 #elif defined(DUK_OPT_NO_NONSTD_STRING_FROMCHARCODE_32BIT) | |
3221 #undef DUK_USE_NONSTD_STRING_FROMCHARCODE_32BIT | |
3222 #else | |
3223 #define DUK_USE_NONSTD_STRING_FROMCHARCODE_32BIT | |
3224 #endif | |
3225 | |
3226 #if defined(DUK_OPT_OBJSIZES16) | |
3227 #define DUK_USE_OBJSIZES16 | |
3228 #elif defined(DUK_OPT_NO_OBJSIZES16) | |
3229 #undef DUK_USE_OBJSIZES16 | |
3230 #else | |
3231 #undef DUK_USE_OBJSIZES16 | |
3232 #endif | |
3233 | |
3234 #if defined(DUK_OPT_OCTAL_SUPPORT) | |
3235 #define DUK_USE_OCTAL_SUPPORT | |
3236 #elif defined(DUK_OPT_NO_OCTAL_SUPPORT) | |
3237 #undef DUK_USE_OCTAL_SUPPORT | |
3238 #else | |
3239 #define DUK_USE_OCTAL_SUPPORT | |
3240 #endif | |
3241 | |
3242 #if defined(DUK_OPT_PACKED_TVAL) | |
3243 #define DUK_USE_PACKED_TVAL | |
3244 #elif defined(DUK_OPT_NO_PACKED_TVAL) | |
3245 #undef DUK_USE_PACKED_TVAL | |
3246 #else | |
3247 /* Already provided above */ | |
3248 #endif | |
3249 | |
3250 #undef DUK_USE_PANIC_ABORT | |
3251 #if !defined(DUK_OPT_SEGFAULT_ON_PANIC) | |
3252 #define DUK_USE_PANIC_ABORT | |
3253 #endif | |
3254 | |
3255 #undef DUK_USE_PANIC_HANDLER | |
3256 #if defined(DUK_OPT_PANIC_HANDLER) | |
3257 #define DUK_USE_PANIC_HANDLER(code,msg) DUK_OPT_PANIC_HANDLER((code),(msg)) | |
3258 #endif | |
3259 | |
3260 #undef DUK_USE_PANIC_SEGFAULT | |
3261 #if defined(DUK_OPT_SEGFAULT_ON_PANIC) | |
3262 #define DUK_USE_PANIC_SEGFAULT | |
3263 #endif | |
3264 | |
3265 #if defined(DUK_OPT_PARANOID_ERRORS) | |
3266 #define DUK_USE_PARANOID_ERRORS | |
3267 #elif defined(DUK_OPT_NO_PARANOID_ERRORS) | |
3268 #undef DUK_USE_PARANOID_ERRORS | |
3269 #else | |
3270 #undef DUK_USE_PARANOID_ERRORS | |
3271 #endif | |
3272 | |
3273 #if defined(DUK_OPT_PC2LINE) | |
3274 #define DUK_USE_PC2LINE | |
3275 #elif defined(DUK_OPT_NO_PC2LINE) | |
3276 #undef DUK_USE_PC2LINE | |
3277 #else | |
3278 #define DUK_USE_PC2LINE | |
3279 #endif | |
3280 | |
3281 #if defined(DUK_OPT_REFCOUNT16) | |
3282 #define DUK_USE_REFCOUNT16 | |
3283 #elif defined(DUK_OPT_NO_REFCOUNT16) | |
3284 #undef DUK_USE_REFCOUNT16 | |
3285 #else | |
3286 #undef DUK_USE_REFCOUNT16 | |
3287 #endif | |
3288 | |
3289 #if defined(DUK_OPT_REFERENCE_COUNTING) | |
3290 #define DUK_USE_REFERENCE_COUNTING | |
3291 #elif defined(DUK_OPT_NO_REFERENCE_COUNTING) | |
3292 #undef DUK_USE_REFERENCE_COUNTING | |
3293 #else | |
3294 #define DUK_USE_REFERENCE_COUNTING | |
3295 #endif | |
3296 | |
3297 #if defined(DUK_OPT_REGEXP_CANON_WORKAROUND) | |
3298 #define DUK_USE_REGEXP_CANON_WORKAROUND | |
3299 #elif defined(DUK_OPT_NO_REGEXP_CANON_WORKAROUND) | |
3300 #undef DUK_USE_REGEXP_CANON_WORKAROUND | |
3301 #else | |
3302 #undef DUK_USE_REGEXP_CANON_WORKAROUND | |
3303 #endif | |
3304 | |
3305 #if defined(DUK_OPT_REGEXP_SUPPORT) | |
3306 #define DUK_USE_REGEXP_SUPPORT | |
3307 #elif defined(DUK_OPT_NO_REGEXP_SUPPORT) | |
3308 #undef DUK_USE_REGEXP_SUPPORT | |
3309 #else | |
3310 #define DUK_USE_REGEXP_SUPPORT | |
3311 #endif | |
3312 | |
3313 #if defined(DUK_OPT_ROM_GLOBAL_CLONE) | |
3314 #define DUK_USE_ROM_GLOBAL_CLONE | |
3315 #elif defined(DUK_OPT_NO_ROM_GLOBAL_CLONE) | |
3316 #undef DUK_USE_ROM_GLOBAL_CLONE | |
3317 #else | |
3318 #undef DUK_USE_ROM_GLOBAL_CLONE | |
3319 #endif | |
3320 | |
3321 #if defined(DUK_OPT_ROM_GLOBAL_INHERIT) | |
3322 #define DUK_USE_ROM_GLOBAL_INHERIT | |
3323 #elif defined(DUK_OPT_NO_ROM_GLOBAL_INHERIT) | |
3324 #undef DUK_USE_ROM_GLOBAL_INHERIT | |
3325 #else | |
3326 #undef DUK_USE_ROM_GLOBAL_INHERIT | |
3327 #endif | |
3328 | |
3329 #if defined(DUK_OPT_ROM_OBJECTS) | |
3330 #define DUK_USE_ROM_OBJECTS | |
3331 #elif defined(DUK_OPT_NO_ROM_OBJECTS) | |
3332 #undef DUK_USE_ROM_OBJECTS | |
3333 #else | |
3334 #undef DUK_USE_ROM_OBJECTS | |
3335 #endif | |
3336 | |
3337 #if defined(DUK_OPT_ROM_STRINGS) | |
3338 #define DUK_USE_ROM_STRINGS | |
3339 #elif defined(DUK_OPT_NO_ROM_STRINGS) | |
3340 #undef DUK_USE_ROM_STRINGS | |
3341 #else | |
3342 #undef DUK_USE_ROM_STRINGS | |
3343 #endif | |
3344 | |
3345 #if defined(DUK_OPT_SECTION_B) | |
3346 #define DUK_USE_SECTION_B | |
3347 #elif defined(DUK_OPT_NO_SECTION_B) | |
3348 #undef DUK_USE_SECTION_B | |
3349 #else | |
3350 #define DUK_USE_SECTION_B | |
3351 #endif | |
3352 | |
3353 #if defined(DUK_OPT_SELF_TESTS) | |
3354 #define DUK_USE_SELF_TESTS | |
3355 #elif defined(DUK_OPT_NO_SELF_TESTS) | |
3356 #undef DUK_USE_SELF_TESTS | |
3357 #else | |
3358 #undef DUK_USE_SELF_TESTS | |
3359 #endif | |
3360 | |
3361 #if defined(DUK_OPT_SHUFFLE_TORTURE) | |
3362 #define DUK_USE_SHUFFLE_TORTURE | |
3363 #elif defined(DUK_OPT_NO_SHUFFLE_TORTURE) | |
3364 #undef DUK_USE_SHUFFLE_TORTURE | |
3365 #else | |
3366 #undef DUK_USE_SHUFFLE_TORTURE | |
3367 #endif | |
3368 | |
3369 #if defined(DUK_OPT_SOURCE_NONBMP) | |
3370 #define DUK_USE_SOURCE_NONBMP | |
3371 #elif defined(DUK_OPT_NO_SOURCE_NONBMP) | |
3372 #undef DUK_USE_SOURCE_NONBMP | |
3373 #else | |
3374 #define DUK_USE_SOURCE_NONBMP | |
3375 #endif | |
3376 | |
3377 #if defined(DUK_OPT_STRHASH16) | |
3378 #define DUK_USE_STRHASH16 | |
3379 #elif defined(DUK_OPT_NO_STRHASH16) | |
3380 #undef DUK_USE_STRHASH16 | |
3381 #else | |
3382 #undef DUK_USE_STRHASH16 | |
3383 #endif | |
3384 | |
3385 #if defined(DUK_OPT_STRICT_DECL) | |
3386 #define DUK_USE_STRICT_DECL | |
3387 #elif defined(DUK_OPT_NO_STRICT_DECL) | |
3388 #undef DUK_USE_STRICT_DECL | |
3389 #else | |
3390 #define DUK_USE_STRICT_DECL | |
3391 #endif | |
3392 | |
3393 #if defined(DUK_OPT_STRICT_UTF8_SOURCE) | |
3394 #define DUK_USE_STRICT_UTF8_SOURCE | |
3395 #elif defined(DUK_OPT_NO_STRICT_UTF8_SOURCE) | |
3396 #undef DUK_USE_STRICT_UTF8_SOURCE | |
3397 #else | |
3398 #undef DUK_USE_STRICT_UTF8_SOURCE | |
3399 #endif | |
3400 | |
3401 #if defined(DUK_OPT_STRLEN16) | |
3402 #define DUK_USE_STRLEN16 | |
3403 #elif defined(DUK_OPT_NO_STRLEN16) | |
3404 #undef DUK_USE_STRLEN16 | |
3405 #else | |
3406 #undef DUK_USE_STRLEN16 | |
3407 #endif | |
3408 | |
3409 #undef DUK_USE_STRTAB_CHAIN | |
3410 #if defined(DUK_OPT_STRTAB_CHAIN) && defined(DUK_OPT_STRTAB_CHAIN_SIZE) | |
3411 #define DUK_USE_STRTAB_CHAIN | |
3412 #endif | |
3413 | |
3414 #undef DUK_USE_STRTAB_CHAIN_SIZE | |
3415 #if defined(DUK_OPT_STRTAB_CHAIN) && defined(DUK_OPT_STRTAB_CHAIN_SIZE) | |
3416 /* Low memory algorithm: separate chaining using arrays, fixed size hash */ | |
3417 #define DUK_USE_STRTAB_CHAIN_SIZE DUK_OPT_STRTAB_CHAIN_SIZE | |
3418 #endif | |
3419 | |
3420 #undef DUK_USE_STRTAB_PROBE | |
3421 #if !(defined(DUK_OPT_STRTAB_CHAIN) && defined(DUK_OPT_STRTAB_CHAIN_SIZE)) | |
3422 #define DUK_USE_STRTAB_PROBE | |
3423 #endif | |
3424 | |
3425 #if defined(DUK_OPT_NONSTD_FUNC_CALLER_PROPERTY) | |
3426 #undef DUK_USE_TAILCALL | |
3427 #else | |
3428 #define DUK_USE_TAILCALL | |
3429 #endif | |
3430 | |
3431 #if defined(DUK_OPT_TARGET_INFO) | |
3432 #define DUK_USE_TARGET_INFO DUK_OPT_TARGET_INFO | |
3433 #else | |
3434 #define DUK_USE_TARGET_INFO "unknown" | |
3435 #endif | |
3436 | |
3437 #if defined(DUK_OPT_NO_AUGMENT_ERRORS) | |
3438 #undef DUK_USE_TRACEBACKS | |
3439 #elif defined(DUK_OPT_NO_TRACEBACKS) | |
3440 #undef DUK_USE_TRACEBACKS | |
3441 #else | |
3442 #define DUK_USE_TRACEBACKS | |
3443 #endif | |
3444 | |
3445 #if defined(DUK_OPT_TRACEBACK_DEPTH) | |
3446 #define DUK_USE_TRACEBACK_DEPTH DUK_OPT_TRACEBACK_DEPTH | |
3447 #else | |
3448 #define DUK_USE_TRACEBACK_DEPTH 10 | |
3449 #endif | |
3450 | |
3451 #if defined(DUK_OPT_DECLARE) | |
3452 #define DUK_USE_USER_DECLARE() DUK_OPT_DECLARE | |
3453 #else | |
3454 #define DUK_USE_USER_DECLARE() /* no user declarations */ | |
3455 #endif | |
3456 | |
3457 /* User provided InitJS. */ | |
3458 #undef DUK_USE_USER_INITJS | |
3459 #if defined(DUK_OPT_USER_INITJS) | |
3460 #define DUK_USE_USER_INITJS (DUK_OPT_USER_INITJS) | |
3461 #endif | |
3462 | |
3463 #if defined(DUK_OPT_VERBOSE_ERRORS) | |
3464 #define DUK_USE_VERBOSE_ERRORS | |
3465 #elif defined(DUK_OPT_NO_VERBOSE_ERRORS) | |
3466 #undef DUK_USE_VERBOSE_ERRORS | |
3467 #else | |
3468 #define DUK_USE_VERBOSE_ERRORS | |
3469 #endif | |
3470 | |
3471 #if defined(DUK_OPT_VOLUNTARY_GC) | |
3472 #define DUK_USE_VOLUNTARY_GC | |
3473 #elif defined(DUK_OPT_NO_VOLUNTARY_GC) | |
3474 #undef DUK_USE_VOLUNTARY_GC | |
3475 #else | |
3476 #define DUK_USE_VOLUNTARY_GC | |
3477 #endif | |
3478 | |
3479 #if defined(DUK_OPT_ZERO_BUFFER_DATA) | |
3480 #define DUK_USE_ZERO_BUFFER_DATA | |
3481 #elif defined(DUK_OPT_NO_ZERO_BUFFER_DATA) | |
3482 #undef DUK_USE_ZERO_BUFFER_DATA | |
3483 #else | |
3484 #define DUK_USE_ZERO_BUFFER_DATA | |
3485 #endif | |
3486 | |
3487 /* | |
3488 * Autogenerated defaults | |
3489 */ | |
3490 | |
3491 #define DUK_USE_AVOID_PLATFORM_FUNCPTRS | 2643 #define DUK_USE_AVOID_PLATFORM_FUNCPTRS |
3492 #define DUK_USE_BASE64_FASTPATH | 2644 #define DUK_USE_BASE64_FASTPATH |
3493 #define DUK_USE_BUILTIN_INITJS | 2645 #define DUK_USE_BOOLEAN_BUILTIN |
2646 #define DUK_USE_BUFFEROBJECT_SUPPORT | |
2647 #undef DUK_USE_BUFLEN16 | |
2648 #define DUK_USE_BYTECODE_DUMP_SUPPORT | |
2649 #define DUK_USE_COMMONJS_MODULES | |
3494 #define DUK_USE_COMPILER_RECLIMIT 2500 | 2650 #define DUK_USE_COMPILER_RECLIMIT 2500 |
2651 #define DUK_USE_COROUTINE_SUPPORT | |
2652 #undef DUK_USE_CPP_EXCEPTIONS | |
2653 #undef DUK_USE_DATAPTR16 | |
2654 #undef DUK_USE_DATAPTR_DEC16 | |
2655 #undef DUK_USE_DATAPTR_ENC16 | |
2656 #define DUK_USE_DATE_BUILTIN | |
3495 #undef DUK_USE_DATE_FORMAT_STRING | 2657 #undef DUK_USE_DATE_FORMAT_STRING |
3496 #undef DUK_USE_DATE_GET_LOCAL_TZOFFSET | 2658 #undef DUK_USE_DATE_GET_LOCAL_TZOFFSET |
3497 #undef DUK_USE_DATE_GET_NOW | 2659 #undef DUK_USE_DATE_GET_NOW |
3498 #undef DUK_USE_DATE_PARSE_STRING | 2660 #undef DUK_USE_DATE_PARSE_STRING |
3499 #undef DUK_USE_DATE_PRS_GETDATE | 2661 #undef DUK_USE_DATE_PRS_GETDATE |
2662 #undef DUK_USE_DEBUG | |
2663 #undef DUK_USE_DEBUGGER_DUMPHEAP | |
2664 #undef DUK_USE_DEBUGGER_INSPECT | |
2665 #undef DUK_USE_DEBUGGER_PAUSE_UNCAUGHT | |
2666 #undef DUK_USE_DEBUGGER_SUPPORT | |
2667 #define DUK_USE_DEBUGGER_THROW_NOTIFY | |
2668 #undef DUK_USE_DEBUGGER_TRANSPORT_TORTURE | |
2669 #define DUK_USE_DEBUG_BUFSIZE 65536L | |
2670 #define DUK_USE_DEBUG_LEVEL 0 | |
2671 #undef DUK_USE_DEBUG_WRITE | |
2672 #define DUK_USE_DOUBLE_LINKED_HEAP | |
2673 #define DUK_USE_DUKTAPE_BUILTIN | |
2674 #define DUK_USE_ENCODING_BUILTINS | |
2675 #define DUK_USE_ERRCREATE | |
2676 #define DUK_USE_ERRTHROW | |
2677 #define DUK_USE_ES6 | |
2678 #define DUK_USE_ES6_OBJECT_PROTO_PROPERTY | |
2679 #define DUK_USE_ES6_OBJECT_SETPROTOTYPEOF | |
2680 #define DUK_USE_ES6_PROXY | |
2681 #define DUK_USE_ES6_REGEXP_SYNTAX | |
2682 #define DUK_USE_ES6_UNICODE_ESCAPE | |
2683 #define DUK_USE_ES7_EXP_OPERATOR | |
3500 #define DUK_USE_ESBC_LIMITS | 2684 #define DUK_USE_ESBC_LIMITS |
3501 #define DUK_USE_ESBC_MAX_BYTES 2147418112L | 2685 #define DUK_USE_ESBC_MAX_BYTES 2147418112L |
3502 #define DUK_USE_ESBC_MAX_LINENUMBER 2147418112L | 2686 #define DUK_USE_ESBC_MAX_LINENUMBER 2147418112L |
3503 #undef DUK_USE_EXEC_FUN_LOCAL | 2687 #undef DUK_USE_EXEC_FUN_LOCAL |
2688 #undef DUK_USE_EXEC_INDIRECT_BOUND_CHECK | |
2689 #undef DUK_USE_EXEC_PREFER_SIZE | |
2690 #define DUK_USE_EXEC_REGCONST_OPTIMIZE | |
2691 #undef DUK_USE_EXEC_TIMEOUT_CHECK | |
3504 #undef DUK_USE_EXPLICIT_NULL_INIT | 2692 #undef DUK_USE_EXPLICIT_NULL_INIT |
2693 #undef DUK_USE_EXTSTR_FREE | |
2694 #undef DUK_USE_EXTSTR_INTERN_CHECK | |
2695 #undef DUK_USE_FASTINT | |
3505 #define DUK_USE_FAST_REFCOUNT_DEFAULT | 2696 #define DUK_USE_FAST_REFCOUNT_DEFAULT |
2697 #undef DUK_USE_FATAL_HANDLER | |
2698 #define DUK_USE_FINALIZER_SUPPORT | |
2699 #undef DUK_USE_FUNCPTR16 | |
2700 #undef DUK_USE_FUNCPTR_DEC16 | |
2701 #undef DUK_USE_FUNCPTR_ENC16 | |
2702 #define DUK_USE_FUNCTION_BUILTIN | |
2703 #define DUK_USE_FUNC_FILENAME_PROPERTY | |
2704 #define DUK_USE_FUNC_NAME_PROPERTY | |
2705 #undef DUK_USE_GC_TORTURE | |
2706 #undef DUK_USE_GET_RANDOM_DOUBLE | |
2707 #define DUK_USE_GLOBAL_BUILTIN | |
2708 #undef DUK_USE_HEAPPTR16 | |
2709 #undef DUK_USE_HEAPPTR_DEC16 | |
2710 #undef DUK_USE_HEAPPTR_ENC16 | |
3506 #define DUK_USE_HEX_FASTPATH | 2711 #define DUK_USE_HEX_FASTPATH |
2712 #define DUK_USE_HOBJECT_HASH_PART | |
2713 #define DUK_USE_HSTRING_ARRIDX | |
2714 #define DUK_USE_HSTRING_CLEN | |
2715 #undef DUK_USE_HSTRING_EXTDATA | |
3507 #define DUK_USE_IDCHAR_FASTPATH | 2716 #define DUK_USE_IDCHAR_FASTPATH |
2717 #undef DUK_USE_INTERRUPT_COUNTER | |
3508 #undef DUK_USE_INTERRUPT_DEBUG_FIXUP | 2718 #undef DUK_USE_INTERRUPT_DEBUG_FIXUP |
2719 #define DUK_USE_JC | |
2720 #define DUK_USE_JSON_BUILTIN | |
3509 #define DUK_USE_JSON_DECNUMBER_FASTPATH | 2721 #define DUK_USE_JSON_DECNUMBER_FASTPATH |
3510 #define DUK_USE_JSON_DECSTRING_FASTPATH | 2722 #define DUK_USE_JSON_DECSTRING_FASTPATH |
3511 #define DUK_USE_JSON_DEC_RECLIMIT 1000 | 2723 #define DUK_USE_JSON_DEC_RECLIMIT 1000 |
3512 #define DUK_USE_JSON_EATWHITE_FASTPATH | 2724 #define DUK_USE_JSON_EATWHITE_FASTPATH |
3513 #define DUK_USE_JSON_ENC_RECLIMIT 1000 | 2725 #define DUK_USE_JSON_ENC_RECLIMIT 1000 |
3514 #define DUK_USE_JSON_QUOTESTRING_FASTPATH | 2726 #define DUK_USE_JSON_QUOTESTRING_FASTPATH |
2727 #undef DUK_USE_JSON_STRINGIFY_FASTPATH | |
2728 #define DUK_USE_JSON_SUPPORT | |
2729 #define DUK_USE_JX | |
3515 #define DUK_USE_LEXER_SLIDING_WINDOW | 2730 #define DUK_USE_LEXER_SLIDING_WINDOW |
2731 #undef DUK_USE_LIGHTFUNC_BUILTINS | |
3516 #undef DUK_USE_MARKANDSWEEP_FINALIZER_TORTURE | 2732 #undef DUK_USE_MARKANDSWEEP_FINALIZER_TORTURE |
3517 #define DUK_USE_MARK_AND_SWEEP_RECLIMIT 256 | 2733 #define DUK_USE_MARK_AND_SWEEP_RECLIMIT 256 |
3518 #define DUK_USE_MATH_BUILTIN | 2734 #define DUK_USE_MATH_BUILTIN |
2735 #define DUK_USE_MS_STRINGTABLE_RESIZE | |
3519 #define DUK_USE_NATIVE_CALL_RECLIMIT 1000 | 2736 #define DUK_USE_NATIVE_CALL_RECLIMIT 1000 |
3520 #undef DUK_USE_PANIC_EXIT | 2737 #define DUK_USE_NONSTD_ARRAY_CONCAT_TRAILER |
2738 #define DUK_USE_NONSTD_ARRAY_MAP_TRAILER | |
2739 #define DUK_USE_NONSTD_ARRAY_SPLICE_DELCOUNT | |
2740 #undef DUK_USE_NONSTD_FUNC_CALLER_PROPERTY | |
2741 #undef DUK_USE_NONSTD_FUNC_SOURCE_PROPERTY | |
2742 #define DUK_USE_NONSTD_FUNC_STMT | |
2743 #define DUK_USE_NONSTD_GETTER_KEY_ARGUMENT | |
2744 #define DUK_USE_NONSTD_JSON_ESC_U2028_U2029 | |
2745 #define DUK_USE_NONSTD_SETTER_KEY_ARGUMENT | |
2746 #define DUK_USE_NONSTD_STRING_FROMCHARCODE_32BIT | |
2747 #define DUK_USE_NUMBER_BUILTIN | |
2748 #define DUK_USE_OBJECT_BUILTIN | |
2749 #undef DUK_USE_OBJSIZES16 | |
2750 #undef DUK_USE_PARANOID_ERRORS | |
2751 #define DUK_USE_PC2LINE | |
3521 #undef DUK_USE_PREFER_SIZE | 2752 #undef DUK_USE_PREFER_SIZE |
3522 #define DUK_USE_PROVIDE_DEFAULT_ALLOC_FUNCTIONS | 2753 #define DUK_USE_PROVIDE_DEFAULT_ALLOC_FUNCTIONS |
2754 #undef DUK_USE_REFCOUNT16 | |
2755 #define DUK_USE_REFERENCE_COUNTING | |
2756 #define DUK_USE_REFLECT_BUILTIN | |
3523 #undef DUK_USE_REFZERO_FINALIZER_TORTURE | 2757 #undef DUK_USE_REFZERO_FINALIZER_TORTURE |
2758 #undef DUK_USE_REGEXP_CANON_WORKAROUND | |
3524 #define DUK_USE_REGEXP_COMPILER_RECLIMIT 10000 | 2759 #define DUK_USE_REGEXP_COMPILER_RECLIMIT 10000 |
3525 #define DUK_USE_REGEXP_EXECUTOR_RECLIMIT 10000 | 2760 #define DUK_USE_REGEXP_EXECUTOR_RECLIMIT 10000 |
2761 #define DUK_USE_REGEXP_SUPPORT | |
2762 #undef DUK_USE_ROM_GLOBAL_CLONE | |
2763 #undef DUK_USE_ROM_GLOBAL_INHERIT | |
2764 #undef DUK_USE_ROM_OBJECTS | |
3526 #define DUK_USE_ROM_PTRCOMP_FIRST 63488L | 2765 #define DUK_USE_ROM_PTRCOMP_FIRST 63488L |
2766 #undef DUK_USE_ROM_STRINGS | |
2767 #define DUK_USE_SECTION_B | |
2768 #undef DUK_USE_SELF_TESTS | |
2769 #undef DUK_USE_SHUFFLE_TORTURE | |
2770 #define DUK_USE_SOURCE_NONBMP | |
2771 #undef DUK_USE_STRHASH16 | |
3527 #undef DUK_USE_STRHASH_DENSE | 2772 #undef DUK_USE_STRHASH_DENSE |
3528 #define DUK_USE_STRHASH_SKIP_SHIFT 5 | 2773 #define DUK_USE_STRHASH_SKIP_SHIFT 5 |
2774 #define DUK_USE_STRICT_DECL | |
2775 #undef DUK_USE_STRICT_UTF8_SOURCE | |
2776 #define DUK_USE_STRING_BUILTIN | |
2777 #undef DUK_USE_STRLEN16 | |
2778 #undef DUK_USE_STRTAB_CHAIN | |
2779 #undef DUK_USE_STRTAB_CHAIN_SIZE | |
2780 #define DUK_USE_STRTAB_PROBE | |
2781 #undef DUK_USE_SYMBOL_BUILTIN | |
2782 #define DUK_USE_TAILCALL | |
2783 #define DUK_USE_TARGET_INFO "unknown" | |
2784 #define DUK_USE_TRACEBACKS | |
2785 #define DUK_USE_TRACEBACK_DEPTH 10 | |
2786 #define DUK_USE_USER_DECLARE() /* no user declarations */ | |
3529 #undef DUK_USE_VALSTACK_UNSAFE | 2787 #undef DUK_USE_VALSTACK_UNSAFE |
2788 #define DUK_USE_VERBOSE_ERRORS | |
3530 #define DUK_USE_VERBOSE_EXECUTOR_ERRORS | 2789 #define DUK_USE_VERBOSE_EXECUTOR_ERRORS |
3531 | 2790 #define DUK_USE_VOLUNTARY_GC |
3532 /* | 2791 #define DUK_USE_ZERO_BUFFER_DATA |
3533 * Alternative customization header | |
3534 * | |
3535 * If you want to modify the final DUK_USE_xxx flags directly (without | |
3536 * using the available DUK_OPT_xxx flags), define DUK_OPT_HAVE_CUSTOM_H | |
3537 * and tweak the final flags there. | |
3538 */ | |
3539 | |
3540 #if defined(DUK_OPT_HAVE_CUSTOM_H) | |
3541 #include "duk_custom.h" | |
3542 #endif | |
3543 | 2792 |
3544 /* | 2793 /* |
3545 * You may add overriding #define/#undef directives below for | 2794 * You may add overriding #define/#undef directives below for |
3546 * customization. You of course cannot un-#include or un-typedef | 2795 * customization. You of course cannot un-#include or un-typedef |
3547 * anything; these require direct changes above. | 2796 * anything; these require direct changes above. |
3601 #endif | 2850 #endif |
3602 | 2851 |
3603 #endif /* DUK_COMPILING_DUKTAPE */ | 2852 #endif /* DUK_COMPILING_DUKTAPE */ |
3604 | 2853 |
3605 /* | 2854 /* |
2855 * Checks for legacy feature options (DUK_OPT_xxx) | |
2856 */ | |
2857 | |
2858 #if defined(DUK_OPT_ASSERTIONS) | |
2859 #error unsupported legacy feature option DUK_OPT_ASSERTIONS used | |
2860 #endif | |
2861 #if defined(DUK_OPT_BUFFEROBJECT_SUPPORT) | |
2862 #error unsupported legacy feature option DUK_OPT_BUFFEROBJECT_SUPPORT used | |
2863 #endif | |
2864 #if defined(DUK_OPT_BUFLEN16) | |
2865 #error unsupported legacy feature option DUK_OPT_BUFLEN16 used | |
2866 #endif | |
2867 #if defined(DUK_OPT_DATAPTR16) | |
2868 #error unsupported legacy feature option DUK_OPT_DATAPTR16 used | |
2869 #endif | |
2870 #if defined(DUK_OPT_DATAPTR_DEC16) | |
2871 #error unsupported legacy feature option DUK_OPT_DATAPTR_DEC16 used | |
2872 #endif | |
2873 #if defined(DUK_OPT_DATAPTR_ENC16) | |
2874 #error unsupported legacy feature option DUK_OPT_DATAPTR_ENC16 used | |
2875 #endif | |
2876 #if defined(DUK_OPT_DDDPRINT) | |
2877 #error unsupported legacy feature option DUK_OPT_DDDPRINT used | |
2878 #endif | |
2879 #if defined(DUK_OPT_DDPRINT) | |
2880 #error unsupported legacy feature option DUK_OPT_DDPRINT used | |
2881 #endif | |
2882 #if defined(DUK_OPT_DEBUG) | |
2883 #error unsupported legacy feature option DUK_OPT_DEBUG used | |
2884 #endif | |
2885 #if defined(DUK_OPT_DEBUGGER_DUMPHEAP) | |
2886 #error unsupported legacy feature option DUK_OPT_DEBUGGER_DUMPHEAP used | |
2887 #endif | |
2888 #if defined(DUK_OPT_DEBUGGER_FWD_LOGGING) | |
2889 #error unsupported legacy feature option DUK_OPT_DEBUGGER_FWD_LOGGING used | |
2890 #endif | |
2891 #if defined(DUK_OPT_DEBUGGER_FWD_PRINTALERT) | |
2892 #error unsupported legacy feature option DUK_OPT_DEBUGGER_FWD_PRINTALERT used | |
2893 #endif | |
2894 #if defined(DUK_OPT_DEBUGGER_SUPPORT) | |
2895 #error unsupported legacy feature option DUK_OPT_DEBUGGER_SUPPORT used | |
2896 #endif | |
2897 #if defined(DUK_OPT_DEBUGGER_TRANSPORT_TORTURE) | |
2898 #error unsupported legacy feature option DUK_OPT_DEBUGGER_TRANSPORT_TORTURE used | |
2899 #endif | |
2900 #if defined(DUK_OPT_DEBUG_BUFSIZE) | |
2901 #error unsupported legacy feature option DUK_OPT_DEBUG_BUFSIZE used | |
2902 #endif | |
2903 #if defined(DUK_OPT_DECLARE) | |
2904 #error unsupported legacy feature option DUK_OPT_DECLARE used | |
2905 #endif | |
2906 #if defined(DUK_OPT_DEEP_C_STACK) | |
2907 #error unsupported legacy feature option DUK_OPT_DEEP_C_STACK used | |
2908 #endif | |
2909 #if defined(DUK_OPT_DLL_BUILD) | |
2910 #error unsupported legacy feature option DUK_OPT_DLL_BUILD used | |
2911 #endif | |
2912 #if defined(DUK_OPT_DPRINT) | |
2913 #error unsupported legacy feature option DUK_OPT_DPRINT used | |
2914 #endif | |
2915 #if defined(DUK_OPT_DPRINT_COLORS) | |
2916 #error unsupported legacy feature option DUK_OPT_DPRINT_COLORS used | |
2917 #endif | |
2918 #if defined(DUK_OPT_DPRINT_RDTSC) | |
2919 #error unsupported legacy feature option DUK_OPT_DPRINT_RDTSC used | |
2920 #endif | |
2921 #if defined(DUK_OPT_EXEC_TIMEOUT_CHECK) | |
2922 #error unsupported legacy feature option DUK_OPT_EXEC_TIMEOUT_CHECK used | |
2923 #endif | |
2924 #if defined(DUK_OPT_EXTERNAL_STRINGS) | |
2925 #error unsupported legacy feature option DUK_OPT_EXTERNAL_STRINGS used | |
2926 #endif | |
2927 #if defined(DUK_OPT_EXTSTR_FREE) | |
2928 #error unsupported legacy feature option DUK_OPT_EXTSTR_FREE used | |
2929 #endif | |
2930 #if defined(DUK_OPT_EXTSTR_INTERN_CHECK) | |
2931 #error unsupported legacy feature option DUK_OPT_EXTSTR_INTERN_CHECK used | |
2932 #endif | |
2933 #if defined(DUK_OPT_FASTINT) | |
2934 #error unsupported legacy feature option DUK_OPT_FASTINT used | |
2935 #endif | |
2936 #if defined(DUK_OPT_FORCE_ALIGN) | |
2937 #error unsupported legacy feature option DUK_OPT_FORCE_ALIGN used | |
2938 #endif | |
2939 #if defined(DUK_OPT_FORCE_BYTEORDER) | |
2940 #error unsupported legacy feature option DUK_OPT_FORCE_BYTEORDER used | |
2941 #endif | |
2942 #if defined(DUK_OPT_FUNCPTR16) | |
2943 #error unsupported legacy feature option DUK_OPT_FUNCPTR16 used | |
2944 #endif | |
2945 #if defined(DUK_OPT_FUNCPTR_DEC16) | |
2946 #error unsupported legacy feature option DUK_OPT_FUNCPTR_DEC16 used | |
2947 #endif | |
2948 #if defined(DUK_OPT_FUNCPTR_ENC16) | |
2949 #error unsupported legacy feature option DUK_OPT_FUNCPTR_ENC16 used | |
2950 #endif | |
2951 #if defined(DUK_OPT_FUNC_NONSTD_CALLER_PROPERTY) | |
2952 #error unsupported legacy feature option DUK_OPT_FUNC_NONSTD_CALLER_PROPERTY used | |
2953 #endif | |
2954 #if defined(DUK_OPT_FUNC_NONSTD_SOURCE_PROPERTY) | |
2955 #error unsupported legacy feature option DUK_OPT_FUNC_NONSTD_SOURCE_PROPERTY used | |
2956 #endif | |
2957 #if defined(DUK_OPT_GC_TORTURE) | |
2958 #error unsupported legacy feature option DUK_OPT_GC_TORTURE used | |
2959 #endif | |
2960 #if defined(DUK_OPT_HAVE_CUSTOM_H) | |
2961 #error unsupported legacy feature option DUK_OPT_HAVE_CUSTOM_H used | |
2962 #endif | |
2963 #if defined(DUK_OPT_HEAPPTR16) | |
2964 #error unsupported legacy feature option DUK_OPT_HEAPPTR16 used | |
2965 #endif | |
2966 #if defined(DUK_OPT_HEAPPTR_DEC16) | |
2967 #error unsupported legacy feature option DUK_OPT_HEAPPTR_DEC16 used | |
2968 #endif | |
2969 #if defined(DUK_OPT_HEAPPTR_ENC16) | |
2970 #error unsupported legacy feature option DUK_OPT_HEAPPTR_ENC16 used | |
2971 #endif | |
2972 #if defined(DUK_OPT_INTERRUPT_COUNTER) | |
2973 #error unsupported legacy feature option DUK_OPT_INTERRUPT_COUNTER used | |
2974 #endif | |
2975 #if defined(DUK_OPT_JSON_STRINGIFY_FASTPATH) | |
2976 #error unsupported legacy feature option DUK_OPT_JSON_STRINGIFY_FASTPATH used | |
2977 #endif | |
2978 #if defined(DUK_OPT_LIGHTFUNC_BUILTINS) | |
2979 #error unsupported legacy feature option DUK_OPT_LIGHTFUNC_BUILTINS used | |
2980 #endif | |
2981 #if defined(DUK_OPT_NONSTD_FUNC_CALLER_PROPERTY) | |
2982 #error unsupported legacy feature option DUK_OPT_NONSTD_FUNC_CALLER_PROPERTY used | |
2983 #endif | |
2984 #if defined(DUK_OPT_NONSTD_FUNC_SOURCE_PROPERTY) | |
2985 #error unsupported legacy feature option DUK_OPT_NONSTD_FUNC_SOURCE_PROPERTY used | |
2986 #endif | |
2987 #if defined(DUK_OPT_NO_ARRAY_SPLICE_NONSTD_DELCOUNT) | |
2988 #error unsupported legacy feature option DUK_OPT_NO_ARRAY_SPLICE_NONSTD_DELCOUNT used | |
2989 #endif | |
2990 #if defined(DUK_OPT_NO_AUGMENT_ERRORS) | |
2991 #error unsupported legacy feature option DUK_OPT_NO_AUGMENT_ERRORS used | |
2992 #endif | |
2993 #if defined(DUK_OPT_NO_BROWSER_LIKE) | |
2994 #error unsupported legacy feature option DUK_OPT_NO_BROWSER_LIKE used | |
2995 #endif | |
2996 #if defined(DUK_OPT_NO_BUFFEROBJECT_SUPPORT) | |
2997 #error unsupported legacy feature option DUK_OPT_NO_BUFFEROBJECT_SUPPORT used | |
2998 #endif | |
2999 #if defined(DUK_OPT_NO_BYTECODE_DUMP_SUPPORT) | |
3000 #error unsupported legacy feature option DUK_OPT_NO_BYTECODE_DUMP_SUPPORT used | |
3001 #endif | |
3002 #if defined(DUK_OPT_NO_COMMONJS_MODULES) | |
3003 #error unsupported legacy feature option DUK_OPT_NO_COMMONJS_MODULES used | |
3004 #endif | |
3005 #if defined(DUK_OPT_NO_ES6_OBJECT_PROTO_PROPERTY) | |
3006 #error unsupported legacy feature option DUK_OPT_NO_ES6_OBJECT_PROTO_PROPERTY used | |
3007 #endif | |
3008 #if defined(DUK_OPT_NO_ES6_OBJECT_SETPROTOTYPEOF) | |
3009 #error unsupported legacy feature option DUK_OPT_NO_ES6_OBJECT_SETPROTOTYPEOF used | |
3010 #endif | |
3011 #if defined(DUK_OPT_NO_ES6_PROXY) | |
3012 #error unsupported legacy feature option DUK_OPT_NO_ES6_PROXY used | |
3013 #endif | |
3014 #if defined(DUK_OPT_NO_FILE_IO) | |
3015 #error unsupported legacy feature option DUK_OPT_NO_FILE_IO used | |
3016 #endif | |
3017 #if defined(DUK_OPT_NO_FUNC_STMT) | |
3018 #error unsupported legacy feature option DUK_OPT_NO_FUNC_STMT used | |
3019 #endif | |
3020 #if defined(DUK_OPT_NO_JC) | |
3021 #error unsupported legacy feature option DUK_OPT_NO_JC used | |
3022 #endif | |
3023 #if defined(DUK_OPT_NO_JSONC) | |
3024 #error unsupported legacy feature option DUK_OPT_NO_JSONC used | |
3025 #endif | |
3026 #if defined(DUK_OPT_NO_JSONX) | |
3027 #error unsupported legacy feature option DUK_OPT_NO_JSONX used | |
3028 #endif | |
3029 #if defined(DUK_OPT_NO_JX) | |
3030 #error unsupported legacy feature option DUK_OPT_NO_JX used | |
3031 #endif | |
3032 #if defined(DUK_OPT_NO_MARK_AND_SWEEP) | |
3033 #error unsupported legacy feature option DUK_OPT_NO_MARK_AND_SWEEP used | |
3034 #endif | |
3035 #if defined(DUK_OPT_NO_MS_STRINGTABLE_RESIZE) | |
3036 #error unsupported legacy feature option DUK_OPT_NO_MS_STRINGTABLE_RESIZE used | |
3037 #endif | |
3038 #if defined(DUK_OPT_NO_NONSTD_ACCESSOR_KEY_ARGUMENT) | |
3039 #error unsupported legacy feature option DUK_OPT_NO_NONSTD_ACCESSOR_KEY_ARGUMENT used | |
3040 #endif | |
3041 #if defined(DUK_OPT_NO_NONSTD_ARRAY_CONCAT_TRAILER) | |
3042 #error unsupported legacy feature option DUK_OPT_NO_NONSTD_ARRAY_CONCAT_TRAILER used | |
3043 #endif | |
3044 #if defined(DUK_OPT_NO_NONSTD_ARRAY_MAP_TRAILER) | |
3045 #error unsupported legacy feature option DUK_OPT_NO_NONSTD_ARRAY_MAP_TRAILER used | |
3046 #endif | |
3047 #if defined(DUK_OPT_NO_NONSTD_ARRAY_SPLICE_DELCOUNT) | |
3048 #error unsupported legacy feature option DUK_OPT_NO_NONSTD_ARRAY_SPLICE_DELCOUNT used | |
3049 #endif | |
3050 #if defined(DUK_OPT_NO_NONSTD_FUNC_STMT) | |
3051 #error unsupported legacy feature option DUK_OPT_NO_NONSTD_FUNC_STMT used | |
3052 #endif | |
3053 #if defined(DUK_OPT_NO_NONSTD_JSON_ESC_U2028_U2029) | |
3054 #error unsupported legacy feature option DUK_OPT_NO_NONSTD_JSON_ESC_U2028_U2029 used | |
3055 #endif | |
3056 #if defined(DUK_OPT_NO_NONSTD_STRING_FROMCHARCODE_32BIT) | |
3057 #error unsupported legacy feature option DUK_OPT_NO_NONSTD_STRING_FROMCHARCODE_32BIT used | |
3058 #endif | |
3059 #if defined(DUK_OPT_NO_OBJECT_ES6_PROTO_PROPERTY) | |
3060 #error unsupported legacy feature option DUK_OPT_NO_OBJECT_ES6_PROTO_PROPERTY used | |
3061 #endif | |
3062 #if defined(DUK_OPT_NO_OBJECT_ES6_SETPROTOTYPEOF) | |
3063 #error unsupported legacy feature option DUK_OPT_NO_OBJECT_ES6_SETPROTOTYPEOF used | |
3064 #endif | |
3065 #if defined(DUK_OPT_NO_OCTAL_SUPPORT) | |
3066 #error unsupported legacy feature option DUK_OPT_NO_OCTAL_SUPPORT used | |
3067 #endif | |
3068 #if defined(DUK_OPT_NO_PACKED_TVAL) | |
3069 #error unsupported legacy feature option DUK_OPT_NO_PACKED_TVAL used | |
3070 #endif | |
3071 #if defined(DUK_OPT_NO_PC2LINE) | |
3072 #error unsupported legacy feature option DUK_OPT_NO_PC2LINE used | |
3073 #endif | |
3074 #if defined(DUK_OPT_NO_REFERENCE_COUNTING) | |
3075 #error unsupported legacy feature option DUK_OPT_NO_REFERENCE_COUNTING used | |
3076 #endif | |
3077 #if defined(DUK_OPT_NO_REGEXP_SUPPORT) | |
3078 #error unsupported legacy feature option DUK_OPT_NO_REGEXP_SUPPORT used | |
3079 #endif | |
3080 #if defined(DUK_OPT_NO_SECTION_B) | |
3081 #error unsupported legacy feature option DUK_OPT_NO_SECTION_B used | |
3082 #endif | |
3083 #if defined(DUK_OPT_NO_SOURCE_NONBMP) | |
3084 #error unsupported legacy feature option DUK_OPT_NO_SOURCE_NONBMP used | |
3085 #endif | |
3086 #if defined(DUK_OPT_NO_STRICT_DECL) | |
3087 #error unsupported legacy feature option DUK_OPT_NO_STRICT_DECL used | |
3088 #endif | |
3089 #if defined(DUK_OPT_NO_TRACEBACKS) | |
3090 #error unsupported legacy feature option DUK_OPT_NO_TRACEBACKS used | |
3091 #endif | |
3092 #if defined(DUK_OPT_NO_VERBOSE_ERRORS) | |
3093 #error unsupported legacy feature option DUK_OPT_NO_VERBOSE_ERRORS used | |
3094 #endif | |
3095 #if defined(DUK_OPT_NO_VOLUNTARY_GC) | |
3096 #error unsupported legacy feature option DUK_OPT_NO_VOLUNTARY_GC used | |
3097 #endif | |
3098 #if defined(DUK_OPT_NO_ZERO_BUFFER_DATA) | |
3099 #error unsupported legacy feature option DUK_OPT_NO_ZERO_BUFFER_DATA used | |
3100 #endif | |
3101 #if defined(DUK_OPT_OBJSIZES16) | |
3102 #error unsupported legacy feature option DUK_OPT_OBJSIZES16 used | |
3103 #endif | |
3104 #if defined(DUK_OPT_PANIC_HANDLER) | |
3105 #error unsupported legacy feature option DUK_OPT_PANIC_HANDLER used | |
3106 #endif | |
3107 #if defined(DUK_OPT_REFCOUNT16) | |
3108 #error unsupported legacy feature option DUK_OPT_REFCOUNT16 used | |
3109 #endif | |
3110 #if defined(DUK_OPT_SEGFAULT_ON_PANIC) | |
3111 #error unsupported legacy feature option DUK_OPT_SEGFAULT_ON_PANIC used | |
3112 #endif | |
3113 #if defined(DUK_OPT_SELF_TESTS) | |
3114 #error unsupported legacy feature option DUK_OPT_SELF_TESTS used | |
3115 #endif | |
3116 #if defined(DUK_OPT_SETJMP) | |
3117 #error unsupported legacy feature option DUK_OPT_SETJMP used | |
3118 #endif | |
3119 #if defined(DUK_OPT_SHUFFLE_TORTURE) | |
3120 #error unsupported legacy feature option DUK_OPT_SHUFFLE_TORTURE used | |
3121 #endif | |
3122 #if defined(DUK_OPT_SIGSETJMP) | |
3123 #error unsupported legacy feature option DUK_OPT_SIGSETJMP used | |
3124 #endif | |
3125 #if defined(DUK_OPT_STRHASH16) | |
3126 #error unsupported legacy feature option DUK_OPT_STRHASH16 used | |
3127 #endif | |
3128 #if defined(DUK_OPT_STRICT_UTF8_SOURCE) | |
3129 #error unsupported legacy feature option DUK_OPT_STRICT_UTF8_SOURCE used | |
3130 #endif | |
3131 #if defined(DUK_OPT_STRLEN16) | |
3132 #error unsupported legacy feature option DUK_OPT_STRLEN16 used | |
3133 #endif | |
3134 #if defined(DUK_OPT_STRTAB_CHAIN) | |
3135 #error unsupported legacy feature option DUK_OPT_STRTAB_CHAIN used | |
3136 #endif | |
3137 #if defined(DUK_OPT_STRTAB_CHAIN_SIZE) | |
3138 #error unsupported legacy feature option DUK_OPT_STRTAB_CHAIN_SIZE used | |
3139 #endif | |
3140 #if defined(DUK_OPT_TARGET_INFO) | |
3141 #error unsupported legacy feature option DUK_OPT_TARGET_INFO used | |
3142 #endif | |
3143 #if defined(DUK_OPT_TRACEBACK_DEPTH) | |
3144 #error unsupported legacy feature option DUK_OPT_TRACEBACK_DEPTH used | |
3145 #endif | |
3146 #if defined(DUK_OPT_UNDERSCORE_SETJMP) | |
3147 #error unsupported legacy feature option DUK_OPT_UNDERSCORE_SETJMP used | |
3148 #endif | |
3149 #if defined(DUK_OPT_USER_INITJS) | |
3150 #error unsupported legacy feature option DUK_OPT_USER_INITJS used | |
3151 #endif | |
3152 | |
3153 /* | |
3606 * Checks for config option consistency (DUK_USE_xxx) | 3154 * Checks for config option consistency (DUK_USE_xxx) |
3607 */ | 3155 */ |
3608 | 3156 |
3609 #if defined(DUK_USE_32BIT_PTRS) | 3157 #if defined(DUK_USE_32BIT_PTRS) |
3610 #error unsupported config option used (option has been removed): DUK_USE_32BIT_PTRS | 3158 #error unsupported config option used (option has been removed): DUK_USE_32BIT_PTRS |
3613 #error unsupported config option used (option has been removed): DUK_USE_ALIGN_4 | 3161 #error unsupported config option used (option has been removed): DUK_USE_ALIGN_4 |
3614 #endif | 3162 #endif |
3615 #if defined(DUK_USE_ALIGN_8) | 3163 #if defined(DUK_USE_ALIGN_8) |
3616 #error unsupported config option used (option has been removed): DUK_USE_ALIGN_8 | 3164 #error unsupported config option used (option has been removed): DUK_USE_ALIGN_8 |
3617 #endif | 3165 #endif |
3166 #if defined(DUK_USE_BROWSER_LIKE) | |
3167 #error unsupported config option used (option has been removed): DUK_USE_BROWSER_LIKE | |
3168 #endif | |
3169 #if defined(DUK_USE_BUILTIN_INITJS) | |
3170 #error unsupported config option used (option has been removed): DUK_USE_BUILTIN_INITJS | |
3171 #endif | |
3618 #if defined(DUK_USE_BYTEORDER_FORCED) | 3172 #if defined(DUK_USE_BYTEORDER_FORCED) |
3619 #error unsupported config option used (option has been removed): DUK_USE_BYTEORDER_FORCED | 3173 #error unsupported config option used (option has been removed): DUK_USE_BYTEORDER_FORCED |
3620 #endif | 3174 #endif |
3621 #if defined(DUK_USE_DATAPTR_DEC16) && !defined(DUK_USE_DATAPTR16) | 3175 #if defined(DUK_USE_DATAPTR_DEC16) && !defined(DUK_USE_DATAPTR16) |
3622 #error config option DUK_USE_DATAPTR_DEC16 requires option DUK_USE_DATAPTR16 (which is missing) | 3176 #error config option DUK_USE_DATAPTR_DEC16 requires option DUK_USE_DATAPTR16 (which is missing) |
3623 #endif | 3177 #endif |
3624 #if defined(DUK_USE_DATAPTR_ENC16) && !defined(DUK_USE_DATAPTR16) | 3178 #if defined(DUK_USE_DATAPTR_ENC16) && !defined(DUK_USE_DATAPTR16) |
3625 #error config option DUK_USE_DATAPTR_ENC16 requires option DUK_USE_DATAPTR16 (which is missing) | 3179 #error config option DUK_USE_DATAPTR_ENC16 requires option DUK_USE_DATAPTR16 (which is missing) |
3626 #endif | 3180 #endif |
3181 #if defined(DUK_USE_DDDPRINT) | |
3182 #error unsupported config option used (option has been removed): DUK_USE_DDDPRINT | |
3183 #endif | |
3184 #if defined(DUK_USE_DDPRINT) | |
3185 #error unsupported config option used (option has been removed): DUK_USE_DDPRINT | |
3186 #endif | |
3187 #if defined(DUK_USE_DEBUGGER_FWD_LOGGING) | |
3188 #error unsupported config option used (option has been removed): DUK_USE_DEBUGGER_FWD_LOGGING | |
3189 #endif | |
3190 #if defined(DUK_USE_DEBUGGER_FWD_PRINTALERT) | |
3191 #error unsupported config option used (option has been removed): DUK_USE_DEBUGGER_FWD_PRINTALERT | |
3192 #endif | |
3627 #if defined(DUK_USE_DEBUGGER_SUPPORT) && !defined(DUK_USE_INTERRUPT_COUNTER) | 3193 #if defined(DUK_USE_DEBUGGER_SUPPORT) && !defined(DUK_USE_INTERRUPT_COUNTER) |
3628 #error config option DUK_USE_DEBUGGER_SUPPORT requires option DUK_USE_INTERRUPT_COUNTER (which is missing) | 3194 #error config option DUK_USE_DEBUGGER_SUPPORT requires option DUK_USE_INTERRUPT_COUNTER (which is missing) |
3629 #endif | 3195 #endif |
3630 #if defined(DUK_USE_DEEP_C_STACK) | 3196 #if defined(DUK_USE_DEEP_C_STACK) |
3631 #error unsupported config option used (option has been removed): DUK_USE_DEEP_C_STACK | 3197 #error unsupported config option used (option has been removed): DUK_USE_DEEP_C_STACK |
3655 #error config option DUK_USE_DOUBLE_ME conflicts with option DUK_USE_DOUBLE_LE (which is also defined) | 3221 #error config option DUK_USE_DOUBLE_ME conflicts with option DUK_USE_DOUBLE_LE (which is also defined) |
3656 #endif | 3222 #endif |
3657 #if defined(DUK_USE_DOUBLE_ME) && defined(DUK_USE_DOUBLE_BE) | 3223 #if defined(DUK_USE_DOUBLE_ME) && defined(DUK_USE_DOUBLE_BE) |
3658 #error config option DUK_USE_DOUBLE_ME conflicts with option DUK_USE_DOUBLE_BE (which is also defined) | 3224 #error config option DUK_USE_DOUBLE_ME conflicts with option DUK_USE_DOUBLE_BE (which is also defined) |
3659 #endif | 3225 #endif |
3226 #if defined(DUK_USE_DPRINT) | |
3227 #error unsupported config option used (option has been removed): DUK_USE_DPRINT | |
3228 #endif | |
3660 #if defined(DUK_USE_DPRINT) && !defined(DUK_USE_DEBUG) | 3229 #if defined(DUK_USE_DPRINT) && !defined(DUK_USE_DEBUG) |
3661 #error config option DUK_USE_DPRINT requires option DUK_USE_DEBUG (which is missing) | 3230 #error config option DUK_USE_DPRINT requires option DUK_USE_DEBUG (which is missing) |
3662 #endif | 3231 #endif |
3232 #if defined(DUK_USE_DPRINT_COLORS) | |
3233 #error unsupported config option used (option has been removed): DUK_USE_DPRINT_COLORS | |
3234 #endif | |
3235 #if defined(DUK_USE_DPRINT_RDTSC) | |
3236 #error unsupported config option used (option has been removed): DUK_USE_DPRINT_RDTSC | |
3237 #endif | |
3238 #if defined(DUK_USE_ES6_REGEXP_BRACES) | |
3239 #error unsupported config option used (option has been removed): DUK_USE_ES6_REGEXP_BRACES | |
3240 #endif | |
3663 #if defined(DUK_USE_ESBC_MAX_BYTES) && !defined(DUK_USE_ESBC_LIMITS) | 3241 #if defined(DUK_USE_ESBC_MAX_BYTES) && !defined(DUK_USE_ESBC_LIMITS) |
3664 #error config option DUK_USE_ESBC_MAX_BYTES requires option DUK_USE_ESBC_LIMITS (which is missing) | 3242 #error config option DUK_USE_ESBC_MAX_BYTES requires option DUK_USE_ESBC_LIMITS (which is missing) |
3665 #endif | 3243 #endif |
3666 #if defined(DUK_USE_ESBC_MAX_LINENUMBER) && !defined(DUK_USE_ESBC_LIMITS) | 3244 #if defined(DUK_USE_ESBC_MAX_LINENUMBER) && !defined(DUK_USE_ESBC_LIMITS) |
3667 #error config option DUK_USE_ESBC_MAX_LINENUMBER requires option DUK_USE_ESBC_LIMITS (which is missing) | 3245 #error config option DUK_USE_ESBC_MAX_LINENUMBER requires option DUK_USE_ESBC_LIMITS (which is missing) |
3673 #error config option DUK_USE_EXTSTR_FREE requires option DUK_USE_HSTRING_EXTDATA (which is missing) | 3251 #error config option DUK_USE_EXTSTR_FREE requires option DUK_USE_HSTRING_EXTDATA (which is missing) |
3674 #endif | 3252 #endif |
3675 #if defined(DUK_USE_EXTSTR_INTERN_CHECK) && !defined(DUK_USE_HSTRING_EXTDATA) | 3253 #if defined(DUK_USE_EXTSTR_INTERN_CHECK) && !defined(DUK_USE_HSTRING_EXTDATA) |
3676 #error config option DUK_USE_EXTSTR_INTERN_CHECK requires option DUK_USE_HSTRING_EXTDATA (which is missing) | 3254 #error config option DUK_USE_EXTSTR_INTERN_CHECK requires option DUK_USE_HSTRING_EXTDATA (which is missing) |
3677 #endif | 3255 #endif |
3256 #if defined(DUK_USE_FASTINT) && !defined(DUK_USE_64BIT_OPS) | |
3257 #error config option DUK_USE_FASTINT requires option DUK_USE_64BIT_OPS (which is missing) | |
3258 #endif | |
3259 #if defined(DUK_USE_FILE_IO) | |
3260 #error unsupported config option used (option has been removed): DUK_USE_FILE_IO | |
3261 #endif | |
3678 #if defined(DUK_USE_FULL_TVAL) | 3262 #if defined(DUK_USE_FULL_TVAL) |
3679 #error unsupported config option used (option has been removed): DUK_USE_FULL_TVAL | 3263 #error unsupported config option used (option has been removed): DUK_USE_FULL_TVAL |
3680 #endif | 3264 #endif |
3681 #if defined(DUK_USE_FUNCPTR_DEC16) && !defined(DUK_USE_FUNCPTR16) | 3265 #if defined(DUK_USE_FUNCPTR_DEC16) && !defined(DUK_USE_FUNCPTR16) |
3682 #error config option DUK_USE_FUNCPTR_DEC16 requires option DUK_USE_FUNCPTR16 (which is missing) | 3266 #error config option DUK_USE_FUNCPTR_DEC16 requires option DUK_USE_FUNCPTR16 (which is missing) |
3721 #error config option DUK_USE_INTEGER_ME conflicts with option DUK_USE_INTEGER_LE (which is also defined) | 3305 #error config option DUK_USE_INTEGER_ME conflicts with option DUK_USE_INTEGER_LE (which is also defined) |
3722 #endif | 3306 #endif |
3723 #if defined(DUK_USE_INTEGER_ME) && defined(DUK_USE_INTEGER_BE) | 3307 #if defined(DUK_USE_INTEGER_ME) && defined(DUK_USE_INTEGER_BE) |
3724 #error config option DUK_USE_INTEGER_ME conflicts with option DUK_USE_INTEGER_BE (which is also defined) | 3308 #error config option DUK_USE_INTEGER_ME conflicts with option DUK_USE_INTEGER_BE (which is also defined) |
3725 #endif | 3309 #endif |
3310 #if defined(DUK_USE_MARK_AND_SWEEP) | |
3311 #error unsupported config option used (option has been removed): DUK_USE_MARK_AND_SWEEP | |
3312 #endif | |
3313 #if defined(DUK_USE_MATH_FMAX) | |
3314 #error unsupported config option used (option has been removed): DUK_USE_MATH_FMAX | |
3315 #endif | |
3316 #if defined(DUK_USE_MATH_FMIN) | |
3317 #error unsupported config option used (option has been removed): DUK_USE_MATH_FMIN | |
3318 #endif | |
3319 #if defined(DUK_USE_MATH_ROUND) | |
3320 #error unsupported config option used (option has been removed): DUK_USE_MATH_ROUND | |
3321 #endif | |
3322 #if defined(DUK_USE_NONSTD_REGEXP_DOLLAR_ESCAPE) | |
3323 #error unsupported config option used (option has been removed): DUK_USE_NONSTD_REGEXP_DOLLAR_ESCAPE | |
3324 #endif | |
3726 #if defined(DUK_USE_NO_DOUBLE_ALIASING_SELFTEST) | 3325 #if defined(DUK_USE_NO_DOUBLE_ALIASING_SELFTEST) |
3727 #error unsupported config option used (option has been removed): DUK_USE_NO_DOUBLE_ALIASING_SELFTEST | 3326 #error unsupported config option used (option has been removed): DUK_USE_NO_DOUBLE_ALIASING_SELFTEST |
3728 #endif | 3327 #endif |
3328 #if defined(DUK_USE_OCTAL_SUPPORT) | |
3329 #error unsupported config option used (option has been removed): DUK_USE_OCTAL_SUPPORT | |
3330 #endif | |
3729 #if defined(DUK_USE_PACKED_TVAL_POSSIBLE) | 3331 #if defined(DUK_USE_PACKED_TVAL_POSSIBLE) |
3730 #error unsupported config option used (option has been removed): DUK_USE_PACKED_TVAL_POSSIBLE | 3332 #error unsupported config option used (option has been removed): DUK_USE_PACKED_TVAL_POSSIBLE |
3731 #endif | 3333 #endif |
3334 #if defined(DUK_USE_PANIC_ABORT) | |
3335 #error unsupported config option used (option has been removed): DUK_USE_PANIC_ABORT | |
3336 #endif | |
3337 #if defined(DUK_USE_PANIC_EXIT) | |
3338 #error unsupported config option used (option has been removed): DUK_USE_PANIC_EXIT | |
3339 #endif | |
3340 #if defined(DUK_USE_PANIC_HANDLER) | |
3341 #error unsupported config option used (option has been removed): DUK_USE_PANIC_HANDLER | |
3342 #endif | |
3343 #if defined(DUK_USE_PANIC_SEGFAULT) | |
3344 #error unsupported config option used (option has been removed): DUK_USE_PANIC_SEGFAULT | |
3345 #endif | |
3346 #if defined(DUK_USE_POW_NETBSD_WORKAROUND) | |
3347 #error unsupported config option used (option has been removed): DUK_USE_POW_NETBSD_WORKAROUND | |
3348 #endif | |
3732 #if defined(DUK_USE_RDTSC) | 3349 #if defined(DUK_USE_RDTSC) |
3733 #error unsupported config option used (option has been removed): DUK_USE_RDTSC | 3350 #error unsupported config option used (option has been removed): DUK_USE_RDTSC |
3734 #endif | 3351 #endif |
3735 #if defined(DUK_USE_ROM_GLOBAL_CLONE) && !defined(DUK_USE_ROM_STRINGS) | 3352 #if defined(DUK_USE_ROM_GLOBAL_CLONE) && !defined(DUK_USE_ROM_STRINGS) |
3736 #error config option DUK_USE_ROM_GLOBAL_CLONE requires option DUK_USE_ROM_STRINGS (which is missing) | 3353 #error config option DUK_USE_ROM_GLOBAL_CLONE requires option DUK_USE_ROM_STRINGS (which is missing) |
3771 #if defined(DUK_USE_UNALIGNED_ACCESSES_POSSIBLE) | 3388 #if defined(DUK_USE_UNALIGNED_ACCESSES_POSSIBLE) |
3772 #error unsupported config option used (option has been removed): DUK_USE_UNALIGNED_ACCESSES_POSSIBLE | 3389 #error unsupported config option used (option has been removed): DUK_USE_UNALIGNED_ACCESSES_POSSIBLE |
3773 #endif | 3390 #endif |
3774 #if defined(DUK_USE_UNDERSCORE_SETJMP) | 3391 #if defined(DUK_USE_UNDERSCORE_SETJMP) |
3775 #error unsupported config option used (option has been removed): DUK_USE_UNDERSCORE_SETJMP | 3392 #error unsupported config option used (option has been removed): DUK_USE_UNDERSCORE_SETJMP |
3393 #endif | |
3394 #if defined(DUK_USE_USER_INITJS) | |
3395 #error unsupported config option used (option has been removed): DUK_USE_USER_INITJS | |
3776 #endif | 3396 #endif |
3777 | 3397 |
3778 #if defined(DUK_USE_CPP_EXCEPTIONS) && !defined(__cplusplus) | 3398 #if defined(DUK_USE_CPP_EXCEPTIONS) && !defined(__cplusplus) |
3779 #error DUK_USE_CPP_EXCEPTIONS enabled but not compiling with a C++ compiler | 3399 #error DUK_USE_CPP_EXCEPTIONS enabled but not compiling with a C++ compiler |
3780 #endif | 3400 #endif |