203 Commits

Author SHA1 Message Date
Zoltan Herczeg
67a61bc211
Support this binding retrieval for backtrace frames (#4669)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-05-17 11:41:29 +02:00
Zoltan Herczeg
e042998f02
Support function object retrieval for async functions (#4668)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-05-11 12:22:37 +02:00
Zoltan Herczeg
823a8b128d
Fix error throw in jerry_define_own_property (#4662)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-04-27 09:42:20 +02:00
Zoltan Herczeg
10002aef60
Throw ReferenceError when a property of a native module is not found (#4659)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-04-20 11:04:26 +02:00
Zoltan Herczeg
ec3ed65b56
Add reference support for native pointers. (#4615)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-04-19 14:47:17 +02:00
Tóth Béla
cc1a263657
Continue replacing duplicate ecma definitions (#4644)
JerryScript-DCO-1.0-Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
2021-04-19 13:44:01 +02:00
Zoltan Herczeg
1f2a8d4ac1
Add notification callback for module state changes (#4656)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-04-16 17:50:57 +02:00
Zoltan Herczeg
a7a4cb29e4
Native modules should be unlinked state after creation (#4655)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-04-16 15:55:12 +02:00
Zoltan Herczeg
7b6743403f
Support native modules (#4649)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-04-13 16:26:38 +02:00
Zoltan Herczeg
053389de80
Add info to external pointer free callback. (#4642)
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
2021-04-13 09:51:39 +02:00
Zoltan Herczeg
b3ec217b50
Create namespace with references for modules (#4646)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-04-12 15:58:56 +02:00
Zoltan Herczeg
ef35c0329c
Remove class id storing for class objects (#4645)
The two bytes which stored the id is free to use. Currently the only exception is containers.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-04-08 14:46:16 +02:00
kisbg
2381078e80
Add constant error messages (#4640)
added two new file ecma-errors.h and ecma-erros.c

it contains the most used errors messages.

JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
2021-04-07 12:46:12 +02:00
Zoltan Herczeg
d85020f709
Remove pseudo array object type from the project (#4643)
A new class type enum is introduced to describe the class of objects.
This enum is organized to improve property resolve and GC performance.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-04-06 18:46:48 +02:00
Zoltan Herczeg
4377ef684d
Add module C API functions (#4636)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-03-31 19:40:58 +02:00
Tóth Béla
6677fa0a12
Replace duplicate ecma definitions (#4637)
JerryScript-DCO-1.0-Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
2021-03-31 11:52:33 +02:00
Zoltan Herczeg
6c484f3529
Rework module linking (#4632)
The module linking process from jerry_parse is moved out into
a new jerry_module_link function, and jerry_parse is limited to
create unlinked modules.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-03-30 15:40:09 +02:00
kisbg
22ebb00a4c
Implement Promise.any and AggregateError Object (#4623)
JerryScript-DCO-1.0-Signed-off-by: Bence Gabor Kis kisbg@inf.u-szeged.hu
2021-03-22 12:42:20 +01:00
Zoltan Herczeg
546422161e
Add custom configuration to jerry_parse and its variants (#4620)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-03-10 09:56:48 +01:00
Zoltan Herczeg
7a2665621b
Reorganize property descriptor flags (#4622)
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
2021-03-10 08:17:20 +01:00
Peter Marki
96cd542bf5
Refactor jerry_property_descriptor_t to use status flags (#4594)
JerryScript-DCO-1.0-Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
2021-03-08 09:08:24 +01:00
Zoltan Herczeg
29b7c8f8ff
Implement jerry_get_own_property API function (#4612)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-03-03 18:02:40 +01:00
Zoltan Herczeg
a95e3e37e1
Add more skip check options for Proxy objects (#4614)
Reorganize the flags to follow the list in ES2020 section 9.5

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-03-03 17:12:36 +01:00
kisbg
129ca4946c
Implement WeakRef Object (#4546)
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
2021-03-01 13:46:54 +01:00
Zoltan Herczeg
c27047da03
Add filters and more events to Promise callback. (#4605)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-02-24 10:31:08 +01:00
Zoltan Herczeg
a3bdd36556
Reduce memory consumption of Promise objects (#4607)
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
2021-02-24 08:51:23 +01:00
Zoltan Herczeg
1cf2989a64
Add new.target argument to Promise create (#4606)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-02-24 08:50:05 +01:00
Zoltan Herczeg
5c35370327
Create special objects for scripts instead of functions (#4610)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-02-23 15:34:09 +01:00
Zoltan Herczeg
01e0388d77
Add notification callback for Promise operations (#4595)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-02-18 11:29:52 +01:00
Zoltan Herczeg
112ad83aaa
Rework external function handlers (#4599)
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
2021-02-17 17:52:19 +01:00
Yonggang Luo
818cc8ddab
Split globalThis to be configurable. (#4575)
JERRY_BUILTIN_GLOBAL_THIS can be enabled without JERRY_ESNEXT

JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2021-02-09 16:20:05 +01:00
Zoltan Herczeg
53aed02762
Fix null getters/setters in jerry_property_descriptor_from_ecma (#4573)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-02-09 15:01:50 +01:00
Robert Fancsik
0628ae1e7b
Remove the ENABLED/DISABLED macros (#4515)
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
2021-02-04 23:47:05 +01:00
Zoltan Herczeg
3623ac789d
Introduce generic backtrace capturing (#4555)
Remove jerry_get_backtrace_from function

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-02-04 16:33:59 +01:00
Zoltan Herczeg
9ca046b670
Add non-standard behaviour support for Proxies (#4562)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-02-04 15:58:16 +01:00
Zoltan Herczeg
ba06d492a3
Remove full stop after error messages (#4524)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-01-28 12:10:13 +01:00
Zoltan Herczeg
3b77117a2e
Add a callback which is called when Error objects are created (#4465)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-01-18 16:56:38 +01:00
Dániel Bátyai
0fec9135ec
Rework module parsing and execution (#4462)
This patch disables automatic detection of module code, and instead
requires the user to explicitly specify whether to parse a source
as a module or as a script.

To achieve this the jerry_parse API function now takes a new option
which signals that the source should be parsed as a module.

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai daniel.batyai@h-lab.eu
2021-01-18 15:33:43 +01:00
Yonggang Luo
11894a6032
current_new_target -> current_new_target_p (#4478)
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2021-01-17 14:53:25 +01:00
Péter Gál
5e483633f3
Fix prototype chain traversing (#4458)
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
2021-01-15 20:54:09 +01:00
Zoltan Herczeg
3193e6d0dc
Implement jerry_get_backtrace_from API function (#4454)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-01-12 19:52:05 +01:00
Zoltan Herczeg
7baaafa405
Fix the return value of jerry_to_property_descriptor function (#4371)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-01-07 11:09:07 +01:00
Zoltan Herczeg
9676500add
Implement get proxy target (#4367)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-12-18 10:58:48 +01:00
Zoltan Herczeg
e2be8f4c79
Get the 'this' binding of a realm value (#4365)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-12-16 13:21:20 +01:00
Péter Gál
fe216d4710
Add missing BigInt type for value type query API (#4362)
Extended the `jerry_type_t` enum with `JERRY_TYPE_BIGINT` and added it to
the `jerry_value_get_type`.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
2020-12-15 11:17:11 +01:00
Zoltan Herczeg
fe29bf7390
Allow changing the 'this' binding of a realm (#4357)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-12-14 10:05:30 +01:00
Zoltan Herczeg
cc1e8d2dee
Continue working on realms (#4356)
- Rework symbols to have the same value across realms
- Support realms for native functions
- Support test262
- Use new.target realms for constructing intrinsics

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-12-09 17:44:21 +01:00
Zoltan Herczeg
df92c86ecf
Implement realm object and support realms for built-ins and JS functions (#4354)
- Type for realm objects is introduced (ecma_global_object_t)
- Realm reference is added to built-in objects and ECMAScript functions
- Resolving built-ins, global environments, and scopes require realm object
- Unnecessary global object accesses are removed from the code

Missing: external functions and static snapshot functions have no realm reference

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-12-08 14:36:36 +01:00
kisbg
7de7c2168e
Implement asInteger, asUint32 and asInt32 jerry api methods (#4325)
JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
2020-11-18 07:37:56 +01:00
Virag Orkenyi
f7b7873a02
Extend Jerry API & API documentation with regex flags (#4246)
JerryScript-DCO-1.0-Signed-off-by: Virag Orkenyi orkvi@inf.u-szeged.hu
2020-11-16 15:42:27 +01:00