4327 Commits

Author SHA1 Message Date
Zoltan Herczeg
e739f11ed2
Return early when checking logical operators (#4626)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-03-11 19:35:39 +01:00
kisbg
8321640c4e
Remove unnecessary ecma_deref_ecma_string in regExpStringIterator (#4625)
JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
2021-03-11 09:14:45 +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
kisbg
dc3ae4ff06
Implement Promise.allsettled (#4616)
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
2021-03-08 11:43:42 +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
kisbg
9254cd4e7a
Add ThrowTypeError name property (#4618)
JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
2021-03-05 10:40:17 +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
Péter Gál
9556701742
Add size checks before using JERRY_VLA in unittests (#4601)
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
2021-02-26 10:53:54 +01:00
Zoltan Herczeg
17ed855df5
Default handlers should count as resolvers (#4611)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-02-25 12:27:21 +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
Robert Fancsik
f0f2a28109
Improve ecma_reject to give more detailed error messages (#4565)
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
2021-02-24 09:36:55 +01:00
Péter Gál
1623c8db1e
Limit the string size in jerry_port_track_promise_rejection (#4603)
The maximum Promise reject reason string is now limited to a 5 kib string.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
2021-02-24 09:14:14 +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
Robert Fancsik
322265bfb9
Move push literal number opcodes to basic opcodes (#4609)
`obj[number]` is a widely used structure especially for array element indexing, however super property assignment is not.
This patch moves super-assignment opcodes to ext opcodes and fills the freed 3 basic opcodes with push-literal-number ones.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2021-02-23 10:00:00 +01:00
Dániel Bátyai
2240a9153a
Optimize the copying/freeing of ecma values (#4602)
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai daniel.batyai@h-lab.eu
2021-02-22 08:32:10 +01:00
Dániel Bátyai
242c3a55e3
Always run all checks regardless of the previous job result (#4604)
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai daniel.batyai@h-lab.eu
2021-02-18 19:40:21 +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
Robert Fancsik
c14702c129
Keep GNU fastpath for jerry_port_get_local_time_zone_adjustment (#4600)
PR #4513 caused a measurable slowdown by removing the GNU specific TZA calculation.
This patch reverts this removal but also keeps the general implementation introduced in #4513

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2021-02-17 20:44:00 +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
Robert Fancsik
488a0bf7e8
Improve date internals (#4593)
- Optimize year from time calculation
- Force arithmetic operations to int32_t/int64_t whenever possible
- Optimize number conversion in date parse
- Cache local TZA of the date object
- Fix a bug in Date.parse timezone parsing

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2021-02-17 16:07:54 +01:00
Virag Orkenyi
67e7e89c8e
Implement BigInt.prototype.toLocaleString (#4355)
JerryScript-DCO-1.0-Signed-off-by: Orkenyi Virag orkvi@inf.u-szeged.hu
2021-02-17 14:20:44 +01:00
Yonggang Luo
3afb007123
Optimize bit operation in vm.c (#4591)
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2021-02-16 13:17:21 +01:00
kisbg
a2f22cf888
Update jerry debugger test-runner (#4597)
Now the test-runner will check the jerry (server) return code.

Fixed do_eval_at TC crash if jerry was build with --debug option.

JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
2021-02-16 12:48:40 +01:00
Péter Gál
a95a0b3539
Use C99 flexible array member notation in parser memory struct (#4592)
The usage of a single byte sized array as a flexible array member can lead to
compiler/analyzer errors or warnings. Not specifying the size in the array is
correct as per C99 standard.

Flexible array members are defined in the C Standard, 6.7.2.1 (ISO/IEC 9899:1999).

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
2021-02-11 14:18:35 +01:00
Peter Marki
a9c83020df
Fix failing Date tests in test262-esnext (#4561)
JerryScript-DCO-1.0-Signed-off-by: Peter Marki marpeter@inf.u-szeged.hu
2021-02-11 14:01:58 +01:00
Yonggang Luo
34a6a93597
Fix indent in documentation of cmake options (#4588)
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2021-02-10 10:45:29 +01:00
Yonggang Luo
2a6917b5a5
Fix documentation of cmake options (#4587)
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2021-02-10 01:31:27 +01:00
Yonggang Luo
3df7998084
--engine parameter should be a file (#4585)
The --test262-object option should be passed independently,
otherwise os.path.dirname(args.engine) in tools\runners\run-test-suite-test262.py
makes no sense

JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2021-02-09 19:02:26 +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
Yonggang Luo
f7c817efcf
Take care of year before 1601 on win32. (#4580)
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2021-02-09 15:23:28 +01:00
Zoltan Herczeg
ec872818c2
Add implementation specific date parsing (#4576)
It is compatible with Firefox and Chrome.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-02-09 15:03:06 +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
Zoltan Herczeg
6fd0dfec35
Fix template memory leak when debugger is running (#4572)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-02-09 14:59:45 +01:00
Yonggang Luo
c2e016ec06
Add space between JERRY_ATTR_PURE and type (#4583)
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2021-02-09 09:45:08 +01:00
Yonggang Luo
75b0378bc5
Move static before inline. (#4582)
Make this consistence with other static inline definition.

JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2021-02-09 09:43:43 +01:00
kisbg
76a0b18287
Add cross-realm support to RegExp.prototype (#4567)
JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
2021-02-08 16:35:40 +01:00
Tóth Béla
35ecf4c4a3
Fix "Invalid prefix operation" errors (#4577)
`--(-a);` returned with a postfix error before this patch.
The changes introduce a new warning for prefix errors, and
returns with the corresponding one based on current opcode.

JerryScript-DCO-1.0-Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
2021-02-08 16:13:37 +01:00
Zoltan Herczeg
b1f73e698a
Fix deleting native pointers (#4570)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-02-05 19:35:30 +01:00
Péter Gál
ca6c2194bb
Fix incorrect assert expression in lexer_check_property_modifier (#4569)
In the lexer_check_property_modifier the assert incorrectly does
an assignment instead of a simple equals check.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
2021-02-05 11:24:29 +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
Yonggang Luo
e01c2549d7
Add --build-debug options for run-tests.py script. (#4456)
This makes have option to running test262-es2015 and test262-esnext with debug version
of jerryscript.
On OSX, the $RUNNER -q --jerry-tests are in dead loop, disable it first.

Increase TEST262_CASE_TIMEOUT to 180, so that --build-debug can pass the tests
without timeout
An side effect of this are
```
  <test id="built-ins/decodeURIComponent/S15.1.3.2_A2.5_T1.js"><reason></reason></test>
  <test id="built-ins/decodeURI/S15.1.3.1_A2.5_T1.js"><reason></reason></test>
```
passed

JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2021-02-04 18:25:14 +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
Robert Fancsik
feb2855f0c
Fix cleanup in VM_OC_INITIALIZER_PUSH_PROP on abrupt completion (#4564)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2021-02-04 16:05:56 +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
kisbg
e9df2ca814
Add newtarget support AsyncFunction (#4560)
JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
2021-02-04 14:30:11 +01:00