4537 Commits

Author SHA1 Message Date
Zoltan Herczeg
6fe763f191
Allow redefining global variables as imports (#5023)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2022-09-09 16:36:08 +02:00
Damiano Mazzella
b143b050cc
Replace global inclusions with local ones (#4991)
Resolve compiler errors created by amalgam.py tool.
2022-08-22 16:06:21 +02:00
Zoltan Herczeg
368641043f
Mark generator as running during yield* (#5014)
Fixes #5013

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2022-08-08 17:36:59 +02:00
Zoltan Herczeg
3360e352bf
Fix exception printing. (#5012)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2022-08-08 08:14:37 +02:00
Gergo Csizi
baf308a7ae
Fix ESPIDF_Build_Test (#5019)
JerryScript-DCO-1.0-Signed-off-by: Gergo Csizi gergocs@inf.u-szeged.hu
2022-08-01 22:10:42 +02:00
Roland Takacs
0d49696618
Merge esp8266-rtos-sdk and esp-idf targets (#4958)
This patch bumps esp8266-rtos-sdk to the latest release. This required to
modify the directory structure and the build system to conform to ESP-IDF
Style. Since esp-idf target already supports ESP-IDF Style, the espressif
targets has been merged to eliminate code duplication.
The target application code has been modified from blinking leds to hello
world to be aligned to other targets.

JerryScript-DCO-1.0-Signed-off-by: Roland Takacs roland.takacs@h-lab.eu
2022-02-22 10:58:18 +01:00
Roland Takacs
c9e9f8e818
Add support for Mbed-OS 6.15.0 (#4909)
The default Mbed OS device (STM32F4) had been changed to FRDM-K64F that is
supported by both Mbed OS 5 and Mbed OS 6 versions. Makefile had also been
modified to have a flash recipe.

JerryScript-DCO-1.0-Signed-off-by: Roland Takacs roland.takacs@h-lab.eu
2022-02-22 10:29:07 +01:00
Yonggang Luo
d00f4810b0
Fix import paths in negative module tests (#4973)
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2022-02-03 11:36:39 +01:00
Yonggang Luo
c5bc3786cf
Remove abandoned es5.1 profile from API reference (#4972)
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2022-02-03 11:35:42 +01:00
Szilagyi Adam
4924f9fd31
Remove ES_NEXT macro (#4915)
- remove all '#JERRY_ESNEXT' macro
- remove 5.1 build profile, update test runner accordingly (Note: all builtins are turn on by default)
- move tests from tests/jerry/esnext into tests/jerry, concatenate files with same names
- add skiplist to some snapshot tests that were supported only in 5.1
- fix doxygen issues that were hidden before (bc. of es.next macro)

Co-authored-by: Martin Negyokru negyokru@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2022-01-31 16:46:00 +01:00
Dániel Bátyai
76403606d0
Fix logging related issues (#4971)
PR #4907 moved the log level into the engine context, however this caused
issues with logging without the engine being initialized. This commit
reverts the log level to be a static variable.

This commit also implements missing format specifiers for jerry_log.

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2022-01-21 10:02:35 +01:00
Robert Fancsik
aead4b79a9
Fix format string in main-benchmark.c (#4970)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2022-01-20 19:50:23 +01:00
batizdaniel
0ef509458e
Fix runtime error: left shift of negative value (#4957)
This patch fixes #4701

JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz daniel.batiz@h-lab.eu
2022-01-20 14:00:47 +01:00
Dániel Bátyai
ac1c48eeff
Update jerry-port and jerry-ext (#4907)
Notable changes:
  - Updated and the port API interface, new functions have been added
    and some have been changed. The port library is now cleaned up to
    not have any dependency on jerry-core, as it should be. The port library
    is now strictly a collection of functions that implement
    embedding/platform specific behavior.
  - The default port implementation has been split for windows and unix.
    Implemented port functions have been categorized and reorganized,
    and marked with attribute((weak)) for better reusability.
  - External context allocation has been moved to the port API instead
    of a core API callback. The iterface has also been extended with a
    function to free the allocated context. When external context is
    enabled, jerry_init now automatically calls the port implementation
    to allocate the context and jerry_cleanup automatically calls the port
    to free the context.
  - jerry_port_log has been changed to no longer require formatting to
    be implemented by the port. The reason beind this is that it was vague what
    format specifiers were used by the engine, and in what manner. The port
    function now takes a zero-terminated string, and should only implement
    how the string should be logged.
  - Logging and log message formatting is now handled by the core jerry library
    where it can be implemented as necessary. Logging can be done through a new
    core API function, which uses the port to output the final log message.
  - Log level has been moved into jerry-core, and an API function has
    been added to set the log level. It should be the library that
    filters log messages based on the requested log level, instead of
    logging everything and requiring the user to do so.
  - Module resolving logic has been moved into jerry-core. There's no
    reason to have it in the port library and requiring embedders to
    duplicate the code. It also added an unnecessary dependency on
    jerry-core to the port. Platform specific behavior is still used through
    the port API, like resolving module specifiers, and reading source file
    contents. If necessary, the resolving logic can still be overridden as
    previously.
  - The jerry-ext library has also been cleaned up, and many utility
    functions have been added that previously were implemented in
    jerry-main. This allows easier reusability for some common operations,
    like printing unhandled exceptions or providing a repl console.
  - Debugger interaction with logged/printed messages has been fixed, so
    that it's no longer the port implementations responsibility to send
    the output to the debugger, as the port should have no notion of what a
    debugger is.  The printing and logging functions will now pass the
    result message to the debugger, if connected.
  - Cleaned up TZA handling in the date port implementation, and simplified
    the API function prototype.
  - Moved property access helper functions that use ASCII strings as
    keys from jerry-ext to the core API.

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2022-01-20 13:53:47 +01:00
Robert Fancsik
79fd540ec9
Fix duplicated private identifier lookup (#4947)
This patch fixes #4921.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2022-01-18 13:22:45 +01:00
Robert Fancsik
85c798705a
Add missing toObject conversion for PrivateSet operation (#4953)
This patch fixes #4936.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2022-01-18 13:16:02 +01:00
Csaba Osztrogonác
dfbd89d94f
Update test262 hash to the latest master (#4959)
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu
2022-01-14 11:04:52 +01:00
mnegyokru
c68f6e79e1
Add stack-overflow check to 'lexer_construct_function_object' (#4965)
This patch fixes #4887.

JerryScript-DCO-1.0-Signed-off-by: Martin Negyokru negyokru@inf.u-szeged.hu
2022-01-14 11:02:50 +01:00
mnegyokru
57547d1261
Ban setting 'Object.prototype.__proto__' as Proxy to prevent circular referencing (#4961)
in prototype chain.

This patch fixes #4941

JerryScript-DCO-1.0-Signed-off-by: Martin Negyokru negyokru@inf.u-szeged.hu
2022-01-14 11:02:19 +01:00
Robert Fancsik
e9da834385
Fix async identifier parsing in class field position (#4949)
This patch fixes #4927

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2022-01-14 10:16:23 +01:00
Robert Fancsik
47d025c74f
Check rest initializer existence after pattern finalization (#4950)
Since the scanner info is not present for invalid destructuring patterns we can only ensure the existence of the rest element after the pattern is finalized.
This patch fixes #4928.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2022-01-14 10:15:48 +01:00
Robert Fancsik
799583e5c8
Private identifier resolving should always construct new literal object (#4951)
This patch fixes #4930.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2022-01-14 10:14:04 +01:00
Robert Fancsik
2a3782141c
Fix fast array objects cannot hold private properties (#4952)
This patch fixes #4934.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2022-01-14 10:13:03 +01:00
Robert Fancsik
8fa7819c1f
Fix memory leak in AtomicModifyWrite (#4944)
This patch fixes #4894.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2022-01-14 10:05:39 +01:00
Robert Fancsik
d681f201c2
Fix invalid assertion CESU8-UTF8 buffer copy (#4946)
The UTF8 buffer size can be smaller then the CESU8 string's size so the UTF8 output is may truncated. Therefore we cannot ensure that the CESU8 buffer is read until the end.
This patch fixes #4920.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2022-01-14 10:03:47 +01:00
mnegyokru
85bad33fbf
Fix scanning bracketed expressions (#4964)
Scan 'async' literal with different depth of brackets

This patch fixes #4924.
This patch fixes #4748.

JerryScript-DCO-1.0-Signed-off-by: Martin Negyokru negyokru@inf.u-szeged.hu
2022-01-13 13:48:34 +01:00
Csaba Osztrogonác
5467ac4608
Fix RIOT CI job (#4962)
Use https instead of the unsupported git protocol.

JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu
2022-01-11 11:03:44 +01:00
Robert Fancsik
0aa182c378
Date.prototype.setYear should invalidate cached tza (#4955)
This patch fixes #4939 and fixes #4940.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2022-01-10 17:35:49 +01:00
Robert Fancsik
6efe14d1bd
Add missing object types for ecma_object_get_class_name (#4954)
This patch fixes #4937 and fixes #4938.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2022-01-10 16:37:35 +01:00
mnegyokru
58e504f1f4
Add stack-overflow check for general [[Construct]] method of function objects (#4945)
This patch fixes #4901

JerryScript-DCO-1.0-Signed-off-by: Martin Negyokru negyokru@inf.u-szeged.hu
2022-01-10 16:27:39 +01:00
mnegyokru
f3a420b672
Fix class static block opening brace parsing (#4942)
The next character should not be consumed after finding the static block opening brace.
This patch fixes #4916.

JerryScript-DCO-1.0-Signed-off-by: Martin Negyokru negyokru@inf.u-szeged.hu
2022-01-10 14:53:04 +01:00
Roland Takacs
69f30977d9
Remove curie-bsp target (#4960)
Intel Corporation has announced the timeline for End of Life status for
Intel Curie Module (Intel Quark SE SoC) products.

JerryScript-DCO-1.0-Signed-off-by: Roland Takacs roland.takacs@h-lab.eu
2022-01-10 14:31:23 +01:00
Virag Orkenyi
49a1a80aa8
Clean up Math builtin max,min and hypot methods (#4904)
Nan_found, Inf_found variables and ecma_is_value_number check have been deleted.

JerryScript-DCO-1.0-Signed-off-by: Orkenyi Virag orkvi@inf.u-szeged.hu
2022-01-03 11:14:23 +01:00
batizdaniel
a6ab5e9abe
Fix runtime error: left shift (#4912)
This patch fixes #4703
This patch fixes #4702

JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz daniel.batiz@h-lab.eu
2021-12-23 11:33:21 +01:00
Csaba Osztrogonác
a63e1d294d
Drop legacy test262-ES2015 testing support (#4908)
ES2015 features are already covered by ES.Next tests,
there is no need to run duplicated and outdated tests.

JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu
2021-12-23 11:31:56 +01:00
mnegyokru
077eaeb4e7
Update build profile to es.next on esp8266 (#4913)
- fix amalgam build issue with es.next profile
  - update esp linker script according to: Table 4-1. in
    https://www.espressif.com/sites/default/files/documentation/2a-esp8266-sdk_getting_started_guide_en.pdf

JerryScript-DCO-1.0-Signed-off-by: Martin Negyokru negyokru@inf.u-szeged.hu
2021-12-23 11:30:19 +01:00
batizdaniel
26c6031530
Fix class literal scan (#4906)
This patch fixes #4892

JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz daniel.batiz@h-lab.eu
2021-12-22 14:50:46 +01:00
Szilagyi Adam
53b61c1f6f
Implement ECMAScript 2022 class static block (#4841)
Co-authored-by: Martin Negyokru negyokru@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2021-12-15 15:45:53 +01:00
Roland Takacs
c51b268276
Minimize mbedos5 target (#4905)
* Removed hardware specific implementations
  * Added simple 'hello world' demo code to be aligned to other targets
  * Added ability to use external resources from outside JerryScript folder

JerryScript-DCO-1.0-Signed-off-by: Roland Takacs roland.takacs@h-lab.eu
2021-12-15 12:52:40 +01:00
Szilagyi Adam
d650390e47
Fix redeclaration related eval corner cases (#4886)
- Fix cases where a function parameter binding is redeclared inside a parameter initializer eval
- Fix cases where a let- or function arguments binding is redeclared inside a function block because
  there is a declaration in a function parameter initializer eval
- Also remove the ECMA_PARSE_CHAIN_INDEX_SHIFT macro, added a debugger_eval_chain_index named field to the jerry context instead

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2021-12-15 12:45:10 +01:00
Csaba Repasi
768a209544
Implement 'hasOwn' routine of Object object (#4835)
JerryScript-DCO-1.0-Signed-off-by: Csaba Repasi repasics@inf.u-szeged.hu
2021-12-15 11:38:02 +01:00
Robert Fancsik
ce5c8492b8
Fix arguments object detection in non-complex param list (#4867)
This patch is the followup of #4849.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2021-12-15 11:35:27 +01:00
Robert Fancsik
dfc001d373
Prevent stack-overflow in json internalize property (#4877)
This patch fixes #4848.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2021-12-15 11:34:22 +01:00
Robert Fancsik
070096f30f
Fix arrow function this binding resolving if environment record is present (#4878)
This patch fixes #4872 and fixes #4876.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2021-12-15 11:32:31 +01:00
Robert Fancsik
7e0aa086ec
Adjust fast array growth (#4868)
Since we allow large buffer allocations during array constructor we could extend this behavior to [[Set]] operation as well.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2021-12-15 10:35:28 +01:00
Robert Fancsik
dbba83fe40
Fix typedarray validation in Atomics read_modify_write (#4879)
This patch fixes #4875.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2021-12-15 10:33:21 +01:00
Robert Fancsik
d37ff33dbe
Fix class constructor as accessor check (#4880)
This patch fixes #4874.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2021-12-15 10:32:11 +01:00
Robert Fancsik
ee59c226d9
Fix invalid argument reference in Promise.all executor (#4885)
This patch fixes #4871.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2021-12-15 10:31:09 +01:00
Robert Fancsik
c2eb9ce35c
Fix object class check for builtin Atomics (#4889)
This patch fixes #4884.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2021-12-15 10:29:29 +01:00
Robert Fancsik
bcc711e731
Add stack-overflow check for Array.prototype.{flat, flatMap} (#4899)
This patch fixes #4890

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2021-12-15 10:28:18 +01:00