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.
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().
* Add API documentation for duk_cbor_encode() and duk_cbor_decode().
* Add placeholder release notes for 2.5.
* Add CBOR binding guide section.
* Include CBOR in dist README and site index page.
* Bump DUK_VERSION to 2.4.0.
* Release checklist updates.
* Releases file update.
* Finalize release notes.
* Remove experimental status from some API calls.
* Bump LICENSE.txt year range.
* Add new public symbols to API test.
* CBOR extra trivial compile warning fix.
* Compile warning fix when hex support disabled.
* Update test262 known issues.
* Update index page footprints.
* Improve options for thumb index page size build.
* Add missing "skip: true" metadata to a CBOR test.
* AUTHORS update.
* Remove public API reference to duk_push_thread_raw() and its flags.
This API call is not public, so the flags are not useful either.
* Change DUK_VERSION description into <table> format to match other
define descriptions. Revise version number examples.
* Remove concrete constants because they don't have any guarantees.
* Use table formatting consistently.
* Structs and typedefs remain as is and could be reworked later.
If a protected call is given API call arguments that conflict with the input
value stack shape -- e.g. nargs is too large compared to available arguments --
current behavior is to throw an error because the value stack API contract
cannot be provided.
API documentation describes the behavior as an error code being returned with
the result value stack shape being undefined.
Fix documentation to match behavior.