Commit Graph
10 Commits
Author SHA1 Message Date
Szilagyi Adam 0eae2f6207 Add new check to typedarray copyWithin (#3108)
We should check if the start index is equal or greater than the end index,
if thats the case, we should return with the original typedArray.

Fixes #3107

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi [email protected]
2019-09-17 17:24:47 +02:00
Szilagyi Adam 6e79bb148e Add toLocaleString for TypedArrays (#2987)
The algorithm is based on ECMA-262 v6, 22.2.3.27

Co-authored-by: Tibor Dusnoki [email protected]
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi [email protected]
2019-09-13 13:40:56 +02:00
Szilagyi Adam 24196b69da Add copyWithin and slice function to TypedArray (#2984)
The algorithm's are based on ECMA-262 v6, 22.2.3.5 and 22.2.3.23

Co-authored-by: Tibor Dusnoki [email protected]
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi [email protected]
2019-09-05 02:12:24 +02:00
Szilagyi Adam f0578b2c25 Add indexOf and lastIndexOf function to typedArray (#2938)
The algorithm's are based on ECMA-262 v6, 22.2.3.13, 22.2.3.16

Co-authored-by: Tibor Dusnoki [email protected]
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi [email protected]
2019-08-30 14:01:30 +02:00
Szilagyi Adam 97e348528a New trim helper function (#3014)
Created a new trim helper function which is used in every situation where we need to trim a string

Co-authored-by: Tibor Dusnoki [email protected]
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi [email protected]
2019-08-26 17:30:21 +02:00
Szilagyi Adam ea577d6ed0 Add keys, values, entires functions for typedArray (#2925)
Extended the typedArray functionality based on ES2015

Co-authored-by: Tibor Dusnoki [email protected]
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi [email protected]
2019-07-24 15:48:28 +02:00
Szilagyi Adam 1ea77cc490 Fix buffer-overflow in ecma_op_typedarray_set_with_typedarray (#2922)
Wrong method were used to get the source buffer pointer
Fixes #2851

Co-authored-by: Tibor Dusnoki [email protected]
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi [email protected]
2019-07-01 13:09:39 +02:00
Szilagyi Adam 03202995a0 Add missing release to ecma_op_container_foreach (#2912)
The result of the callback function was not freed
Fixes #2910

Co-authored-by: Tibor Dusnoki [email protected]
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi [email protected]
2019-06-21 19:02:06 +02:00
Szilagyi Adam 7b65167e81 Fix allocation problems when using import and export (#2919)
Construct ecma_string only when there is no parser error using lit_object's index in parser_module_parse_export_caluse and parser_module_parse_import_clause
Fixes #2908

Co-authored-by: Tibor Dusnoki [email protected]
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi [email protected]
2019-06-21 14:21:08 +02:00
Szilagyi Adam 6e9cf4d459 Release operands properly in opfunc_addition (#2909)
Right and left value release wasn't complete
Fixes #2901
Fixes #2902

Co-authored-by: Tibor Dusnoki <[email protected]>
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi [email protected]
2019-06-19 12:29:58 +02:00