Furthermore rename JERRY_PROP_IS_THROW to JERRY_PROP_SHOULD_THROW
and add more invalid descriptor checks.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
Also i updated the promise race and all method to the latest standart
The two jerry/es.next test-cases has been update to support the latest standart
JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
Related test262 test-cases has been removed from skip list.
Execpt two test-case since they need other feature to work (Finalization registry and async GC)
JerryScript-DCO-1.0-Signed-off-by: Bence Gabor Kis kisbg@inf.u-szeged.hu
Note: TypedArray.[[DefineOwnProperty]] has been slightly reworked (without semantical changes) for better error messages.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
No need to keep a reference to resolver functions.
Unused resolvers are cleaned up sooner by GC.
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
The removal of these macros enabled cppcheck to reveal new errors.
These errors are also fixed by the patch.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
- Fix evaluation order of the operands
- Implement proper iterator closing of array destructuring
- Support next method caching
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
If multiple properties with the same name is in the
prototype chain, only the first one should be inspected
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
The following methods were implemented:
- String.prototype.matchAll based on ECMA-262 v11, 21.1.3.12
- RegExp.prototype[@@matchAll] based on ECMA-262 v11, 21.2.5.8
- RegExp String Iterator Object based on 21.2.7
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
- Declarative environment no longer need to lookup the created binding for setting it's value
- Unfold vm_decl_var and vm_set_var into vm_loop to reduce error checks
- Reduce code duplication in ecma_module_connect_imports
- Fix deleted binding setting in `ecma_op_set_mutable_binding` (fixes#4468)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
After the introduction of the Proxy builtin object there was
a possibility to traverse the prototype chain with an invalid object.
The prototype was freed before it's data/properties were queried resulting
in accessing invalid information.
By forcing the allocator to always do a gc (`--mem-stres-test=on` build option)
it was possible to trigger the issue without complicated tests.
New internal method:
* `ecma_op_object_get_prototype_of` which always returns the prototype
of an object and the return value must be freed (if it is valid).
Updated prototype chain traversing in:
* `jerry_object_get_property_names`
* `ecma_builtin_object_prototype_lookup_getter_setter`
* `ecma_op_function_has_instance`
* `ecma_op_function_get_super_constructor`
* `ecma_op_object_is_prototype_of`
* `ecma_op_object_enumerate`
Removed method `ecma_proxy_object_prototype_to_cp`
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
In Proxy.[[Get]] if the target.[[GetOwnPropertyDescriptor]] fails the
trap result should be freed.
Fixes: #4466
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
'this' is a restricted keyword in C++ so it's a good practice to avoid it's usage as an identifier.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
When accessing an error's type there is no need to check the Proxy
prototype (as there is none).
Fixes: #4440
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
ecma_op_function_get_function_realm now can process proxy and bound functions.
JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
When shifting a negative BigInt value if the
shift count is very "big" the result should be -1.
eg.:
```
(-2n >> (2n*32n)) === -1n
```
Note: the `-2n >> (2n*31n)` already returned `-1n` prior this change.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@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