4480 Commits

Author SHA1 Message Date
Robert Fancsik
bfc1121e35
Fix AsyncGeneratorPrototype routines 'this' argument validation (#4811)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2021-12-06 12:03:26 +01:00
Roland Takacs
af297bc578
Separate targets into os and baremetal-sdk parts (#4842)
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs roland.takacs@h-lab.eu
2021-12-06 11:02:52 +01:00
Dániel Bátyai
9860d66a56
Rework the public API (#4829)
Related to #4186.

Some notable changes:
  - The term 'Error' now strictly refers to native Error objects defined in
    the ECMA standard, which are ordinary objects. All other uses of
    'error' or 'error reference' where the term refers to a thrown value is
    now called 'exception'.

  - Simplified the naming scheme of many String API functions. These functions
    will now also take an 'encoding' argument to specify the desired
    encoding in which to operate.

  - Removed the substring-copy-to-buffer functions. These functions
    behaved awkwardly, as they use character index to specify the
    start/end positions, and were mostly used incorrectly with byte
    offsets instead. The functionality can still be replicated with
    other functions if necessary.

  - String-to-buffer functions will no longer fail if the buffer is not
    sufficiently large, the string will instead be cropped.

  - Fixed the usage of the '_sz' prefix in many API functions. The term
    'sz' means zero-terminated string in hungarian notation, this was
    used incorrectly in many cases.

  - Renamed most of the public API functions to have shorter, more on-point
    names, rather than the often too long descriptive names. Functions are now
    also grouped by the type of value they operate on, where this makes
    sense.

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2021-12-06 10:20:09 +01:00
Dániel Bátyai
81d2319144
Improve float number handling and conversion (#4820)
Fixes #4739.

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2021-12-03 12:58:37 +01:00
Roland Takacs
a1c1d42710
Update Zephyr target to 2.7.0 (#4838)
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs roland.takacs@h-lab.eu
2021-12-02 15:33:29 +01:00
Robert Fancsik
d69ac0e070
Implement logical assignment operators (#4834)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2021-11-30 10:44:27 +01:00
Szilagyi Adam
70e275e92f
Implement ECMAScript 2022 private class methods and fields (#4831)
Co-authored-by: Robert Fancsik robert.fancsik@h-lab.eu
Co-authored-by: Martin Negyokru mnegyokru@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2021-11-26 12:24:59 +01:00
Csaba Repasi
841e21a970
Generate parser error messages (#4836)
Support parser error messages generation in tools/gen-strings.py.

JerryScript-DCO-1.0-Signed-off-by: Csaba Repasi repasics@inf.u-szeged.hu
2021-11-26 10:26:46 +01:00
Csaba Repasi
271d9b2463
Outsource magic error messages (#4821)
Modify tools/gen-magic-strings.py to generate error messages.

JerryScript-DCO-1.0-Signed-off-by: Csaba Repasi repasics@inf.u-szeged.hu
2021-11-25 14:06:40 +01:00
batizdaniel
fc4168f2b4
Fix numeric literal with leading decimal point in accessor property name (#4832)
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz daniel.batiz@h-lab.eu
2021-11-24 17:07:57 +01:00
Roland Takacs
3737a28eaf
Update NuttX target to releases/10.2 (#4822)
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs roland.takacs@h-lab.eu
2021-11-23 13:21:24 +01:00
Roland Takacs
2899582080
Update RIOT target to 2021.10 (#4826)
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs roland.takacs@h-lab.eu
2021-11-23 13:17:46 +01:00
Jacques Germishuys
06b4c02204
Restore esp-idf port (#4828)
This also cleans up all the files, moving them into a single file for
the port itself and module support respectively.

JerryScript-DCO-1.0-Signed-off-by: Jacques Germishuys jacques@beakbooklimited.com
2021-11-23 13:13:50 +01:00
Csaba Osztrogonác
a7d5594d30
Fix JERRY_VLA macro on Windows (#4827)
Fixes #4824. The last macro argument should be inside parentheses.

JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu
2021-11-23 13:11:45 +01:00
batizdaniel
6b9e24aa51
Fix function name evaluation order (#4830)
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz daniel.batiz@h-lab.eu
2021-11-23 11:58:12 +01:00
Robert Sipka
4592143400
Generator declaration is not allowed in single statement position (#4815)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka robert.sipka@h-lab.eu
2021-11-09 08:38:09 +01:00
Robert Fancsik
80777799f6
Fix goto labels indentation (#4818)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2021-11-05 16:58:41 +01:00
Robert Fancsik
badfdf4dba
Replace vera++ with clang-format (#4518)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2021-11-05 14:15:47 +01:00
Robert Fancsik
bc091e1742
Optimize ecma_op_function_call (#4817)
Remove redundant isCallable checks

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2021-11-04 17:26:28 +01:00
Robert Sipka
7ea0000ee0
Minor fix in for-of statement parsing (#4814)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka robert.sipka@h-lab.eu
2021-11-02 19:12:30 +01:00
Zsolt Borbély
6a995e2887
Fix typos in the documentation and related files (#4809)
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2021-11-02 11:37:05 +01:00
Zoltan Herczeg
89e367bbfd
Optimize typed array access (#4806)
Use uint32 indexes instead of double indexes.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-11-02 11:07:56 +01:00
Zoltan Herczeg
960b99766c
Allocate buffers when the buffer pointer is requested (#4812)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-11-02 09:36:55 +01:00
Robert Fancsik
3ad76f932c
Fix for-in collection cleanup on abrupt 'has' result (#4807)
This patch fixes #4747

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2021-11-02 08:40:07 +01:00
Robert Fancsik
efe63a5bbc
Fix parsing unterminated let statement (#4808)
This patch fixes #4754

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2021-11-02 08:36:16 +01:00
Robert Sipka
9ed695f9d2
Assignment Expression is not allowed in for of head's expression position (#4810)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka robert.sipka@h-lab.eu
2021-10-29 09:52:30 +02:00
Csaba Osztrogonác
3c742bef57
Test262 runner shouldn't change newline characters (#4805)
It fixes the following test on Windows:
built-ins/Function/prototype/toString/line-terminator-normalisation-LF.js

JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu
2021-10-28 13:56:52 +02:00
Zoltan Herczeg
a024eb2118
Add allocate/free callbacks to ArrayBuffers (#4801)
Larger buffer allocations will throw error instead of calling jerry_fatal.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-10-28 13:51:34 +02:00
Robert Fancsik
d2388e907f
Implement CreateAsyncFromSyncIterator (#4802)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2021-10-28 12:45:47 +02:00
Csaba Osztrogonác
dd77ec914a
Fine-tune test262-esnext jobs on the CI (#4566)
Previously test262-esnext was separated to 2 jobs: language and other tests.
But now tests run in parallel and CI runs release and debug tests too,
separating jobs to release and debug mode is much more obvious. But
debug tests are still slow (~10-11 minutes), let's split only debug job.

JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu
2021-10-27 13:07:58 +02:00
Robert Fancsik
24c1a93d91
Remove block result (#4799)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2021-10-27 10:59:00 +02:00
Robert Sipka
c6f9ea65ce
Declaration in the head of a for-of loop can't have an initializer (#4804)
JerryScript-DCO-1.0-Signed-off-by: Robert Sipka robert.sipka@h-lab.eu

Co-authored-by: Robert Sipka <robert.sipka@h-lab.eu>
2021-10-27 09:51:14 +02:00
Péter Gál
499cdea75c
Fix jerry_value_is_{true,false} documentation (#4803)
The API doc for jerry_value_is_{true,false} incorrectly stated
that it is a replacment for the `jerry_value_is_boolean` method.
The `jerry_value_is_true` is the direct replacement of the
`jerry_get_boolean_value` method and the "false" version is a new
method.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
2021-10-26 09:43:51 +02:00
Csaba Osztrogonác
100b6f577e
Test262 exludelist fix after #4721 (#4800)
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu
2021-10-26 06:45:19 +02:00
ChrisPei
2a4fb19157
Add missing "jerryscript.h" include to esp-idf target (#4759)
JerryScript-DCO-1.0-Signed-off-by: ChrisPei spoppig5@gmail.com
2021-10-21 12:15:44 +02:00
Gergo Csizi
74f98ec4d7
Add Atomics support (#4721)
Creating atomics interface

JerryScript-DCO-1.0-Signed-off-by: Gergo Csizi csgergo92@gmail.com
2021-10-20 15:50:12 +02:00
Gergo Csizi
c446871214
Optimize lit_is_valid_utf8_string (#4762)
JerryScript-DCO-1.0-Signed-off-by: Gergo Csizi csgergo92@gmail.com
2021-10-20 15:45:47 +02:00
Péter Gál
4e8d6344a8
Force value conversion in case of TypedArray filter method (#4794)
During the execution of the TypedArray filter method it is possible
to have a different sized output TypedArray than the input one.
When copying the data to the output array the values must be
correctly converted to the output TypedArray's value range.

Fixes: #4793

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
2021-10-20 15:40:52 +02:00
Péter Gál
dae234f416
Correctly convert data in case of TypedArray slice (#4796)
When executin the TypedArray's slice method it is possible to have
the a different element sized output TypedArray. In such case
the data must be converted to the desired element type/size.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
2021-10-20 15:40:33 +02:00
Péter Gál
4912e3b739
Avoid buffer-overflow in Array.slice when using fast arrays (#4797)
In the Array.slice method when the engine uses fast arrays the "end" value
was not updated if the input array's length changed. This can occur when the start/end
index normalization executes a method and the length is changed forcefully.
This leads to a buffer-overflow as the element copy reads too much data from the input
array.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
2021-10-20 15:40:19 +02:00
Zoltan Herczeg
b52c114423
Implement eval check for ECMAScript code (#4788)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-10-15 22:25:20 +02:00
Gergo Csizi
fe3a5c08b2
Fix magic-string generation (#4751)
In some cases the magic-string generator creates conditions like: A || !A . These conditions can be simplified.

JerryScript-DCO-1.0-Signed-off-by: Gergo Csizi csgergo92@gmail.com
2021-10-15 19:09:04 +02:00
Zoltan Herczeg
d4231e7251
Split main promise event filter into multiple filters (#4792)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-10-11 12:48:50 +02:00
Mate Dabis
f6eac3afdc
Add notes to jerry_create_undefined, jerry_create_null and jerry_create_boolean (#4790)
JerryScript-DCO-1.0-Signed-off-by: Mate Dabis mdabis@inf.u-szeged.hu
2021-10-11 11:07:55 +02:00
Zoltan Herczeg
c696bc9327
Implement vm throw capture status management for API errors (#4783)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-10-07 11:35:49 +02:00
Zoltan Herczeg
7c21fb89b2
Reorder list of function built-in properties (#4791)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-10-07 09:52:07 +02:00
Zoltan Herczeg
d98ff6fd30
Support getting script object in the backtrace callback. (#4789)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-10-06 11:09:01 +02:00
Csaba Osztrogonác
54b1a3c739
Date.prototype.setTime should invalidate local TZA cache (#4786)
Fixes #4749.

JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu
2021-10-01 12:59:38 +02:00
Csaba Osztrogonác
f3cd586094
Fix leaking lastIndex values in RegExp built-ins (#4787)
Fixes #4781. This is a followup fix after #4166.

JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu
2021-10-01 12:56:53 +02:00
Zoltan Herczeg
7d355b0f8e
Change error message description (#4785)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-10-01 12:24:20 +02:00