* Generate all duk_config.h headers using a single modular approach.
* Remove previous autodetect-header command and replace it with the
modular header.
Accept a plain buffer argument in typedarray constructor. Behavior will be
the same as for a Duktape.Buffer, i.e. the argument is treated as an array-like
initializer.
Zero buffer data explicitly for ArrayBuffer and typedarrays created, even when
DUK_USE_ZERO_BUFFER_DATA option is not set. Buffer zeroing is explicitly
required by Khronos/ES6.
Node.js Buffer does *not* zero buffer data by default, so this behavior
is not changed here: Node.js Buffers will be zeroed when
DUK_USE_ZERO_BUFFER_DATA is set, and left as garbage when not set.
- Set FINALIZED only when actually running finalizer to prevent
a finalizer running twice unless explicitly rescued (and the
flag cleared by the rescuing mark-and-sweep or refzero code).
- Add a guard to avoid re-finalizing until FINALIZED is explicitly
cleared on rescue by either mark-and-sweep or refcounting.
- Prevent mark-and-sweep and refzero from running when heap is
destroyed and finalizers are forcibly executed.
- Add a mark-and-sweep flag to skip finalizers: move any finalizable
objects back to heap_allocated. This is needed for correct
finalizer handling in heap destruction.
- Add second finalizer argument; if true, it indicates that the
heap is being destroyed and rescuing an object is not possible.
Finalizer should therefore free all native resources without
relying on the finalizer to be called again.
- Add multiple finalizer rounds for heap destruction to deal with
finalizers which create further finalizable objects. Also add
a sanity limit for this process to catch runaway finalizers.
- Explicit Proxy check just before running finalizer: don't run
finalizer for Proxy objects even when call site is buggy.
Src fiexs
- Faster hex decode invalid input check for duk_hex_decode() fast path
- Faster JX/JC hex encode
- Slightly faster JX/JC hex decode (avoid string intern for temp value)
- Relocate decode tables, they may be useful in other files later
- Loop typing changes