* Add DUK_BSWAP64() fill-in when 64-bit types available.
* Add DUK_BSWAP16(), DUK_BSWAP32(), and DUK_BSWAP64() GCC and Clang
built-ins. These are nice but unnecessary except at low optimizations
because the macros compile down to proper bswap instructions.
* Improve bswap self tests.
* Change duk_bool_to to duk_small_uint_t from duk_small_int_t. This may
cause some sign warnings in calling code.
* Reject attempt to unpack an array-like value whose length is 2G or over;
previously was not checked explicitly, and the length was cast to duk_idx_t
with a sign change and the unpack would then later fail. Now it fails with
a clean RangeError.
* Add wrap check for Node.js Buffer.concat().
* API DUK_TYPE_xxx, DUK_TYPE_MASK_xxx, flag constants etc are now unsigned.
Replaced #ifdefs with DUK_U64_CONSTANT and DUK_I64_CONSTANT macros for cleaner
code and to prevent future breakage, as suggested by svaarala.
Missed a few replacements. Added.
Last one.
Changed parameter name from x to a.
Split MinGW and MSVC typedefs for 64-bit types.
Added myself to list of code contributors.
The Durango platform is used by the Xbox One.
This platform currently differs from the Windows platform only in that
it does not support the SystemTimeToTzSpecificLocalTime API.
When applied to a function declaration the __attribute__ ((unused)
declaration indicates a function may be unused so that the compiler
won't warn about it if it actually is. This reduces harmless warnings
when a function is unused due to a specific config option combination.
Apply to all Clang versions and GCC >= 3.1.1; GCC 3.1.1 manual confirms
__attribute__ ((unused)) is supported.
* Add DUK_USE_CPP_EXCEPTIONS (DUK_OPT_CPP_EXCEPTIONS) which causes Duktape
to use C++ try/catch instead of longjmp/setjmp for internal long control
transfers. When try/catch is used scope-based resource management
(SBRM, a special case of RAII) works as expected, e.g. C++ automatic
destructors in Duktape/C functions will be executed.
* Add <exception> header to shared headers when compiling in C++ mode.
The header is needed to provide std::exception.
* Add a sanity check: if DUK_USE_CPP_EXCEPTIONS is enabled and not
compiling with a C++ compiler, fail the compile with an explicit #error.