This fixes an assert failure but doesn't fix the "INVALID opcode (0)" bug
that happens for labelled non-iteration statements (basically labelled
blocks).
Add error handling discussion to Getting started, and a new section on
Error handling (#error-handling). Error handling has been quite confusing
for users, which was not helped by the Getting started examples NOT having
any error handling at all.
Also add a "protected" tag to safe API calls so that they're easy to link
to in the tag list.
Add DUK_SINGLE_FILE which was missing. This fix caused a lot of warnings
about unused static functions, so this fallout is also fixed by this merge.
Cygwin compile warning is also fixed by not using strptime() on Cygwin.
There's a compile warning of strptime() not being declared. It should be
declared by <time.h> but is maybe missing a macro. There are apparently
some limitations in strptime() too, so disable its use for now, as local
time parsing is not a mandatory feature.
These were revealed after fixing DUK_SINGLE_FILE, gcc will complain about
these internal functions being declared, defined, but not used. There were
also a few declared functions that did not exist. Compiled binary size was
reduced by a few kilobytes!
Unused functions must be commented out carefully: some functions might be
used with certain feature options but not by the defaults. These removals
were verified with grep.
There are no call sites for DUK_DEBUG_DUMP_HEAP() so all the functions
in duk_debug_heap.c are unused, even with a debug build.
Out of the checked allocation macros, only DUK_REALLOC_INDIRECT_CHECKED() is
actually in use at the moment. This commit just comments the unused stuff
out, but it might be better to just remove the unused stuff entirely.
This define was missing from the single file header build, which had the
impact of Duktape using incorrect symbol visibility macros. When this is
fixed, a lot of warnings are generated from unused static functions etc.
This fallout is fixed by follow-up commits.
Remove Duktape release binaries from the repo and use duktape-releases repo
for the website build.
Note that binaries are not purged from the Duktape main repository by
history rewriting to avoid breaking tags and commit hashes. The releases
should take less than 10MB so this should not be a big deal.