12 Commits

Author SHA1 Message Date
Robert Fancsik
fc30f003ba Rework ecma collection (#3086)
After this patch the ecma value collection is a resizable buffer of ecma-values where the adjacent elements are allocated next to each other.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-09-12 13:05:24 +02:00
Robert Fancsik
c04fe24253
Ensure that Map/Set object keys can always have MAP_KEY_STRING internal property (#3065)
This patch fixes #3062.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-09-09 10:38:22 +02:00
Robert Fancsik
3111d0e0f2
Fix the internal object reference count in Map/Set.prototype.forEach (#3081)
This patch fixes #3079.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-09-09 10:36:33 +02:00
Robert Fancsik
1088273bc3 Prevent fast access mode arrays from low-level property management methods (#3047)
This patch fixes #3043 and fixes #3045 and fixes #3046.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-09-04 10:41:29 +02:00
Daniel Balla
14e4476084 Don't use ecma_create_named_data_property in fast mode arrays (#3042)
Remove invalid use of named data properties in fast mode arrays.
Fixes #3040

JerryScript-DCO-1.0-Signed-off-by: Daniel Balla dballa@inf.u-szeged.hu
2019-09-03 19:43:41 +02:00
Robert Fancsik
c6a4a86257
Improve ecma_string_t descriptor (#3016)
This patch introduces several changes conntect to ecma-strings:
 - Extend the size of the reference counter to 28 bytes from 13
 - Extend the size of the string hash to 32 bytes from 16 to use the extact FNV-1a hash
 - Introduce ECMA_STATIC_STRING_FLAG to reduce the number of string ref/derefs for static strings.
 - Introduce ECMA_STRING_CONTAINER_ASCII_STRING to store run-time allocated ASCII strings more efficiently
 - Remove ECMA_STRING_CONTAINER_LIT_NUMBER to half the storage size of the parsing time allocated floating point numbers
 - Rework the global number storage, to store only the floating point numbers
 - Optimize the lookup in the global number/string/symbol tables via reduce the number of NULL checks during decompressing the next element pointers
 - Reduce the code duplication in ecma_concat_ecma_strings and ecma_append_chars_to_string
 - Improve ecma_string_get_char with optional arguments to make it more reusable.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-08-30 15:16:27 +02:00
Robert Fancsik
3f47e1b0aa Container object's internal object must be allocated firstly (#2961)
This patch slightly reworks the container objects internal objects allocation.
This rework allows the same lifetime of the objects without the manual allocation/deallocation of the internal object.

This patch also fixes #2951.

Co-authored-by: Dániel Bátyai <dbatyai@inf.u-szeged.hu>
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-07-11 12:32:17 +02:00
Robert Fancsik
a3cd2d7ff6 This argument must be pseudo-array in {Map/Set}Iterator.prototype.next routine (#2960)
This patch fixes #2950.

Co-authored-by: Gabor Loki loki@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-07-11 11:33:17 +02:00
Akos Kiss
de71fe4f71
Fix implicit integer conversion reported by Clang 8 (#2928)
JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
2019-06-27 09:53:00 +02:00
Robert Fancsik
9d4c2315f3 Implement the Map/Set iterator operations (#2882)
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-06-24 11:18:37 +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 tdusnoki@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
2019-06-21 19:02:06 +02:00
Robert Fancsik
4331e39b9a
Implement the Set builtin object (#2841)
Also implement the missing iterator initializer part from the Map builtin object constructor.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
2019-05-10 20:28:43 +02:00