Skip to content

Commit

Permalink
app_jsdt: updated duktape js engine to v2.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Dec 6, 2018
1 parent beb99b3 commit f244875
Show file tree
Hide file tree
Showing 3 changed files with 3,979 additions and 2,260 deletions.
132 changes: 61 additions & 71 deletions src/modules/app_jsdt/duk_config.h
@@ -1,9 +1,9 @@
/*
* duk_config.h configuration header generated by genconfig.py.
*
* Git commit: 25420e773c5fbc50d5b46bf487fc45717e35b94f
* Git describe: v2.2.1
* Git branch: v2.2-maintenance
* Git commit: d7fdb67f18561a50e06bafd196c6b423af9ad6fe
* Git describe: v2.3.0
* Git branch: master
*
* Supported platforms:
* - Mac OSX, iPhone, Darwin
Expand Down Expand Up @@ -218,12 +218,6 @@
#define DUK_F_UNIX
#endif

/* C++ */
#undef DUK_F_CPP
#if defined(__cplusplus)
#define DUK_F_CPP
#endif

/* Intel x86 (32-bit), x64 (64-bit) or x32 (64-bit but 32-bit pointers),
* define only one of DUK_F_X86, DUK_F_X64, DUK_F_X32.
* https://sites.google.com/site/x32abi/
Expand Down Expand Up @@ -301,6 +295,12 @@
#define DUK_F_CLANG
#endif

/* C++ */
#undef DUK_F_CPP
#if defined(__cplusplus)
#define DUK_F_CPP
#endif

/* C99 or above */
#undef DUK_F_C99
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
Expand Down Expand Up @@ -836,9 +836,7 @@
#include <stdint.h>
#endif

#if defined(DUK_F_CPP)
#include <exception> /* std::exception */
#endif
/* <exception> is only included if needed, based on DUK_USE_xxx flags. */

/*
* Architecture autodetection
Expand All @@ -850,26 +848,23 @@
#if !defined(DUK_USE_BYTEORDER)
#define DUK_USE_BYTEORDER 1
#endif
/* XXX: This is technically not guaranteed because it's possible to configure
* an x86 to require aligned accesses with Alignment Check (AC) flag.

#define DUK_USE_PACKED_TVAL

/* FreeBSD, -m32, and clang prior to 5.0 has union aliasing issues which
* break duk_tval copying. Disable packed duk_tval automatically.
*/
#if !defined(DUK_USE_ALIGN_BY)
#define DUK_USE_ALIGN_BY 1
#if defined(DUK_F_FREEBSD) && defined(DUK_F_X86) && \
defined(__clang__) && defined(__clang_major__) && (__clang_major__ < 5)
#undef DUK_USE_PACKED_TVAL
#endif
#define DUK_USE_PACKED_TVAL
#define DUK_F_PACKED_TVAL_PROVIDED
#elif defined(DUK_F_X64)
/* --- x64 --- */
#define DUK_USE_ARCH_STRING "x64"
#if !defined(DUK_USE_BYTEORDER)
#define DUK_USE_BYTEORDER 1
#endif
/* XXX: This is technically not guaranteed because it's possible to configure
* an x86 to require aligned accesses with Alignment Check (AC) flag.
*/
#if !defined(DUK_USE_ALIGN_BY)
#define DUK_USE_ALIGN_BY 1
#endif
#undef DUK_USE_PACKED_TVAL
#define DUK_F_PACKED_TVAL_PROVIDED
#elif defined(DUK_F_X32)
Expand All @@ -878,48 +873,30 @@
#if !defined(DUK_USE_BYTEORDER)
#define DUK_USE_BYTEORDER 1
#endif
/* XXX: This is technically not guaranteed because it's possible to configure
* an x86 to require aligned accesses with Alignment Check (AC) flag.
*/
#if !defined(DUK_USE_ALIGN_BY)
#define DUK_USE_ALIGN_BY 1
#endif
#define DUK_USE_PACKED_TVAL
#define DUK_F_PACKED_TVAL_PROVIDED
#elif defined(DUK_F_ARM32)
/* --- ARM 32-bit --- */
#define DUK_USE_ARCH_STRING "arm32"
/* Byte order varies, so rely on autodetect. */
#if !defined(DUK_USE_ALIGN_BY)
#define DUK_USE_ALIGN_BY 4
#endif
#define DUK_USE_PACKED_TVAL
#define DUK_F_PACKED_TVAL_PROVIDED
#elif defined(DUK_F_ARM64)
/* --- ARM 64-bit --- */
#define DUK_USE_ARCH_STRING "arm64"
/* Byte order varies, so rely on autodetect. */
#if !defined(DUK_USE_ALIGN_BY)
#define DUK_USE_ALIGN_BY 8
#endif
#undef DUK_USE_PACKED_TVAL
#define DUK_F_PACKED_TVAL_PROVIDED
#elif defined(DUK_F_MIPS32)
/* --- MIPS 32-bit --- */
#define DUK_USE_ARCH_STRING "mips32"
/* MIPS byte order varies so rely on autodetection. */
#if !defined(DUK_USE_ALIGN_BY)
#define DUK_USE_ALIGN_BY 8
#endif
#define DUK_USE_PACKED_TVAL
#define DUK_F_PACKED_TVAL_PROVIDED
#elif defined(DUK_F_MIPS64)
/* --- MIPS 64-bit --- */
#define DUK_USE_ARCH_STRING "mips64"
/* MIPS byte order varies so rely on autodetection. */
#if !defined(DUK_USE_ALIGN_BY)
#define DUK_USE_ALIGN_BY 8
#endif
#undef DUK_USE_PACKED_TVAL
#define DUK_F_PACKED_TVAL_PROVIDED
#elif defined(DUK_F_PPC32)
Expand All @@ -928,9 +905,6 @@
#if !defined(DUK_USE_BYTEORDER)
#define DUK_USE_BYTEORDER 3
#endif
#if !defined(DUK_USE_ALIGN_BY)
#define DUK_USE_ALIGN_BY 8
#endif
#define DUK_USE_PACKED_TVAL
#define DUK_F_PACKED_TVAL_PROVIDED
#elif defined(DUK_F_PPC64)
Expand All @@ -939,39 +913,24 @@
#if !defined(DUK_USE_BYTEORDER)
#define DUK_USE_BYTEORDER 3
#endif
#if !defined(DUK_USE_ALIGN_BY)
#define DUK_USE_ALIGN_BY 8
#endif
#undef DUK_USE_PACKED_TVAL
#define DUK_F_PACKED_TVAL_PROVIDED
#elif defined(DUK_F_SPARC32)
/* --- SPARC 32-bit --- */
#define DUK_USE_ARCH_STRING "sparc32"
/* SPARC byte order varies so rely on autodetection. */
#if !defined(DUK_USE_ALIGN_BY)
#define DUK_USE_ALIGN_BY 8
#endif
#define DUK_USE_PACKED_TVAL
#define DUK_F_PACKED_TVAL_PROVIDED
#elif defined(DUK_F_SPARC64)
/* --- SPARC 64-bit --- */
#define DUK_USE_ARCH_STRING "sparc64"
/* SPARC byte order varies so rely on autodetection. */
#if !defined(DUK_USE_ALIGN_BY)
#define DUK_USE_ALIGN_BY 8
#endif
#undef DUK_USE_PACKED_TVAL
#define DUK_F_PACKED_TVAL_PROVIDED
#elif defined(DUK_F_SUPERH)
/* --- SuperH --- */
#define DUK_USE_ARCH_STRING "sh"
/* Byte order varies, rely on autodetection. */
/* Based on 'make checkalign' there are no alignment requirements on
* Linux SH4, but align by 4 is probably a good basic default.
*/
#if !defined(DUK_USE_ALIGN_BY)
#define DUK_USE_ALIGN_BY 4
#endif
#define DUK_USE_PACKED_TVAL
#define DUK_F_PACKED_TVAL_PROVIDED
#elif defined(DUK_F_M68K)
Expand All @@ -980,9 +939,6 @@
#if !defined(DUK_USE_BYTEORDER)
#define DUK_USE_BYTEORDER 3
#endif
#if !defined(DUK_USE_ALIGN_BY)
#define DUK_USE_ALIGN_BY 8
#endif
#define DUK_USE_PACKED_TVAL
#define DUK_F_PACKED_TVAL_PROVIDED
#elif defined(DUK_F_EMSCRIPTEN)
Expand All @@ -991,9 +947,6 @@
#if !defined(DUK_USE_BYTEORDER)
#define DUK_USE_BYTEORDER 1
#endif
#if !defined(DUK_USE_ALIGN_BY)
#define DUK_USE_ALIGN_BY 8
#endif
#undef DUK_USE_PACKED_TVAL
#define DUK_F_PACKED_TVAL_PROVIDED
#else
Expand Down Expand Up @@ -2540,10 +2493,13 @@ typedef struct duk_hthread duk_context;
*
* Assume unaligned accesses are not supported unless specifically allowed
* in the target platform. Some platforms may support unaligned accesses
* but alignment to 4 or 8 may still be desirable.
* but alignment to 4 or 8 may still be desirable. Note that unaligned
* accesses (and even pointers) relative to natural alignment (regardless
* of target alignment) are technically undefined behavior and thus
* compiler/architecture specific.
*/

/* If not provided, use safe default for alignment. */
/* If not forced, use safe default for alignment. */
#if !defined(DUK_USE_ALIGN_BY)
#define DUK_USE_ALIGN_BY 8
#endif
Expand Down Expand Up @@ -2595,6 +2551,7 @@ typedef struct duk_hthread duk_context;
*/
#define DUK_CAUSE_SEGFAULT() do { *((volatile duk_uint32_t *) NULL) = (duk_uint32_t) 0xdeadbeefUL; } while (0)
#endif

#if !defined(DUK_UNREF)
/* Macro for suppressing warnings for potentially unreferenced variables.
* The variables can be actually unreferenced or unreferenced in some
Expand All @@ -2604,16 +2561,32 @@ typedef struct duk_hthread duk_context;
*/
#define DUK_UNREF(x) do { (void) (x); } while (0)
#endif
#if !defined(DUK_NORETURN)

/* Fillin for DUK_NORETURN; DUK_WO_NORETURN() is used to insert dummy
* dummy statements after noreturn calls to silence harmless compiler
* warnings, e.g.:
*
* DUK_ERROR_TYPE(thr, "aiee");
* DUK_WO_NORETURN(return 0;);
*
* Statements inside DUK_WO_NORETURN() must NEVER be actually reachable,
* and they're only included to satisfy the compiler.
*/
#if defined(DUK_NORETURN)
#define DUK_WO_NORETURN(stmt) do { } while (0)
#else
#define DUK_NORETURN(decl) decl
#define DUK_WO_NORETURN(stmt) do { stmt } while (0)
#endif

#if !defined(DUK_UNREACHABLE)
/* Don't know how to declare unreachable point, so don't do it; this
* may cause some spurious compilation warnings (e.g. "variable used
* uninitialized").
*/
#define DUK_UNREACHABLE() do { } while (0)
#endif

#if !defined(DUK_LOSE_CONST)
/* Convert any input pointer into a "void *", losing a const qualifier.
* This is not fully portable because casting through duk_uintptr_t may
Expand Down Expand Up @@ -2781,8 +2754,8 @@ typedef struct duk_hthread duk_context;
#if defined(DUK_F_PACKED_TVAL_POSSIBLE)
#define DUK_USE_PACKED_TVAL
#endif

#undef DUK_F_PACKED_TVAL_POSSIBLE

#endif /* DUK_F_PACKED_TVAL_PROVIDED */
/* Object property allocation layout has implications for memory and code
* footprint and generated code size/speed. The best layout also depends
Expand Down Expand Up @@ -2817,6 +2790,7 @@ typedef struct duk_hthread duk_context;
* Autogenerated defaults
*/

#undef DUK_USE_ALLOW_UNDEFINED_BEHAVIOR
#define DUK_USE_ARRAY_BUILTIN
#define DUK_USE_ARRAY_FASTPATH
#define DUK_USE_ARRAY_PROP_FASTPATH
Expand All @@ -2825,6 +2799,7 @@ typedef struct duk_hthread duk_context;
#define DUK_USE_AUGMENT_ERROR_THROW
#define DUK_USE_AVOID_PLATFORM_FUNCPTRS
#define DUK_USE_BASE64_FASTPATH
#define DUK_USE_BASE64_SUPPORT
#define DUK_USE_BOOLEAN_BUILTIN
#define DUK_USE_BUFFEROBJECT_SUPPORT
#undef DUK_USE_BUFLEN16
Expand Down Expand Up @@ -2902,6 +2877,7 @@ typedef struct duk_hthread duk_context;
#undef DUK_USE_HEAPPTR_DEC16
#undef DUK_USE_HEAPPTR_ENC16
#define DUK_USE_HEX_FASTPATH
#define DUK_USE_HEX_SUPPORT
#define DUK_USE_HOBJECT_ARRAY_ABANDON_LIMIT 2
#define DUK_USE_HOBJECT_ARRAY_FAST_RESIZE_LIMIT 9
#define DUK_USE_HOBJECT_ARRAY_MINGROW_ADD 16
Expand Down Expand Up @@ -2932,11 +2908,10 @@ typedef struct duk_hthread duk_context;
#define DUK_USE_JX
#define DUK_USE_LEXER_SLIDING_WINDOW
#undef DUK_USE_LIGHTFUNC_BUILTINS
#define DUK_USE_LITCACHE_SIZE 256
#define DUK_USE_MARK_AND_SWEEP_RECLIMIT 256
#define DUK_USE_MATH_BUILTIN
#define DUK_USE_NATIVE_CALL_RECLIMIT 1000
#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
Expand Down Expand Up @@ -3011,6 +2986,15 @@ typedef struct duk_hthread duk_context;

/* __OVERRIDE_DEFINES__ */

/*
* Conditional includes
*/

#if defined(DUK_F_CPP) && defined(DUK_USE_CPP_EXCEPTIONS)
#include <exception> /* std::exception */
#include <stdexcept> /* std::runtime_error */
#endif

/*
* Date provider selection
*
Expand Down Expand Up @@ -3552,6 +3536,12 @@ typedef struct duk_hthread duk_context;
#if defined(DUK_USE_MS_STRINGTABLE_RESIZE)
#error unsupported config option used (option has been removed): DUK_USE_MS_STRINGTABLE_RESIZE
#endif
#if defined(DUK_USE_NONSTD_ARRAY_CONCAT_TRAILER)
#error unsupported config option used (option has been removed): DUK_USE_NONSTD_ARRAY_CONCAT_TRAILER
#endif
#if defined(DUK_USE_NONSTD_ARRAY_MAP_TRAILER)
#error unsupported config option used (option has been removed): DUK_USE_NONSTD_ARRAY_MAP_TRAILER
#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
Expand Down

0 comments on commit f244875

Please sign in to comment.