Szilagyi Adam
97fc48132a
Use the Invoke method where the ES10 standard says ( #3963 )
...
We can apply this change to methods which use older standards, because
of the backward compatibility the result is the same
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi [email protected]
2020-07-06 09:05:04 +02:00
Csaba Osztrogonác
5f951bb4f1
Fix TimeWithinDay(t) abstract operation ( #3974 )
...
Fixes #3973 .
TimeWithinDay(t) = t modulo msPerDay, where msPerDay = 86400000.
The sign of the modulo operation result should be same as the right side
per definition, conseqently TimeWithinDay(t) >= 0.
References:
- https://www.ecma-international.org/ecma-262/11.0/#sec-mathematical-operations
- https://www.ecma-international.org/ecma-262/11.0/#sec-overview-of-date-objects-and-definitions-of-abstract-operations
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác [email protected]
2020-07-06 08:12:07 +02:00
Szilagyi Adam
392ee71712
Remove ECMA_TRY_CATCH macro ( #3829 )
...
also refactored the touched methods a little bit
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi [email protected]
2020-07-03 15:06:49 +02:00
Zoltan Herczeg
80716cca90
Implement missing async function and async iterator prototypes. ( #3962 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
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 [email protected]
2020-07-02 11:46:07 +02:00
Péter Gál
55d6637da5
Fix Date.prototype[@@toPrimitive] hint handling ( #3967 )
...
The Date.prototype[@@toPrimitive] only allows the "string", "default" and "number"
hint values. Any other value should throw a TypeError.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal [email protected]
2020-07-02 11:40:08 +02:00
Péter Gál
0c61aee597
Improve the JSON C API ( #3943 )
...
* Added more details into documentation.
* Moved the C unit-test into its own file.
* Added extra test cases.
* Extended the API reference documentation with doctests.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal [email protected]
2020-07-01 14:50:39 +02:00
Péter Gál
ca12a8f8f4
Fix JSON.stringify empty array replacer handling ( #3938 )
...
In case of an empty array is used as a replacer for the JSON.stringify,
the output string should not contain any keys.
Fixes : #3926
JerryScript-DCO-1.0-Signed-off-by: Peter Gal [email protected]
2020-07-01 12:41:34 +02:00
Roland Takacs
dc3165533e
Support symbol property names in Object.defineProperties ( #3933 )
...
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs [email protected]
2020-07-01 12:38:20 +02:00
Csaba Osztrogonác
0deeb39ebf
Fix Object.prototype.toLocaleString() and Array.prototype.toLocaleString() ( #3953 )
...
Since ES6 Object.prototype.toLocaleString() shouldn't call ToObject() and
Array.prototype.toLocaleString() shouldn't call ToObject() for each element.
References:
- https://www.ecma-international.org/ecma-262/11.0/index.html#sec-array.prototype.tolocalestring
- https://www.ecma-international.org/ecma-262/11.0/index.html#sec-object.prototype.tolocalestring
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác [email protected]
2020-07-01 12:05:54 +02:00
Csaba Osztrogonác
b57e9cbc27
Symbol.prototype[Symbol.toPrimitive].length should be 1 ( #3960 )
...
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác [email protected]
2020-07-01 08:54:58 +02:00
Rafal Walczyna
9d2b7334bc
Update Symbol.split functions for String and Regexp to match new standard ( #3942 )
...
In newest ES standard limit parameter is calculated using
ToUint32 function instead of ToLength.
JerryScript-DCO-1.0-Signed-off-by: Rafal Walczyna [email protected]
2020-06-30 16:03:11 +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 [email protected]
2020-06-30 13:54:50 +02:00
Zoltan Herczeg
5535ea88ac
Implement for-await-of statement. ( #3946 )
...
AsyncIteratorClose has not supported yet.
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-06-30 11:21:50 +02:00
Zoltan Herczeg
0b404ea893
Support caching of next method in for-of and built-in methods. ( #3939 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-06-26 14:47:39 +02:00
Dániel Bátyai
2523323310
Simplify resource name handling ( #3929 )
...
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai [email protected]
2020-06-26 12:10:14 +02:00
Zoltan Herczeg
b7e3baeecb
Support caching of next method in generators. ( #3937 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-06-26 12:09:36 +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 [email protected]
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 [email protected]
2020-06-25 12:08:46 +02:00
Csaba Osztrogonác
281635cb40
Fix the types of builtin prototype objects ( #3922 )
...
ES2015 spec made an incompatible change, many builtin prototypes became
no longer valid instances of their respective classes. But unfortunately
it broke the web, so ES2016 reverted String, Boolean and Number prototype
to the original behaviour (ES5.1). JerryScript should match the latest spec.
references:
- ES11 19.3.3 Properties of the Boolean Prototype Object
- ES11 20.1.3 Properties of the Number Prototype Object
- ES11 21.1.3 Properties of the String Prototype Object
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác [email protected]
2020-06-22 16:31:13 +02:00
Zoltan Herczeg
8ccccd9705
Fix a few small issues in generators ( #3919 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-06-22 13:55:33 +02:00
Zoltan Herczeg
b2a6109430
Implement async generators ( #3916 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
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 [email protected]
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 [email protected]
2020-06-18 13:55:55 +02:00
Szilagyi Adam
5e34a5e978
Refactor ecma_builtin_global_object_decode_uri_helper ( #3895 )
...
The main change is the usage of stringbuilder
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi [email protected]
2020-06-18 11:19:52 +02:00
Szilagyi Adam
0fa07c1275
Refactor ecma_builtin_global_object_encode_uri_helper ( #3890 )
...
The main change is the usage of stringbuilder
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi [email protected]
2020-06-18 11:11:19 +02:00
Szilagyi Adam
59b8e91c39
Refactor ecma_builtin_global_object_escape ( #3887 )
...
The main change is the usage of stringbuilder
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi [email protected]
2020-06-18 11:10:06 +02:00
Daniella Barsony
5d6467930a
Add custom dispatcher to Set/Map/WeakSet/WeakMap ( #3790 )
...
JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony [email protected]
2020-06-17 16:07:02 +02:00
Zoltan Herczeg
8719f72e61
Implement async function execution. ( #3897 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
2020-06-17 12:08:01 +02:00
Daniella Barsony
eb8e81d682
Add Generator Prototype custom dispatcher ( #3864 )
...
JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony [email protected]
2020-06-17 11:23:53 +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 [email protected]
2020-06-12 17:55:00 +02:00
Robert Fancsik
23bba1c6d9
Builtin objects finalization should handle function properties with tagged template literal collection ( #3896 )
...
This patch fixes #3893 .
Co-authored-by: Dániel Bátyai [email protected]
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
2020-06-12 13:01:44 +02:00
Dániel Bátyai
70383255fc
Fix result of Date getters when called on invalid date ( #3879 )
...
Fixes #3878 .
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai [email protected]
2020-06-09 07:27:31 +02:00
Csaba Osztrogonác
a885664220
Builtin objects accessor properties should be configurable ( #3839 )
...
http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-standard-built-in-objects
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác [email protected]
2020-06-08 13:22:41 +02:00
Szilagyi Adam
358101f27f
Fix string dereference in ecma_op_create_dynamic_function ( #3873 )
...
Fixes #3862
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi [email protected]
2020-06-08 10:23:26 +02:00
Szilagyi Adam
252cfb0876
Fix length check for Array.prototype indexOf, lastIndexOf and fill ( #3798 )
...
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi [email protected]
2020-06-05 12:20:26 +02:00
Rafal Walczyna
a56e31f194
Update ES6 Set and Map "size" accessor descriptors ( #3826 )
...
In ES6 accessors of built in object are by default configurable.
JerryScript-DCO-1.0-Signed-off-by: Rafal Walczyna [email protected]
2020-06-02 18:01:45 +02:00
Dániel Bátyai
d06c3a7f50
Fix error handling in SerializeJSONProperty ( #3816 )
...
Fixes #3813 .
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai [email protected]
2020-05-30 19:46:52 +02:00
Robert Fancsik
3b4c259281
Add support for builtin/builtin routine 'name' property ( #3810 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
2020-05-29 14:28:52 +02:00
Robert Fancsik
104001df68
Implement function name support for script functions and classes ( #3745 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
2020-05-28 12:33:21 +02:00
Szilagyi Adam
7a20150ae7
Fix error handling in Reflect.defineProperty ( #3800 )
...
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi [email protected]
2020-05-27 18:57:15 +02:00
Dániel Bátyai
8f76a1f382
Rework RegExp engine and add support for proper unicode matching ( #3746 )
...
This change includes several bugfixes, general improvements, and support
for additional features.
- Added full support for web compatibility syntax defined in Annex B
- Implemented parsing and matching patterns in unicode mode
- Fixed capture results when iterating with nested capturing groups
- Significantly reduced regexp bytecode size
- Reduced stack usage during regexp execution
- Improved matching performance
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai [email protected]
2020-05-26 15:28:54 +02:00
Szilagyi Adam
edaf4ef30f
Rework the Reflect.preventExtensions method ( #3771 )
...
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi [email protected]
2020-05-25 18:25:09 +02:00
Szilagyi Adam
843c542053
Rework the Reflect.setPrototypeOf method ( #3774 )
...
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi [email protected]
2020-05-25 18:24:04 +02:00
Szilagyi Adam
ecf159795a
Rework the Reflect.defineProperty method ( #3770 )
...
Also a minor update to the FromPropertyDescriptor operation since in ES6 we can use a property
descriptor whitout any keys
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi [email protected]
2020-05-25 18:09:37 +02:00
Péter Gál
1774cca47c
Fix array length check in lastIndexOf ( #3789 )
...
When lastIndexOf is executed the array length can change and in
case of fast arrays the length should be re-checked.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal [email protected]
2020-05-25 16:36:54 +02:00
Hyukwoo Park
589af6dc90
Handle properties of builtin routine separately from builtin objects ( #3694 )
...
separate builtin routine part to make code clear and to support 'name' property later
JerryScript-DCO-1.0-Signed-off-by: HyukWoo Park [email protected]
2020-05-25 13:17:38 +02:00
Szilagyi Adam
f06c533a29
Change the Reflect.ownKeys method's length property ( #3775 )
...
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi [email protected]
2020-05-25 12:59:51 +02:00
Robert Fancsik
6cd309b525
Function.prototype[@@hasInstance] should not throw error for not callable this value ( #3773 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik [email protected]
2020-05-22 17:23:07 +02:00
Rafal Walczyna
876622a061
Fix vera++ rule to find expressions without space after parentheses ( #3776 )
...
Regex didn't include some characters that may occur after ')'
JerryScript-DCO-1.0-Signed-off-by: Rafal Walczyna [email protected]
2020-05-22 14:37:59 +02:00