Allow internal keys / symbols to be specified in a structured manner so that
the YAML metadata doesn't need to know the exact internal encoding for them.
All Reflect functions specified in ECMAScript 2016 are implemented, and
most share Duktape/C helpers with their ES5 twins from Object.
* Reflect.apply()
* Reflect.construct()
* Reflect.defineProperty()
* Reflect.deleteProperty()
* Reflect.get()
* Reflect.getOwnPropertyDescriptor()
* Reflect.getPrototypeOf()
* Reflect.has()
* Reflect.isExtensible()
* Reflect.ownKeys()
* Reflect.preventExtensions()
* Reflect.set()
* Reflect.setPrototypeOf()
Presence of the Reflect object is controlled by DUK_USE_REFLECT_BUILTIN
and enabled by default in the standard configuration.
note: Reflect.enumerate() was retroactively removed in ES7, so it will
not be implemented in Duktape.
Add TextEncoder and TextDecoder built-ins, which allow Ecmascript code
to read and write text stored in ArrayBuffers. Based on the WHATWG
Encoding Living Standard:
https://encoding.spec.whatwg.org/#api
Object/property is absent if any option in the present_if is known to be false.
In other words, all options must be enabled (or unknown) for the object or
property to be present (logical AND).
This avoids the need for a function call and up to two property lookups
for a `Math.pow()` invocation, as well as allowing expressions like
`2 ** 16` to be inlined at compile time.
Exponentiation uses the same internal handler as `Math.pow()`, per the
ES7 specification.
Usage:
x = base ** exp;
x **= 2;
* Add genconfig.py support for producing an "active options" JSON file at the
end of genconfig processing. The JSON file indicates which config options
are known to be present (any non-false value) or absent (false or #undef).
* Add support for 'present_if' keys for objects and properties. If the
corresponding config option is certain to be false, drop the object/property
as if it was disabled.
* Remove objects from "needs bidx" list if they're disabled.
Limitations:
* The active options scanning is based on config metadata defaults and forced
overrides. It doesn't account for fixups which cannot be handled reliably
because fixups may include further headers that tweak DUK_USE_xxx options.
A small improvement would be to base "active options" on scanning the final
header for #define's and #undef's and figure out which were certain to be
unconditional.
* Rename prepare_sources.py to configure.py; the operation is similar to
autoconf ./configure so the association is useful.
* Rename make_dist.py to dist.py.
* Generate only one source set (combined or separate) for one run of
configure.py.
* Change dist.py to run configure.py three times to generate the default
source sets.
* Use an autodeleted temporary directory for preparing sources, which
removes some of the manual temporary file handling.