kisbg
2919a6463f
Add new target support for ArrayBuffer and TypedArray ( #4369 )
...
JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
2021-01-11 14:20:28 +01:00
Robert Fancsik
6dfd02a08c
Bound function 'length' property should be early initialized ( #4421 )
...
This patch fixes #4402 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2021-01-07 12:10:54 +01:00
Robert Fancsik
fc701aef6d
Fix reference count management in %TypedArray%.prototype.reduce{Right} ( #4419 )
...
This patch fixes #4397 .
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2021-01-07 11:59:16 +01:00
Péter Gál
035e5a27fa
Correctly release wrapper object in JSON stringify ( #4361 )
...
When an error occurs accessing a property during JSON stringify call
the wrapper object is not freed at the correct place.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
2020-12-15 11:18:14 +01:00
Péter Gál
9380d93416
Fix assert in BigInt TypedArray filter and reduce methods ( #4364 )
...
The assert in the reduce and filter methods did not checked if the given value
is a BigInt. This missing check caused the assert to fail.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
2020-12-15 11:14:58 +01:00
Zoltan Herczeg
fe29bf7390
Allow changing the 'this' binding of a realm ( #4357 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-12-14 10:05:30 +01:00
Zoltan Herczeg
cc1e8d2dee
Continue working on realms ( #4356 )
...
- Rework symbols to have the same value across realms
- Support realms for native functions
- Support test262
- Use new.target realms for constructing intrinsics
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-12-09 17:44:21 +01:00
Zoltan Herczeg
df92c86ecf
Implement realm object and support realms for built-ins and JS functions ( #4354 )
...
- Type for realm objects is introduced (ecma_global_object_t)
- Realm reference is added to built-in objects and ECMAScript functions
- Resolving built-ins, global environments, and scopes require realm object
- Unnecessary global object accesses are removed from the code
Missing: external functions and static snapshot functions have no realm reference
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-12-08 14:36:36 +01:00
Zoltan Herczeg
de37e1e049
Template literal arrays should not be marked. ( #4352 )
...
Make array object big endian compatible.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-12-04 10:41:14 +01:00
Zoltan Herczeg
c0fc67f5bd
Rework built-in processing of JerryScript ( #4347 )
...
- All built-ins are native functions now
- Native handlers have a built-in id: ECMA_BUILTIN_ID_HANDLER
- Built-in routine identifiers start from 1
- Built-in routines have an own flag set
- Name property of routines is resolved dynamically
- Style fixes
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-12-01 11:37:08 +01:00
Virag Orkenyi
19011258d8
Fix the optional argument problem in typedarray_prototype_reduce_... ( #4323 )
...
JerryScript-DCO-1.0-Signed-off-by: Virag Orkenyi orkvi@inf.u-szeged.hu
2020-11-26 12:06:22 +01:00
Virag Orkenyi
fab35c3f93
Fix the indexing problem in typedarray_prototype_index_of & last_index_of ( #4305 )
...
JerryScript-DCO-1.0-Signed-off-by: Virag Orkenyi orkvi@inf.u-szeged.hu
2020-11-16 15:43:55 +01:00
Ádám Kallai
d0e385f9eb
Fix the ESNext build with disabled JERRY_BUILTIN_PROXY ( #4320 )
...
With a disabled JERRY_BUILTIN_PROXY option the build fails becouse
of missing guards.
The run-test buildoption_test is also extended with this.
JerryScript-DCO-1.0-Signed-off-by: Adam Kallai kadam@inf.u-szeged.hu
2020-11-02 09:30:43 +01:00
Daniella Barsony
3bad85b83b
Add Boolean Prototype Dispatcher ( #4308 )
...
JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
2020-10-29 12:24:32 +01:00
Daniella Barsony
72c92d6b36
Add Array Builtin Dispatcher ( #4310 )
...
JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
2020-10-29 10:49:36 +01:00
Daniella Barsony
484e999dec
Add Promise Prototype Dispatcher ( #4309 )
...
JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
2020-10-28 15:09:17 +01:00
Csaba Osztrogonác
3115d4dc16
Implement DataView.prototype.{set, get}Big{U}int64 methods ( #4315 )
...
Co-authored by Adam Szilagyi aszilagy@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu
2020-10-28 11:46:52 +01:00
Csaba Osztrogonác
24a5489331
Implement ToIndex abstract operation ( #4287 )
...
https://www.ecma-international.org/ecma-262/11.0/#sec-toindex
Made DataView constructor, DataView.prototype.setXXX/getXXX methods ES11 conform.
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu
2020-10-27 10:37:50 +01:00
Daniella Barsony
d5d27afd39
Add Dispatcher for Promise Builtin ( #4307 )
...
JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
2020-10-22 13:21:33 +02:00
Virag Orkenyi
49c633210a
Fix assertion fail in typedarray_prototype_to locale_string ( #4285 )
...
Change typedarray_prototype_to_locale_string_helper to use ecma_op_invoke_magic_id instead
JerryScript-DCO-1.0-Signed-off-by: Virag Orkenyi orkvi@inf.u-szeged.hu
2020-10-22 12:49:40 +02:00
Zoltan Herczeg
91e0cfc767
Implement ES11 globalThis ( #4306 )
...
Also improve symbol built-in instantiation.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-10-22 10:59:54 +02:00
Roland Takacs
3c9a7915e1
Initialize variable to eliminate may be used uninitialized warnings ( #4297 )
...
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs roland.takacs@h-lab.eu
Co-authored-by: Roland Takacs <roland.takacs@h-lab.eu>
2020-10-19 14:32:40 +02:00
Ádám Kallai
23e9e773e0
Fix implicit 'double' conversion reported by Clang ( #4296 )
...
JerryScript-DCO-1.0-Signed-off-by: Adam Kallai kadam@inf.u-szeged.hu
2020-10-19 14:30:43 +02:00
Robert Fancsik
d8955552d7
Revise internal array creation operations ( #4291 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-10-16 15:24:50 +02:00
Ádám Kallai
f6cf1400bd
Fix implicit 'double' conversion reported by Clang 12.0.0 ( #4288 )
...
JerryScript-DCO-1.0-Signed-off-by: Adam Kallai kadam@inf.u-szeged.hu
2020-10-14 11:43:27 +02:00
kisbg
d317124650
Update JSON stringify to conform ES11 standard ( #4176 )
...
JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
2020-10-12 13:04:08 +02:00
kisbg
da1a4bbd44
Implement numeric-separator ( #4158 )
...
JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
2020-10-12 11:33:03 +02:00
kisbg
148f69f4a5
Add new target support for object create ( #4203 )
...
JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
2020-10-07 15:07:25 +02:00
kisbg
99c7099eaa
Update object.prototype.toString to conform ES11 standard ( #4196 )
...
JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
2020-10-07 15:05:17 +02:00
Robert Fancsik
53a085cd28
Builtin objects symbol properties should be lazy listed ( #4271 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-10-06 14:52:25 +02:00
kisbg
a084fdbe45
Add a new check for array.prototype.sort in array prototype dispatch ( #4208 )
...
Bugfix: first check arguments callable then the length of the this value.
JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
2020-10-05 11:26:01 +02:00
Csaba Osztrogonác
7458766033
Date.parse should reject out of range values ( #4248 )
...
The spec doesn't say explicitly that Date.parse should call TimeClip
abstract operation at the end. But Date object can represent time
values only in the range 1970 Jan 01 +/-8,640,000,000,000,000 ms.
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu
2020-10-02 10:39:52 +02:00
Csaba Osztrogonác
8fe3891b15
Fix Date.parse to handle times without timezone properly ( #4249 )
...
https://www.ecma-international.org/ecma-262/11.0/#sec-date.parse
"When the UTC offset representation is absent, date-only forms are
interpreted as a UTC time and date-time forms are interpreted as a local time."
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu
2020-10-01 16:34:59 +02:00
Csaba Osztrogonác
e227634b45
Make Date.UTC to conform to the latest ES11 spec ( #4250 )
...
Date.UTC should work with only one argument too.
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu
2020-10-01 16:34:09 +02:00
Philippe
f97c0134d7
Fix compilation warnings when using 32-bit floats ( #4199 )
...
JerryScript-DCO-1.0-Signed-off-by: Philippe pgu-swir@users.noreply.github.com
2020-09-28 16:12:21 +02:00
Zoltan Herczeg
32de38198a
Fix invalid free in TypedArray find method. ( #4230 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-09-28 10:48:14 +02:00
Csaba Osztrogonác
de38764e88
Fix heap buffer overflow in Array.prototype.copyWithin ( #4211 )
...
2nd and 3rd argument evaluation of Array.prototype.copyWithin can change
the length of the array as a side-effect. But ES11 spec says that the
algorithm should use the original length. In this case it could happen
that the underlying buffer should be extended.
Fixes #4204
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu
2020-09-25 15:06:29 +02:00
Virag Orkenyi
be180ba159
Delete ECMA_OP_TO_NUMBER_TRY_CATCH macro ( #4229 )
...
JerryScript-DCO-1.0-Signed-off-by: Virag Orkenyi orkvi@inf.u-szeged.hu
2020-09-24 10:50:12 +02:00
Dániel Bátyai
55554535b2
Update Promise.all/race to ES11 ( #4202 )
...
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai daniel.batyai@h-lab.eu
2020-09-18 14:05:48 +02:00
Dániel Bátyai
74f66879c2
Improve support for built-in native handlers ( #4184 )
...
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai daniel.batyai@h-lab.eu
2020-09-17 18:35:11 +02:00
Virag Orkenyi
1be9573925
Separate ecma_builtin_helper_string_find_index into two parts ( #3978 )
...
JerryScript-DCO-1.0-Signed-off-by: Virag Orkenyi orkvi@inf.u-szeged.hu
2020-09-17 15:38:36 +02:00
Rafal Walczyna
7345c83af7
Update TypedArray properties to conform with newest standard ( #4194 )
...
name and length properties has been updated.
Enabling BigInt support in TypedArray.prototype.sort when no
comparefn function is provided.
JerryScript-DCO-1.0-Signed-off-by: Rafal Walczyna r.walczyna@samsung.com
2020-09-14 17:32:26 +02:00
Daniella Barsony
c013fade26
Add TypedArray custom dispatcher ( #4040 )
...
JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
2020-09-08 10:05:15 +02:00
Szilagyi Adam
9bffc981cd
Refactor Array.prototype.splice to conform ES11 standard ( #4172 )
...
The algorithm is based on ECMA-262 v11, 22.1.3.28
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-09-08 10:04:13 +02:00
Rafal Walczyna
074945dafa
Add missing value release to TypedArray fill method ( #4177 )
...
Value was not freed when error occurs. It caused assertion to fail
when BigInt was used.
JerryScript-DCO-1.0-Signed-off-by: Rafal Walczyna r.walczyna@samsung.com
2020-09-01 15:28:12 +02:00
Szilagyi Adam
28c186c98f
Refactor ArrayBuffer.prototype.slice to conform ES11 standard ( #4174 )
...
The algorithm is based on ECMA-262 v11, 24.1.4.3
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-08-28 14:00:49 +02:00
Szilagyi Adam
9589771f7a
Refactor ecma_op_check_object_coercible ( #4169 )
...
The method returns bool now instead of an ecma_value_t
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-08-28 13:12:50 +02:00
kisbg
a470fef8a5
Add length check in copy_within's fast path ( #4168 )
...
fixes #4146
JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
2020-08-28 10:55:26 +02:00
Szilagyi Adam
2aa5f136a4
Implement String.prototype.replaceAll ( #4088 )
...
The algorithm is based on ECMA-262 v12, 21.1.3.18
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-08-28 10:41:11 +02:00
kisbg
1ec216e573
Fixing test262 built-ins symbol test-cases ( #4123 )
...
The remaining test-cases needs realm feature
JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
2020-08-27 13:39:04 +02:00