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
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
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
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
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
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
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
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
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
Zoltan Herczeg
2a82da62ad
Implement source info retrieval API function ( #4780 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-09-29 12:34:38 +02:00
Zoltan Herczeg
8b3eb93167
Add property key filters for general object property enumeration ( #4778 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-09-28 11:01:15 +02:00