4501 Commits

Author SHA1 Message Date
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
Csaba Repasi
42523bd6e2
Use external string when raising error (#4881)
JerryScript-DCO-1.0-Signed-off-by: Csaba Repasi repasics@inf.u-szeged.hu
2021-12-10 18:15:00 +01:00
Szilagyi Adam
4cbc77d709
Update detached arraybuffer handling (#4840)
- Fix isValidIntegerIndex usage in IntegerIndexed objects, [[Get]], [[Set]], [[DefineOwnProperty]] internal methods.
- The test262 revision is updated to the latest master hash.
- The PR is not separated into individual PRs since the standard change couldn't be tested without the new test262 revision.

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2021-12-10 13:09:16 +01:00
Yonggang Luo
d5f048e961
Add FEATURE_INIT_FINI support on Windows. (#4859)
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2021-12-10 13:01:24 +01:00
Robert Fancsik
55acdf2048
Fix buffer overflow in string radix conversion (#4850)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2021-12-07 15:28:10 +01:00
Robert Fancsik
18dd9aa75a
Prevent arguments object creation if 'arguments' function argument is present (#4849)
This patch fixes #4847.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2021-12-07 14:05:48 +01:00
Yonggang Luo
f8faf574b6
Rename resource_name to source_name (#4846)
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2021-12-07 14:05:04 +01:00
Robert Fancsik
51da15516e
Build fix after #4811 (#4845)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu
2021-12-06 16:46:46 +01:00
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