Move a few handpicked files from the alphabetical file list to the top of
the list to ensure that static data definitions appear before their first
use in a single file build.
This is necessary because there are no forward declarations for static data
symbols anymore (which was causing C++ issues). See GH-63.
When doing a single file build, drop DUK_INTERNAL_DECL declarations which
would otherwise be mapped to "static". This avoids the problem with C++
where a static data symbol is both forward declared and defined.
With this change static definitions must appear before their first use in
the single file build. This requires a change in combine_src.py which is
done in a separate commit.
Add first draft of a SPDX 1.2 license into the distributable, with the
filename "license.spdx". This requires python-rdflib so add that to the
project dependencies in README.md.
Add 'set -e' to make_dist.sh to better detect errors that might otherwise
silently creep by and break the build.
Quick fix for C++ compilation issue: when compiling from single source
distributable, the recently added visibility macros cause Duktape to
both declare and define internal data symbols with "static", which is
not allowed in C++. See GH-63.
The quick fix is to force Duktape to use "extern" for internal symbols
when using C++. This is not ideal because it will increase compiled
binary size by around 10%. A better fix will be developed separately.
Also fixes one cast which causes a C++ compilation error.
Make JSON.stringify() escape U+2028 and U+2029 so that the output is a valid
Ecmascript string even for these characters. This allows the output to be
embedded in a web page or be parsed with eval() without the syntax error that
would otherwise occur -- U+2028 and U+2029 are considered line terminators
in Ecmascript.