Fix array initialization with array holes (#3076)

Fast mode access arrays must be converted back to normal if the array hole count reaches the limit during the initializtaion.
This patch fixes #3075.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2019-09-09 10:36:48 +02:00
committed by GitHub
parent 3111d0e0f2
commit c79659d3b2
4 changed files with 70 additions and 17 deletions
@@ -186,13 +186,6 @@ ecma_fast_array_convert_to_normal (ecma_object_t *object_p) /**< fast access mod
ecma_deref_object (object_p);
} /* ecma_fast_array_convert_to_normal */
/**
* Maximum number of array holes in a fast mode access array.
* If the number of holes exceeds this limit, the array is converted back
* to normal property list based array.
*/
#define ECMA_FAST_ARRAY_MAX_HOLE_COUNT 32
#if ENABLED (JERRY_SYSTEM_ALLOCATOR)
/**
* Maximum length of the array length to allocate fast mode access for it