4449 Commits

Author SHA1 Message Date
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
Péter Gál
499cdea75c
Fix jerry_value_is_{true,false} documentation (#4803)
The API doc for jerry_value_is_{true,false} incorrectly stated
that it is a replacment for the `jerry_value_is_boolean` method.
The `jerry_value_is_true` is the direct replacement of the
`jerry_get_boolean_value` method and the "false" version is a new
method.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
2021-10-26 09:43:51 +02:00
Csaba Osztrogonác
100b6f577e
Test262 exludelist fix after #4721 (#4800)
JerryScript-DCO-1.0-Signed-off-by: Csaba Osztrogonác csaba.osztrogonac@h-lab.eu
2021-10-26 06:45:19 +02:00
ChrisPei
2a4fb19157
Add missing "jerryscript.h" include to esp-idf target (#4759)
JerryScript-DCO-1.0-Signed-off-by: ChrisPei spoppig5@gmail.com
2021-10-21 12:15:44 +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
Mate Dabis
f6eac3afdc
Add notes to jerry_create_undefined, jerry_create_null and jerry_create_boolean (#4790)
JerryScript-DCO-1.0-Signed-off-by: Mate Dabis mdabis@inf.u-szeged.hu
2021-10-11 11:07:55 +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
Zoltan Herczeg
14ff5bfb52
Add property key filters for built-in functions (#4776)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-09-23 14:21:47 +02:00
Zoltan Herczeg
35058cde31
Fix incorrect line info computation (#4775)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-09-22 12:35:24 +02:00
Zoltan Herczeg
ca185acded
Implement built-in flag support for arguments (#4774)
Duplicate check can be removed from property enumeration.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-09-22 11:33:13 +02:00
Zoltan Herczeg
053bfa0f9f
Support resource name and user value for implicit class constructors (#4771)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-09-17 16:28:10 +02:00
Zoltan Herczeg
430289b27d
Fix built-in types (#4772)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-09-17 08:18:28 +02:00
Zoltan Herczeg
77c2602205
Implement import.meta object (#4766)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-09-15 17:44:16 +02:00
Zoltan Herczeg
386ec44d4d
Double the maximum number of object references (#4768)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-09-15 11:08:57 +02:00
Zoltan Herczeg
d08b5be57f
Remove built-in flag from object type (#4763)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-09-13 19:25:22 +02:00
Zoltan Herczeg
723b26392d
Fix property enumeration order of built-in properties (#4761)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-09-13 15:32:14 +02:00
Zoltan Herczeg
2c2539c6b8
Throw SyntaxError when module resolving is failed (#4765)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-09-09 22:11:42 +02:00
Zoltan Herczeg
fea10bb7e3
Add name to the function property names (#4760)
Furthermore prototype should be the first property.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-09-03 12:42:06 +02:00
Zoltan Herczeg
1523ca3b26
Fix prototype of the values returned by Promise.allSettled (#4758)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-09-03 12:15:06 +02:00
Zoltan Herczeg
e1ce7dd727
Fix invalid typed array construction (#4757)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-09-02 12:13:00 +02:00
Zoltan Herczeg
f94a3c80bd
Fix line info computation (#4756)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-09-01 18:39:38 +02:00
Zoltan Herczeg
6649940ea6
Implement function.toString operation (#4752)
May increase the memory consumtpion heavily.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-08-31 13:37:25 +02:00
Péter Gál
1c6b18ecdf
Add missing info in API doc (#4733)
As a few methods were removed and replaced it is a good idea to describe
which method(s) can reproduce the same functionality. In addition add a
bit of extra comments for various methods/structs.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
2021-08-30 17:27:37 +02:00
batizdaniel
bf049fbe2d
Remove redundant checks from builtin-dispatchers (#4741)
We don't need to check arguments length inside the custom dispatchers,
because we have already checked within ecma_bultin_dispatch_routine.

JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
2021-08-30 14:13:31 +02:00
Zoltan Herczeg
8cbe1b59c1
Implement getter function for external string user pointer (#4742)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-08-30 14:04:13 +02:00
Péter Gál
4175037fb0
Disable IRC notification action to have a green master (#4753)
IRC notification GitHub action returns an error at the moment
and makes the master red (even if all builds passed).

Disable this action till we fix the notification.

JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.usz@partner.samsung.com
2021-08-30 13:27:30 +02:00
Gergo Csizi
b4fc591398
Add new test for resource_name (#4737)
JerryScript-DCO-1.0-Signed-off-by: Gergo Csizi csgergo92@gmail.com
2021-08-30 10:04:14 +02:00
Gergo Csizi
5a69b183c3
Rename jerry_string_set_external_string_free_callback (#4743)
jerry_string_set_external_string_free_callback -> jerry_string_set_external_free_callback

JerryScript-DCO-1.0-Signed-off-by: Gergo Csizi csgergo92@gmail.com
2021-08-27 20:02:32 +02:00
Paul Sokolovsky
be910b9867
targets: zephyr: Update for Zephyr 2.x (#4731)
targets: zephyr: Update for Zephyr 2.2

Zephyr 2.2 removed some deprecated compatibility headers, use the new
location.

targets: zephyr: Update for Zephyr 2.3

Rename CONFIG_FLOAT -> CONFIG_FPU based on the change done in Zephyr 2.3.

JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org

targets: zephyr: Update CI and docs for Zephyr 2.6

And to the latest Zephyr SDK 0.13.0. arduino_101 board is no longer
supported by Zephyr 2.x, so replace it with qemu_x86 (i.e. QEMU
emulation target) in CI and with frdm_k64f in docs.

JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky paul.sokolovsky@linaro.org
2021-08-26 14:55:30 +02:00
batizdaniel
3bcd48f72d
Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.

JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
2021-08-17 12:16:58 +02:00
Zoltan Herczeg
e7ffb70ae0
Rework external string free operation (#4690)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-08-17 08:31:30 +02:00
Zoltan Herczeg
74e5ccd434
Improve storing the line info data during parsing (#4735)
JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-08-17 08:29:30 +02:00
Gergo Csizi
fc29019165
Simplify jerry_get_resource_name (#4730)
JerryScript-DCO-1.0-Signed-off-by: Gergo Csizi csgergo92@gmail.com
2021-08-12 17:21:37 +02:00
Zoltan Herczeg
3ed93cfb51
Support parsing of scripts / functions stored in string values (#4728)
Function arguments must be passed as string values.
Snapshots are generated from compiled code rather than source code.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
2021-08-11 17:37:12 +02:00
Gergo Csizi
b7dead7b05
Add guards for SharedArrayBuffer (#4723)
JerryScript-DCO-1.0-Signed-off-by: Gergo Csizi csgergo92@gmail.com
2021-08-10 17:21:06 +02:00
batizdaniel
a25b824509
Implement {Array, %TypedArray%, String}.prototype.at method (#4681)
The following methods were implemented:
- Array.prototype.at based on ECMA-262 Stage 3 Draft Relative Indexing Method proposal
- String.prototype.at based on ECMA-262 Stage 3 Draft Relative Indexing Method proposal
- TypedArray.prototype.at based on ECMA-262 Stage 3 Draft Relative Indexing Method proposal

https://tc39.es/proposal-relative-indexing-method/

JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
2021-08-10 17:19:25 +02:00