The cast from duk_hbuffer to duk_hbuffer_fixed seemingly increases alignment
requirement from 4 to 8 because duk_hbuffer_fixed is forced to pack to 8 bytes
(so that data following the buffer is properly aligned). However, because the
struct base pointer is always aligned by 8 when the platform requires alignment
by 8, the warning is harmless and can be avoided by casting through a void *.
When noreturn attribute is not available, avoid warnings by e.g. returning
dummy values (never actually used because of e.g. a longjmp) with the
DUK_WO_NORETURN() macro.
In duk_bi_date_windows.c, the function duk__convert_filetime_to_ularge
is a static function called only from duk_bi_date_get_now_windows_subms,
which is wrapped in a #define.
This change wraps duk__convert_filetime_to_ularge in the same #define
to prevent compiler warnings about unused functions.
Clang warns about tmp being used uninitialized, but it is always assigned to
because the for-loop preceding the assignment runs from 1 to 3 and assigns to
tmp unconditionally on the first round. Work around the warning by assigning
tmp to zero unnecessarily.
* Keep .prototype value on stack while holding the 'proto' pointer, in case the
value is virtualized and comes from a getter or a Proxy.
* Improve error message for the case where the rval has no .prototype property.
This case comes up often with Duktape/C function constructors because they
don't have a .prototype property by default.
Use a single pause flags field to implement Resume, StepInto, StepOver,
and StepOut. This opens up possibilities for more Resume options, like
explicit control over whether to pause on caught vs. uncaught error.
Change StepOver, StepInto, and StepOut behavior when current activation
has no line information. Previously the commands were silently ignored
in this tate. The updated behavior is to ignore the line-based pause
trigger but obey the others, e.g. StepInto will pause on function entry,
function exit, and an error thrown past the current function.
* 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.