Use DUK_DPRINT instead of DUK_DPRINTF for heap stringtable dumps. This makes
the dump output go to stderr instead of stdout which is useful because it
allows e.g. testcase runs with debugs enabled.
Also fix typo which breaks compilation when using "chain" stringtable and no
pointer compression.
When Object.defineProperties() was used and set/get value was a lightfunc,
duk_to_object() was used for coercion. After the coercion, a previously
looked up duk_tval pointer was still being used; if the property table of
the property descriptor had been reallocated (pretty difficult to achieve
but possible, e.g. a finalizer triggered by GC could add an entry to it)
the duk_tval pointer could have been stale.
Rework the entire sequence a little bit and fix the issue in the process.
Add vararg variants: duk_error_va(), duk_push_error_object_va(), duk_log_va()
(see GH-65).
Also fix duk_push_error_object() problem when variadic macros are not
available (i.e. legacy platforms).
Add API calls:
- duk_error_va()
- duk_push_error_object_va()
- duk_log_va()
Also fix return value issue for duk_push_error_object() when variadic macros
are not available (i.e. legacy environments). The comma expression used by
the macro wasn't parenthesized which doesn't work correctly when the return
value is assigned to a variable.
There are some systems where SIZE_MAX is less than that even when the
platform is a 32-bit one. It's probably not useful to error out because
Duktape only uses SIZE_MAX for assertion(s) (only one assert right now).
Currently, it saves the output as `v20140814`, not `v20140814.tar.gz`.
And it causes build failures.
This change fixes it by specifying the output name explicitly.