134 Commits

Author SHA1 Message Date
kisbg
dc3ae4ff06
Implement Promise.allsettled (#4616)
Also i updated the promise race and all method to the latest standart

The two jerry/es.next test-cases has been update to support the latest standart

JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
2021-03-08 11:43:42 +01:00
kisbg
129ca4946c
Implement WeakRef Object (#4546)
Related test262 test-cases has been removed from skip list.
Execpt two test-case since they need other feature to work (Finalization registry and async GC)

JerryScript-DCO-1.0-Signed-off-by: Bence Gabor Kis kisbg@inf.u-szeged.hu
2021-03-01 13:46:54 +01:00
Zoltan Herczeg
5c35370327
Create special objects for scripts instead of functions (#4610)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-02-23 15:34:09 +01:00
Yonggang Luo
818cc8ddab
Split globalThis to be configurable. (#4575)
JERRY_BUILTIN_GLOBAL_THIS can be enabled without JERRY_ESNEXT

JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
2021-02-09 16:20:05 +01:00
Robert Fancsik
0628ae1e7b
Remove the ENABLED/DISABLED macros (#4515)
The removal of these macros enabled cppcheck to reveal new errors.
These errors are also fixed by the patch.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2021-02-04 23:47:05 +01:00
Szilagyi Adam
6ec4455111
Implement Symbol.matchAll (#4082)
The following methods were implemented:
- String.prototype.matchAll based on ECMA-262 v11, 21.1.3.12
- RegExp.prototype[@@matchAll] based on ECMA-262 v11, 21.2.5.8
- RegExp String Iterator Object based on 21.2.7

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2021-01-18 18:08:35 +01:00
Zoltan Herczeg
3b77117a2e
Add a callback which is called when Error objects are created (#4465)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-01-18 16:56:38 +01:00
Dániel Bátyai
0fec9135ec
Rework module parsing and execution (#4462)
This patch disables automatic detection of module code, and instead
requires the user to explicitly specify whether to parse a source
as a module or as a script.

To achieve this the jerry_parse API function now takes a new option
which signals that the source should be parsed as a module.

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai daniel.batyai@h-lab.eu
2021-01-18 15:33:43 +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
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
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
Tóth Béla
09c8d28b2c
Implement TrimStart TrimEnd and aliases (#4102)
Based on: https://tc39.es/ecma262/#sec-string.prototype.trim

JerryScript-DCO-1.0-Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
2020-08-25 13:10:36 +02:00
Szilagyi Adam
85981457e6
Implement BigInt64 and BigUint64 typedArrays (#4151)
Also implemented ToBigInt conversion method based on ECMA-262 v11, 7.1.13

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-08-24 18:03:12 +02:00
kisbg
cd34bfa4c3
Implement Array.flat and Array.flatMap (#3925)
JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
2020-08-12 16:51:04 +02:00
kisbg
43a82cddb9
Implement Object.prototype.fromEntries (#4065)
JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
2020-08-07 15:08:12 +02:00
Szilagyi Adam
945b22976a
Implement Object.prototype.{__lookupGetter__, __lookupSetter__} (#4039)
__lookupGetter__ is based on ECMA-262 v11, B.2.2.4
__lookupSetter__ is based on ECMA-262 v11, B.2.2.5

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-08-04 16:41:05 +02:00
Szilagyi Adam
b4a4619a6c
Implement Object.prototype.{__defineGetter__, __defineSetter__} (#4032)
__defineGetter__ is based on ECMA-262 v11, B.2.2.2
__defineSetter__ is based on ECMA-262 v11, B.2.2.3

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-07-30 16:34:43 +02:00
Zoltan Herczeg
df2f7782f7
Implement BigInt primitve type and some of its operations (#4062)
Supported operations:
- parse BigInt (decimal, hexadecimal, binary)
- toString with any radix between 2 and 36
- arithmetic operations: negate, add, subtract, multiply, divide, modulo
- left and right shift

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-07-30 12:08:34 +02:00
Szilagyi Adam
ff36f3579d
Implement %TypedArray%.prototype.includes (#4025)
The algorithm is based on ECMA-262 v11, 22.2.3.13

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-07-27 18:09:39 +02:00
kisbg
d39a076b2e
Added RegExp dotAll flag (#4000)
JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
2020-07-24 13:42:57 +02:00
Dániel Bátyai
cf097ca16b
Fix values of properties that reference intrinsic function objects (#4024)
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai daniel.batyai@h-lab.eu
2020-07-24 12:54:54 +02:00
Szilagyi Adam
54bfd2ba37
Implement Promise.prototype.onFinally (#3987)
The algorith is based on ECMA-262 v11, 25.6.5.3

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-07-24 12:54:16 +02:00
Tóth Béla
2f2a4e066c
Implement String.padStart and String.padEnd (#3999)
Based on: https://tc39.es/ecma262/#sec-string.prototype.padstart

JerryScript-DCO-1.0-Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
2020-07-24 11:24:18 +02:00
Szilagyi Adam
e8c5c46894
Implement Symbol.prototype.description (#3995)
The algorithm is based on ECMA-262 v11, 19.4.3.2

Also added a custom dispatcher for the Symbol prototype

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-07-20 13:47:25 +02:00
Dániel Bátyai
74781c28c2
Fix sticky flag handling in @@replace (#4005)
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai daniel.batyai@h-lab.eu
2020-07-20 12:54:06 +02:00
Szilagyi Adam
604cfaced4
Implement Array.prototype.includes (#3991)
The algorithm is based on ECMA-262 v11, 22.1.3.13

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-07-15 19:21:24 +02:00
Zoltan Herczeg
80716cca90
Implement missing async function and async iterator prototypes. (#3962)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-07-03 11:04:27 +02:00
Szilagyi Adam
cd1e067671
Update Promise.race and Promise.all to ES11 (#3954)
Changes based on ECMA-262 v11, 25.6.4.4 and 26.6.4.1 step 3

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-07-02 11:46:07 +02:00
Csaba Osztrogonác
122480aa61
JERRY_BUILTIN_xxx macros should depend on JERRY_ESNEXT (#3920)
JERRY_BUILTIN_xxx (ES2015+) features don't build without enabling
JERRY_ESNEXT macro, this invalid configuration shouldn't be allowed.
Additionally remove unnecessary JERRY_ESNEXT ifdef guards.

JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu
2020-06-30 13:54:50 +02:00
Dániel Bátyai
2523323310
Simplify resource name handling (#3929)
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2020-06-26 12:10:14 +02:00
Zoltan Herczeg
f88489beef
Implement yield* operator (#3923)
Missing features:
- caching next() method (this also true for normal generators)
- automatic sync to async generator conversion

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-06-25 17:11:16 +02:00
Roland Takacs
ae17c1184c
Implement Object.getOwnPropertyDescriptors built-in method (#3921)
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs@inf.u-szeged.hu
2020-06-25 12:08:46 +02:00
Zoltan Herczeg
b2a6109430
Implement async generators (#3916)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-06-22 13:54:18 +02:00
Szilagyi Adam
0f0041d720
Make the Set.prototype values, keys and [@@iterator] methods to be one intrinsic method (#3777)
After this patch these methods will be the same function objects

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-06-18 13:59:31 +02:00
Szilagyi Adam
16750e8171
Use stringbuilder in ecma_builtin_helper_object_to_string (#3807)
Also added steps 4-6 from ECMA-262 v6, 19.1.3.6

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-06-18 13:55:55 +02:00
Dániel Bátyai
fde0d556ac
Re-target for ES.Next (#3901)
A list of changes:
- 'es2015-subset' profile is deprecated, and an 'es.next' profile is added.
- The default profile is changed to 'es.next'
- Renamed the JERRY_ES2015 guard to JERRY_ESNEXT
- Renamed JERRY_ES2015_BUILTIN_* guards to JERRY_BUILTIN_*
- Moved es2015 specific tests to a new 'es.next' subdirectory
- Updated docs, targets, and test runners to reflect these changes

Resolves #3737.

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
2020-06-12 17:55:00 +02:00
Robert Fancsik
104001df68
Implement function name support for script functions and classes (#3745)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-05-28 12:33:21 +02:00
Szilagyi Adam
4342c9ea6f
Implement Proxy object [[OwnPropertyKeys]] internal method (#3639)
The algorithm is based on ECMA-262 v6, 9.5.12

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-04-14 16:57:47 +02:00
Szilagyi Adam
901e57c7d0
Implement Proxy object [[Construct]] internal method (#3657)
The algorithm is based on ECMA-262 v6, 9.5.14

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-04-06 12:17:23 +02:00
Szilagyi Adam
4240b740aa
Implement Object.prototype.__proto__ accessor property (#3546)
We are using the already existing Object.getPrototypeOf and
Object.setProtoypeOf methods

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-03-27 14:46:51 +01:00
Szilagyi Adam
94b8b4bb7b
Implement Proxy object [[HasProperty]] internal method (#3642)
The algorithm is based on ECMA-262 v6, 9.5.7

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-03-27 14:33:56 +01:00
Szilagyi Adam
6a022eb265
Implement Proxy object [[setPrototypeOf]] internal method (#3631)
The algorithm is based on ECMA-262 v6, 9.5.2

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-03-27 11:10:55 +01:00
Virag Orkenyi
18a4cba062
Implement Number.parseFloat and Number.parseInt (#3576)
The Global object parseFloat and parseInt fuctions have been moved to the number helpers and intrinsic properties have been created the are used for both the Number and Global methods.

JerryScript-DCO-1.0-Signed-off-by: Virag Orkenyi orkvi@inf.u-szeged.hu
2020-03-27 10:50:49 +01:00
Szilagyi Adam
b2e54e915b
Implement Proxy object [[Delete]] internal method (#3616)
The algorithm is based on ECMA-262 v6, 9.5.10

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-03-18 16:52:24 +01:00
Csaba Osztrogonác
72f8ef344c
Implement missing Math functions from ES6 standard (#3593)
First step to fix issue #3568.

Changes:
- Implemented Math.clz32(), Math.fround(), Math.imul(), Math.hypot().
- Implemented all remaining Math functions with calling the standard
libm functions, but they throw UNIMPLEMENTED exception with jerry-libm,
because the necessary fdlibm functions are missing and should be ported.

All Math related test262 tests pass (except function name and length tests)

JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu
2020-03-10 11:15:00 +01:00
Robert Fancsik
4e136c8973
Implement the core of Proxy object (#3562)
- Internal routines of the of the proxy object are unimplemented
 - For-in enumerate with proxy target is currently not supported

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-02-28 14:41:59 +01:00
Szilagyi Adam
cdbabc8c30
Use stringbuilder in ecma_builtin_try_to_instantiate_property (#3575)
Also removed the ecma_append_magic_string_to_string method,
because it doesn't get used anymore.

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-02-24 11:19:04 +01:00
Daniella Barsony
73daeb19c9
Implement new Reflect methods (#3549)
This patch implements the get, set, has, deleteProperty, ownKeys, and construct methods of the Reflect objects. The Reflect.construct method is missing the new_target support because ecma_op_function_construct doesn't support it yet.

JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
2020-02-24 11:02:06 +01:00
Szilagyi Adam
b0a575b049
Use stringbuilder in vm_get_backtrace (#3566)
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-02-20 13:01:04 +01:00
Szilagyi Adam
44e63e038d
Use stringbuilder in ecma_get_symbol_descriptive_string (#3560)
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-02-18 09:47:53 +01:00