Change array length into a virtual property. (#1439)

This change allows easier access to array length which improves
the performance of inserting new items into an array and there
is no need to allocate length strings anymore. The trade-of is
that array length cannot be cached anymore.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2016-11-22 13:29:53 +01:00
committed by GitHub
parent 4a0f78bc4b
commit 132477f7d5
8 changed files with 236 additions and 152 deletions
@@ -48,6 +48,10 @@ ecma_op_array_object_set_length (ecma_object_t *, ecma_value_t, uint32_t);
extern ecma_value_t
ecma_op_array_object_define_own_property (ecma_object_t *, ecma_string_t *, const ecma_property_descriptor_t *, bool);
extern void
ecma_op_array_list_lazy_property_names (ecma_object_t *, bool,
ecma_collection_header_t *, ecma_collection_header_t *);
/**
* @}
* @}