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.
Otherwise there are build errors with e.g. gcc -std=c89. Because the inline
macros are now in duk_config.h, the user can fix these manually anyway if
necessary.
- Disable JSON.stringify() fastpath by default
- Rework to use DUK_USE_ALIGN_BY config option
- Replace previous DUK_USE_ALIGN_4 and DUK_USE_ALIGN_8 with a cleaner
DUK_USE_ALIGN_BY config option (allowed values 1, 4, 8)
- Add fastpath tag in anticipation of automatic fastpath suggestions
or warnings