Improve the construction of "length" built-in strings.

The "length" property name is the most frequently used built-in string
and also frequently created by various hot-paths. New functions are
added to improve the speed of the "length" string creation.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2016-07-13 04:50:47 -07:00
parent b4bba2ef70
commit 6f1ce8d6bb
17 changed files with 131 additions and 84 deletions
@@ -1199,7 +1199,7 @@ re_set_result_array_properties (ecma_object_t *array_obj_p, /**< result array */
ecma_deref_ecma_string (result_prop_str_p);
/* Set length property of the result array */
result_prop_str_p = ecma_get_magic_string (LIT_MAGIC_STRING_LENGTH);
result_prop_str_p = ecma_new_ecma_length_string ();
{
ecma_property_descriptor_t array_item_prop_desc = ecma_make_empty_property_descriptor ();
array_item_prop_desc.is_value_defined = true;