* Use same "proxy rejected" for all Proxy invariant rejects.
* #ifdef guard for proxy policy checks.
* Test coverage for 'preventExtensions' trap.
* Convert many duk_hobject.h macro calls into function calls.
* Add functions to interact with idx_props allocation.
* Compile warning fixes.
* Fix Proxy.revocable() revoker function .name and .length properties
(empty name, 0 length).
* Summarize a revoked proxy as '[object RevokedProxy]' in internal readable
summary string, and add test coverage.
* Rename internal duk_push_class_string() as duk_push_objproto_tostring()
for clarity, the helper has Object.prototype.toString() semantics
(except when avoid_side_effects = 1).
* Fix duk_push_objproto_tostring() behavior for revoked Proxies, required
behavior is to throw (this happens in the @@toStringTag lookup which is
unconditional).
* Rename duk_get_top_index_unsafe() -> duk_get_top_index_known() for clarity.
* Add more duk_get_top_index_known() call sites when value stack is known
to have >= 1 entries.
* Rename duk_pop_unsafe() and variants to duk_pop_known() which is more
descriptive.
* Use duk_push_{undefined,tval}_unsafe() instead of direct valstack_top
manipulation in executor and a few other places.
* Add test coverage for chained Proxies in call setup.
* Minor code improvements.
* Implement Proxy.revocable() and add test case coverage for some
Proxy revocation basics.
* Fix revoked Proxy handling in instanceof and Array.isArray(), and
add test coverage.
* Fix revoked Proxy handling in call setup, and add test coverage.
Chained Proxies still not supported in call handling.
* Add stack top asserts for internal duk_prop_xxx.c file APIs:
defown, delete, enum, get, getown, has, ownpropkeys, set.
* Fix unused duk_hobject layouts from property table init code
in src-tools.
Change function .arguments and .caller behavior to be in line with the
latest specification:
* No own .arguments or .caller property for Function instances. V8 provides
non-strict functions with null .caller and .arguments properties (but they
are not required by the specification).
* Inherit .arguments and .caller thrower from Function.prototype.
Also change %ThrowTypeError%.name to the empty string to match V8.
Restructure string intern check:
- Compute string hash and perform strtable lookup; if found, it
must already be a valid Symbol or valid WTF-8 data so no WTF-8
sanitization steps are needed. Return found string.
- Otherwise perform a "keepcheck" to see if the candidate string
can be used as is (i.e. it is valid Symbol or valid WTF-8).
If so, we know it's not in the strtable so intern the string.
- Otherwise the string needs WTF-8 sanitization. After sanitizing,
rehash the sanitized data, perform another strtable lookup and
return existing string or intern the sanitized string.
This speeds up string intern processing for (1) strings already in
the string table and (2) valid WTF-8 strings which should be the
vast majority of strings interned. Only strings that are invalid
WTF-8, i.e. contain uncombined surrogate pairs or outright data,
will need sanitization.
Other minor changes:
- Add some WTF-8 documentation to tentative 3.0 release notes.
- Add a 3.0 release entry.
* Remove lazy charlen support. Since we need to WTF-8 sanitize the entire
input string, charlen can be computed while validating (avoiding extra
book-keeping for ASCII eventually).
* Improve WTF-8 search forwards/backwards performance (no substring operations)
when the search string is valid UTF-8. Use reference implementation for
non-UTF-8 still, to be optimized later.
* Minor testcase improvements.
Join surrogate pairs (encoded in CESU-8) in string intern check,
with unoptimized code. This allows working on WTF-8 representation
when the joining is manually enabled. The test code is disabled by
default so should not affect current behavior.
Refactor tools/configure.py and util/dist.py to be just wrappers to
executing the Node.js based tooling. The wrapper .py files are both
Py2 and Py3 compatible. Node.js version must be >= 14.x.
NaN normalization check should use a full NaN check to decide when to
normalize, even when using partial NaN initialization. The fix here
is to switch to full NaN initialization in general.
Input 'val' pointer may be a value stack pointer, which may become
stale if the variable lookup reallocates the current value stack.
This can happen e.g. in a with(proxy).
Rename duk_is_null_or_undefined() to duk_is_nullish() to better match
current ECMAScript terminology. Keep duk_is_null_or_undefined() as a
deprecated API macro. Add internal DUK_TVAL_IS_NULLISH().