The original document was very large, difficult to read and manage,
and exceeded the comfortable RST section heading level.
This commit also fixes trivia such as trailing whitespace on lines.
The memory functions duk_alloc(), duk_relloc(), and their _raw()
counterparts don't zero allocated (reallocated) memory. This is
intentional, as it also matches the behavior of standard malloc()
and friends.
Clarify this behavior in API documentation, and fix one API testcase
which was testing for memzeroing behavior.
Add some more polyfills: Object.assign() and Performance.now().
The RegExp.prototype.compile() polyfill cannot be implemented at the moment
because it needs to overwrite some RegExp instance properties which are
currently protected.
Use immediate assignment to avoid (quite theoretical) races when multiple
build targets re-evalute things like "git describe". Add build timestamp
to snapshot builds (this *does* have a race without immediate assignment).
Improve git describe options to mark dirty snapshot builds.
Immediate assignment avoids multiple evaluation and removes potential to
race with e.g. build timestamps. The changes made here don't really have
an impact because e.g. GIT_DESCRIBE won't change during a build.
Avoid value stack operations, explicit coercion calls and such when
comparing two normal (not NaN, infinity, or subnormal) values. This
improves performance in basic for loops and such.
Fix a few trivial typing issues in various guide sections. Add an explicit
example for creating new contexts which either share the globals of another
context, or have a fresh set of globals.