Related to #4186.
Some notable changes:
- The term 'Error' now strictly refers to native Error objects defined in
the ECMA standard, which are ordinary objects. All other uses of
'error' or 'error reference' where the term refers to a thrown value is
now called 'exception'.
- Simplified the naming scheme of many String API functions. These functions
will now also take an 'encoding' argument to specify the desired
encoding in which to operate.
- Removed the substring-copy-to-buffer functions. These functions
behaved awkwardly, as they use character index to specify the
start/end positions, and were mostly used incorrectly with byte
offsets instead. The functionality can still be replicated with
other functions if necessary.
- String-to-buffer functions will no longer fail if the buffer is not
sufficiently large, the string will instead be cropped.
- Fixed the usage of the '_sz' prefix in many API functions. The term
'sz' means zero-terminated string in hungarian notation, this was
used incorrectly in many cases.
- Renamed most of the public API functions to have shorter, more on-point
names, rather than the often too long descriptive names. Functions are now
also grouped by the type of value they operate on, where this makes
sense.
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
Furthermore reduce memory consumption when only
one external pointer is assigned to an object.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
Instead of a fixed number of arguments, a call info structure is passed
to the handlers, which can be extended in the future without breaknig the
API. This structure holds new.target value, so its getter function is removed.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
Proxy flags (IsCallable, IsConstructor) can't be stored on the
property list compressed pointer. As adding a Proxy to a WeakSet
would add a property to the Proxy object causing failures down the line.
The prototype internal "slot" can be used to store there flags as
it is not used in case of Proxies (as per standard).
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
Previously only the Proxy api was tested.
Added a unittest to check the C callbacks via proxy.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com