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 oszi@inf.u-szeged.hu
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 aszilagy@inf.u-szeged.hu
2020-07-03 15:06:49 +02:00
Robert Fancsik
19ecd8717f
Fix property redefinition ( #3970 )
...
The previously allocated property should not be deleted only it's type should be change.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-07-03 14:13:47 +02:00
Robert Fancsik
f98d7f24a7
Support super property reference in object methods/accessors ( #3940 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-07-03 12:16:23 +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
Zsolt Borbély
f86b78a886
Fix the configuration of stack measurement in jerry-test ( #3971 )
...
Build command via CMake parameter:
```
tools/build.py --jerry-cmdline-test=on --cmake-param=-DJERRY_TEST_STACK_MEASURE=ON --compile-flag=-static
```
Build command via compile flag:
```
tools/build.py --jerry-cmdline-test=on --compile-flag=-DJERRY_TEST_STACK_MEASURE=1 --compile-flag=-static
```
JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
2020-07-02 17:12:13 +02:00
Zoltan Herczeg
9e18ff29c6
Implement ... support for object initializers. ( #3968 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-07-02 15:04:21 +02:00
Péter Gál
eb77f96d20
Add simple stack measure for jerry-test ( #3717 )
...
This change introduces simple stack measuring by coloring the stack
before doing the actual JS work.
The dynamic linking should be avoided as it will use the stack during
the symbol resolving.
At this moment the `JERRY_STACK_MEASURE` compile time define will enable
the measurement for the jerry-test binary.
A usable build configuration:
```
./tools/build.py --jerry-cmdline-test=on --compile-flag=-DJERRY_STACK_MEASURE=1 --compile-flag=-static
```
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
2020-07-02 11:54:52 +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
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 pgal.usz@partner.samsung.com
2020-07-02 11:40:08 +02:00
Csaba Osztrogonác
e943d12286
Speedup AppVeyor CI runtime ( #3965 )
...
There is no good reason to test JERRY_DEBUGGER=OFF configuration too,
because debugger itself contains Windows specific codepath. If the
build works with debugger, it has to work without debugger too.
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu
2020-07-01 19:51:58 +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 pgal.usz@partner.samsung.com
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 pgal.usz@partner.samsung.com
2020-07-01 12:41:34 +02:00
Zoltan Herczeg
6389816f67
Implement AsyncIteratorClose for for-await-of statement. ( #3955 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-07-01 12:40:39 +02:00
Roland Takacs
dc3165533e
Support symbol property names in Object.defineProperties ( #3933 )
...
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs@inf.u-szeged.hu
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 oszi@inf.u-szeged.hu
2020-07-01 12:05:54 +02:00
Csaba Osztrogonác
1064b19cfb
Class accessors shouldn't be enumerable. ( #3961 )
...
Reference:
https://www.ecma-international.org/ecma-262/11.0/index.html#sec-runtime-semantics-classdefinitionevaluation 21.a,b
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu
2020-07-01 12:03:49 +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 oszi@inf.u-szeged.hu
2020-07-01 08:54:58 +02:00
Zoltan Herczeg
37049c4968
Support catch statement without argument. ( #3956 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-06-30 18:00:40 +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 r.walczyna@samsung.com
2020-06-30 16:03:11 +02:00
Mátyás Mustoha
3e866258db
Update NuttX to 9.0 on Travis ( #3958 )
...
Update the Travis builds to use NuttX 9.0, which was
released on April 26, 2020.
JerryScript-DCO-1.0-Signed-off-by: Mátyás Mustoha mmatyas@inf.u-szeged.hu
2020-06-30 15:53:29 +02:00
Ruzsinszki Gábor
ed6689ab8f
Adds support for compiling with MSYS and MINGW under windows ( #3949 )
...
JerryScript-DCO-1.0-Signed-off-by: Ruzsinszki Gábor ruzsinszki.gabor@gmail.com
2020-06-30 14:07:08 +02:00
Zoltan Herczeg
cd949d9d64
Rework flags representing arrow functions and complex arguments ( #3957 )
...
This allows detecting cases which was not possible before.
Fixes #3944
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-06-30 14:00:35 +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
Szilagyi Adam
c0b594fa69
Remove duplicate is_object check when calling ecma_op_to_primtive ( #3899 )
...
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2020-06-30 13:18:40 +02:00
Roland Takacs
034b3b63f5
Correct Object.keys to collect only enumerable property names ( #3952 )
...
In case of Proxy objects, there were no property descriptor checks when
collecting enumerable properties. Therefore, all the non-enumerable
Proxy.target properties were listed as well.
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs@inf.u-szeged.hu
2020-06-30 13:13:18 +02:00
Csaba Osztrogonác
89342ea503
Make test262-es2015 output more verbose ( #3924 )
...
It makes easier to debug unexpected failures on the CI.
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu
2020-06-30 12:47:54 +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 zherczeg.u-szeged@partner.samsung.com
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 zherczeg.u-szeged@partner.samsung.com
2020-06-26 14:47:39 +02:00
Csaba Osztrogonác
264bb210c1
Fix profile file parsing in CMake ( #3932 )
...
Changes:
- Comment can be started anywhere, not only at the beginning of the input.
- The end of the comment isn't the end of the input, but the first newline.
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác oszi@inf.u-szeged.hu
2020-06-26 13:46:08 +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
b7e3baeecb
Support caching of next method in generators. ( #3937 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
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 zherczeg.u-szeged@partner.samsung.com
2020-06-25 17:11:16 +02:00
Péter Gál
c12c60c550
Fix DataView argument handling in case of undefined value ( #3930 )
...
The DataView's third argument incorrectly processed the "undefined"
value resulting in a RangeError.
Fixes : #3927
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
2020-06-25 14:05:08 +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
5d8c5f3e92
Support comma after last argument for function declarations ( #3910 )
...
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2020-06-24 10:41:03 +02:00
Rafal Walczyna
e64fc9aca9
Remove "arguments" and "caller" from specific functions ( #3918 )
...
As stated in ES 16.1, "arguments" and "caller" must not be created in:
- strict functions created using the Function constructor
- generator functions created using the Generator constructor
- async functions created using the AsyncFunction constructor
- functions created using the bind
JerryScript-DCO-1.0-Signed-off-by: Rafal Walczyna r.walczyna@samsung.com
2020-06-22 19:08:13 +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 oszi@inf.u-szeged.hu
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 zherczeg.u-szeged@partner.samsung.com
2020-06-22 13:55:33 +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
kisbg
6a877185fe
Added new target support for dataview object ( #3764 )
...
JerryScript-DCO-1.0-Signed-off-by: bence gabor kis kisbg@inf.u-szeged.hu
2020-06-18 13:53:30 +02:00
Robert Fancsik
fb6ea035d3
Fix signed-off check in tolerant mode ( #3915 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-06-18 13:04:46 +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 aszilagy@inf.u-szeged.hu
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 aszilagy@inf.u-szeged.hu
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 aszilagy@inf.u-szeged.hu
2020-06-18 11:10:06 +02:00
Robert Fancsik
a026a7d713
Fix releasing 'exec' in regexp replace fast path ( #3913 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-06-17 19:24:07 +02:00
Robert Fancsik
e0b2f8e0d8
Extend CI list with Github actions ( #3905 )
...
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2020-06-17 17:19:05 +02:00
Daniella Barsony
5d6467930a
Add custom dispatcher to Set/Map/WeakSet/WeakMap ( #3790 )
...
JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony bella@inf.u-szeged.hu
2020-06-17 16:07:02 +02:00