4594 Commits

Author SHA1 Message Date
Renáta Hodován
b7069350c2
cmake: avoid Apple ranlib flags when not using AppleClang (#5258)
On macOS, `-no_warning_for_no_symbols -c` options are specific to the
Apple `ranlib` tool. When using other toolchains (e.g. Homebrew clang),
these flags cause errors since `llvm-ranlib` does not recognize them.

The patch ensures these flags are only passed when using AppleClang.

JerryScript-DCO-1.0-Signed-off-by: Renata Hodovan reni@inf.u-szeged.hu
2025-10-08 19:35:32 +02:00
Roland Takacs
355ab24cdc
Bump RIOT target to 25.04 (#5231)
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs@inf.u-szeged.hu
2025-06-03 13:04:20 +02:00
László Langó
50200152fe
Update the README.md for release 3.0 (#5200)
JerryScript-DCO-1.0-Signed-off-by: Laszlo Lango laszlo.lango@h-lab.eu
v3.0.0
2024-12-18 11:36:32 +01:00
László Langó
4cda596060
Updated the "Getting Started" and "Migration Guide" for the 3.0 release (#5202)
JerryScript-DCO-1.0-Signed-off-by: Laszlo Lango laszlo.lango@h-lab.eu
2024-12-18 11:28:38 +01:00
Yonggang Luo
d2d30df420
Revise tools scripts to be python3 compatible on win32 (#4856)
We introduce setup_stdio function to setup stdout/stderr properly.
For python <-> python pipe, we always use 'utf8'/'ignore' encoding for not lost characters.
For tty <-> python, we using native encoding with xmlcharrefreplace to encode, to preserve maximal information.
For python <-> native program, we use naive encoding with 'ignore' to not cause error

update_exclude_list with binary mode so that on win32 would not generate \r\n

run-test-suite.py: Handling skiplist properly on win32

Fixes #4854

Fixes test262-harness.py complain cannot use a string pattern on a bytes-like object with running test262 with python3

For reading/writing to file, we use 'utf8' /'ignore' encoding for not lost characters.
For decoding from process stdout, using native encoding with decoding error ignored for not lost data.
Execute commands also ignore errors
Fixes #4853

Fixes running test262-esnext failed with installed python3.9 on win32 with space in path
Fixes #4852

support both / \ in --test262-test-list arg

On win32.
python tools/run-tests.py  --test262-es2015=update --test262-test-list=built-ins/decodeURI/
python tools/run-tests.py  --test262-es2015=update --test262-test-list=built-ins\decodeURI\
should be both valid,
currently only --test262-test-list=built-ins\decodeURI\ are valid.

Support snapshot-tests-skiplist.txt on win32 by use os.path.normpath

Guard run-tests.py with timer.

All run-tests.py are finished in 30 minutes in normal situation.
May change the timeout by command line option

Move Windows CI to github actions
Define TERM colors for win32 properly

flush stderr.write stdout.write

On CI, the stderr are redirect to stdout, and if we don't flush stderr and stdout,
The output from stderr/stdout would out of sync.

`Testing new Date(-8640000000000000) and fixes date for win32`
So that the CI can passed

if sys.version_info.major >= 3: remove, as we do not support python2 anymore

Fixes compiling warnings/errors for mingw/gcc

JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2024-12-17 10:41:12 +01:00
Yonggang Luo
a1e4bd859e
02.API-REFERENCE.md format the *Note*: (#5195)
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2024-12-17 10:20:20 +01:00
Yonggang Luo
f322f603f5
Fixes nuttx target warning (#4984)
The warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]

JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2024-12-17 10:17:57 +01:00
Yonggang Luo
f0a249dfd3
CMake update cmake_minimum_required (VERSION 3.10) (#5187)
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2024-12-17 10:12:34 +01:00
Yonggang Luo
b4bc23078a
Improve the jerry port api documents. (#4977)
Notable changes:
  - Remove the comments in port impl, that's easily getting to in-consistence
  - Sync the jerryscript-port.h and 05.PORT-API.md
  - Fixes the invalid comment in port codes

JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2024-12-17 10:10:37 +01:00
Yonggang Luo
77c72d4da7
docs: Fixes test code (#5193)
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2024-12-17 09:43:35 +01:00
Yonggang Luo
5480cc3973
Doxygen comment update and PREDEFINED in Doxyfile is properly defined (#5186)
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2024-12-17 09:02:54 +01:00
Gergo Csizi
718a439db1
Fix some style issues in debugger documentation (#5181)
There was some style issues in debugger documentation.
This patch fixes these issues.

JerryScript-DCO-1.0-Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu
2024-12-12 20:44:36 +01:00
László Langó
a746a1d29a
Update the API documentation (#5178)
- Minor fixes, typos, version numbers, etc.
 - Followup fix after "Merge Promise Guard with ESNEXT #4725"
 - Added documentation for the new implemented API functions

JerryScript-DCO-1.0-Signed-off-by: Laszlo Lango laszlo.lango@h-lab.eu
2024-12-12 20:39:48 +01:00
Yonggang Luo
8d44eed661
Fixes dead loop when abort called in Win32/CI (#5197)
Disable the debug popup on MSVC/win32 by introduce new jerry_port_init function

For not popup dialog when crash happend on MSVC/win32
Closed: #4463

JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2024-12-11 08:52:05 +01:00
László Langó
aa7861daf2
Fix the return type of 'jerry_string_substr'. (#5185)
Also added new unit test to test basic functionality of 'jerry_string_substr'.

JerryScript-DCO-1.0-Signed-off-by: Laszlo Lango laszlo.lango@h-lab.eu
2024-12-10 21:56:23 +01:00
Gergo Csizi
c509a06669
Added jerry-ext amalgamation (#5184)
Added option to enable jerry-ext amalgamation

The implementation is based on PR #4992. Only applied the requested changes
and rebase to master.

Co-authored-by: Damiano Mazzella damianomazzella@gmail.com
JerryScript-DCO-1.0-Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu
2024-12-03 08:33:28 +01:00
Gergo Csizi
b3fa5e0e03
Add missing configuration information to CONFIGURATION.md (#5183)
There was some missing configuration options in the CONFIGURATION documentation.
This patch adds these missing configurations.

JerryScript-DCO-1.0-Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu
2024-11-29 15:26:10 +01:00
Gergo Csizi
0b1d75a7db
Update and fix some issues in EXT-REFERENCE documentation (#5180)
There was some issues and typos in the EXT-REFERENCE documentation.
This patch fixes these issues and typos.

JerryScript-DCO-1.0-Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu
2024-11-28 13:35:19 +01:00
Gergo Csizi
5f467a658b
Fix check-string.sh to check every generated strings (#5179)
The original implementation only checked lit-magic-strings.inc.h.
This patch adds checking for ecma-error-messages.inc.h and parser-error-messages.inc.h

This patch fixes #5172 issue.

JerryScript-DCO-1.0-Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu
2024-11-27 13:56:51 +01:00
Gergo Csizi
ba8957697a
Fix Typedarray.slice fastpath when the content type is matching (#5177)
This patch fixes #4888.

The implementation is based on PR #4898, only resolved the conflicts and
applied requested changes.

Co-authored-by: Robert Fancsik robert.fancsik@h-lab.eu
JerryScript-DCO-1.0-Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu
2024-11-26 14:27:24 +01:00
maciej m.
59649fc222
fix building without BIGINT (#5047)
* fix building without BIGINT

Co-authored-by: Maciej Musiał <xt1@o2.pl>
JerryScript-DCO-1.0-Signed-off-by: aksdfauytv rdkifk@jadamspam.pl
2024-11-26 11:01:34 +01:00
Gergo Csizi
7db6a9a372
Implement operations of atomics (#5166)
The following methods were implemented:
 - Atomics.compareExchange
 - Atomics.store

The implementation is based on PR #4956, only resolved the conflicts.

Co-authored-by: Csaba Repasi repasics@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu
2024-11-26 10:56:28 +01:00
Yonggang Luo
dfa9afbf6e
Introduce JERRY_ZSTR_ARG macro to avoid jerryx_print_string, jerryx_print_byte, jerry_port_print_byte, strlen (#4982)
Replace usage of jerryx_print_byte, jerryx_print_string with jerryx_print_buffer.

As we now have JERRY_ZSTR_ARG, so we can take advantage of it

With this, the jerry_port_print_byte port api won't need any more
this reduced the port api surface

JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2024-11-25 17:28:55 +01:00
Csaba Osztrogonác
e4017f0b3a
Use regular expressions to parse the YAML headers of the tests (#4910)
instead of the imported thirdparty YAML parser.

JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu
2024-11-25 14:00:21 +01:00
LJ
95cc5e992a
Fix the private field crash for the Array object. (#5139)
Fixes 5097, 5100, 5138

Additional regression test cases added by: Robert Sipka <robert.sipka@h-lab.eu>

JerryScript-DCO-1.0-Signed-off-by: Baihe Jiang <baihe.jiang@outlook.com>
JerryScript-DCO-1.0-Signed-off-by: Lily Jiang bhjiang.whu@hotmail.com
2024-11-25 13:04:00 +01:00
Gergo Csizi
00d12c0265
Implement BigInt asIntN and asUintN methods (#5165)
The following methods were implemented:
- BigInt.asIntN
- BigInt.asUintN

Custom dispatcher also added to builtin_bigint.

The implementation is based on PR #4736, only applied the requested changes.

Co-authored-by: Daniel Batiz batizjob@gmail.com
JerryScript-DCO-1.0-Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu
2024-11-22 09:33:08 +01:00
Robert Fancsik
a7e24fe89a
Const literal marker should be processed before group assignment marker (#4948)
This patch fixes #4925.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2024-11-21 11:10:09 +01:00
Yonggang Luo
82ca949850
Update document 10.EXT-REFERENCE-HANDLER.md (#5163)
The handler prototype did not match it's implementation

JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2024-11-20 17:46:10 +01:00
Gergo Csizi
f54f2d3a7b
Implement optional chaining (#5164)
The work is based on PR #4843, only fixed some conflicts and cppcheck errors.

Co-authored-by: Robert Fancsik robert.fancsik@h-lab.eu
JerryScript-DCO-1.0-Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu
2024-11-20 11:57:58 +01:00
Gergo Csizi
e9f08a7879
Put reference on executable object's this_binding to avoid unwanted f… (#5169)
…rees before exiting execution

This patch fixes #4870.

The implementation is based on PR #4966, only resolved the conflicts
and applied requested changes.

Co-authored-by: Martin Negyokru negyokru@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu
2024-11-19 14:52:33 +01:00
Gergo Csizi
348e6a470e
Accessors should be kept alive during their invocation (#5167)
This patch fixes #4900.

The implementation is based on PR #4943, only resolved the conflicts.

Co-authored-by: Robert Fancsik robert.fancsik@h-lab.eu
JerryScript-DCO-1.0-Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu
2024-11-18 09:47:07 +01:00
Robert Sipka
38e05b4569
Minor fix to ensure Python 3 support in the debugger (#5168)
The default value for length in to_bytes was added in Python version 3.11.
This small fix ensures the compatibility with older Python3 versions.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka robert.sipka@h-lab.eu
2024-11-15 14:35:24 +01:00
Yonggang Luo
d2e0d71101
Revise implementation of jerry_port_get_local_time_zone_adjustment on Win32 (#4589)
Handle the limitation of Win32 date API properly.

JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2024-11-14 13:38:46 +01:00
Yonggang Luo
43f5026eb2
Add testcase that cleanup error throw from javascript properly. (#4581)
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2024-11-12 21:24:35 +01:00
Yonggang Luo
3f314f387d
Fixes unit-test-date-helpers failure on win32 (#4654)
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2024-11-12 13:39:00 +01:00
László Langó
bd0d391ee3
Fixes the GH actions by resolving the deprecated API usage. (#5160)
JerryScript-DCO-1.0-Signed-off-by: Laszlo Lango laszlo.lango@h-lab.eu
2024-11-07 10:07:57 +01:00
batizdaniel
5f3428becb
Fix runtime error Date object (#4914)
This patch fixes #4704

JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz daniel.batiz@h-lab.eu
2024-11-06 16:15:37 +01:00
winsoft666
4a39946ef6
Add build argument: --arch (#5147)
Signed-off-by: winsoft666 <mioktiar@gmail.com>
2024-11-04 15:28:36 +01:00
winsoft666
f5d3d9004a
Add build argument: --static-crt (#5148)
Signed-off-by: winsoft666 <mioktiar@gmail.com>
2024-11-04 15:27:57 +01:00
kulcsaradam
de515316cf
Fix parsing of invalid asterix symbol after private field symbol (#5155)
Raise syntax error instead of crashing.

JerryScript-DCO-1.0-Signed-off-by: Ádám Kulcsár kuladam@inf.u-szeged.hu
2024-08-14 18:09:09 +02:00
Máté Tokodi
2dbb6f79ef
Fix parsing class body that includes stray semicolon after a static block (#5145)
JerryScript-DCO-1.0-Signed-off-by: Máté Tokodi mate.tokodi@szteszoftver.hu
2024-06-18 20:02:48 +02:00
Máté Tokodi
4e89e1828e
Fix parsing of invalid private class properties (#5144)
Raise syntax error instead of failing with an assert

JerryScript-DCO-1.0-Signed-off-by: Máté Tokodi mate.tokodi@szteszoftver.hu
2024-06-18 20:00:07 +02:00
Máté Tokodi
d7e21259fe
Fix arguments object in eval-ed functions in static class initializers (#5140)
JerryScript-DCO-1.0-Signed-off-by: Máté Tokodi mate.tokodi@szteszoftver.hu
2024-05-28 06:59:13 +02:00
Máté Tokodi
35465ed78e
Fix CI for macos (#5142)
Due to compiler bugs present in the latest version of clang on macos:

Roll back macos version used by github actions from `macos-latest`
(`macos-14`) to `macos-13`: Some modulo operations were failing,
such as `-1 % -1` when compiler optimizations were enabled

Disable `-Wliteral-range` for test-math.c on macos, because it was
falsely raised for `isnan`, `isinf`, and `isfinite ` macros.

JerryScript-DCO-1.0-Signed-off-by: Máté Tokodi mate.tokodi@szteszoftver.hu
2024-05-24 18:34:26 +02:00
Renáta Hodován
47bd5d4b91
Fix typo in the CMake setup of libFuzzer (#5136)
JerryScript-DCO-1.0-Signed-off-by: Renata Hodovan reni@inf.u-szeged.hu
2024-04-09 10:05:11 +02:00
Máté Tokodi
cefd391772
Fix rare crash caused by get method of proxy object (#5129)
This fixes #5101
In rare cases the proxy object could get used after
being incorrectly removed by the gc

Add stack checks to the start of all function calls

JerryScript-DCO-1.0-Signed-off-by: Máté Tokodi mate.tokodi@szteszoftver.hu
2024-03-13 12:08:41 +01:00
Máté Tokodi
bac7ee3acd
Fix gc of async destructuring assignments of strings (#5126)
This fixes #5089

When garbage collection is running on a paused async function that
includes destructuring assignments of strings, the string can be a
direct string, and not an object, which cannot be marked as visited, as
it does not have a visited flag.

JerryScript-DCO-1.0-Signed-off-by: Máté Tokodi mate.tokodi@szteszoftver.hu
2024-02-06 08:10:14 +01:00
Máté Tokodi
52debe8589
Fix arrow function parsing (#5093)
This fixes #5085

JerryScript-DCO-1.0-Signed-off-by: Máté Tokodi mate.tokodi@szteszoftver.hu
2024-02-01 00:34:37 +01:00
Máté Tokodi
514fa6735a
Update MbedOS, RIOT and ESP_IDF CI checkers (#5120)
Update MbedOS and RIOT CI checkers to use `gcc-arm-none-eabi` on top of
ubuntu-latest

Upgrade to mbed-tools and mbed-os 6.17

Bump xtensa version to `2021r2-patch5` and re-enable `ESP_IDF_Build_Test`

JerryScript-DCO-1.0-Signed-off-by: Máté Tokodi mate.tokodi@szteszoftver.hu
2023-12-15 12:12:59 +01:00
Máté Tokodi
3b876f7392
Update clang-format (#5112)
Bump minimum clang-format version to 15 (the previously used 10 is not
in the ubuntu-22.04 repo)

Reformat several files

Re-enable format and strings CI checkers

JerryScript-DCO-1.0-Signed-off-by: Máté Tokodi mate.tokodi@szteszoftver.hu
2023-12-11 23:21:52 +01:00