Rework Object's [[OwnPropertyKeys]] (#4001)

I've removed the ecma_op_object_get_property_names method, and implemented the following ones:
- ecma_op_object_own_property_keys: this is now the internal [[OwnPropertyKeys]] method
- ecma_op_object_enumerate: this is used for the for-in iterator
- ecma_object_sort_property_names: this is used for sorting the property names of an object
- ecma_object_list_lazy_property_names: this is for getting the lazy instantiated properties
- ecma_object_prop_name_is_duplicated: this is for checking if a given property is duplicated in an object

Also the for-in operation with Proxy object works with this patch, #3992 should be closed

JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
This commit is contained in:
Szilagyi Adam
2020-07-27 11:37:04 +02:00
committed by GitHub
parent 3f0f9589c4
commit ff47c84bc4
34 changed files with 853 additions and 1101 deletions
+15 -65
View File
@@ -511,61 +511,35 @@ ecma_fast_array_set_length (ecma_object_t *object_p, /**< fast access mode array
* @return collection of strings - property names
*/
ecma_collection_t *
ecma_fast_array_get_property_names (ecma_object_t *object_p, /**< fast access mode array object */
uint32_t opts) /**< any combination of ecma_list_properties_options_t values */
ecma_fast_array_object_own_property_keys (ecma_object_t *object_p) /**< fast access mode array object */
{
JERRY_ASSERT (ecma_op_object_is_fast_array (object_p));
ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) object_p;
ecma_collection_t *ret_p = ecma_new_collection ();
#if ENABLED (JERRY_ESNEXT)
if (opts & ECMA_LIST_SYMBOLS_ONLY)
{
return ret_p;
}
#endif /* ENABLED (JERRY_ESNEXT) */
uint32_t length = ext_obj_p->u.array.length;
bool append_length = (!(opts & ECMA_LIST_ENUMERABLE) && !(opts & ECMA_LIST_ARRAY_INDICES));
if (length == 0)
if (length != 0)
{
if (append_length)
ecma_value_t *values_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, object_p->u1.property_list_cp);
for (uint32_t i = 0; i < length; i++)
{
ecma_collection_push_back (ret_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));
if (ecma_is_value_array_hole (values_p[i]))
{
continue;
}
ecma_string_t *index_str_p = ecma_new_ecma_string_from_uint32 (i);
ecma_collection_push_back (ret_p, ecma_make_string_value (index_str_p));
}
return ret_p;
}
ecma_value_t *values_p = ECMA_GET_NON_NULL_POINTER (ecma_value_t, object_p->u1.property_list_cp);
for (uint32_t i = 0; i < length; i++)
{
if (ecma_is_value_array_hole (values_p[i]))
{
continue;
}
ecma_string_t *index_str_p = ecma_new_ecma_string_from_uint32 (i);
ecma_collection_push_back (ret_p, ecma_make_string_value (index_str_p));
}
if (append_length)
{
ecma_collection_push_back (ret_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));
}
if (opts & ECMA_LIST_CONVERT_FAST_ARRAYS)
{
ecma_fast_array_convert_to_normal (object_p);
}
ecma_collection_push_back (ret_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));
return ret_p;
} /* ecma_fast_array_get_property_names */
} /* ecma_fast_array_object_own_property_keys */
/**
* Array object creation operation.
@@ -1240,30 +1214,6 @@ ecma_array_object_to_string (ecma_value_t this_arg) /**< this argument */
return ret_value;
} /* ecma_array_object_to_string */
/**
* List names of a String object's lazy instantiated properties
*
* @return string values collection
*/
void
ecma_op_array_list_lazy_property_names (ecma_object_t *obj_p, /**< a String object */
uint32_t opts, /**< listing options using flags
* from ecma_list_properties_options_t */
ecma_collection_t *main_collection_p, /**< 'main' collection */
ecma_collection_t *non_enum_collection_p) /**< skipped
* 'non-enumerable'
* collection */
{
JERRY_ASSERT (ecma_get_object_type (obj_p) == ECMA_OBJECT_TYPE_ARRAY);
ecma_collection_t *for_non_enumerable_p = (opts & ECMA_LIST_ENUMERABLE) ? non_enum_collection_p : main_collection_p;
if ((opts & ECMA_LIST_ARRAY_INDICES) == 0)
{
ecma_collection_push_back (for_non_enumerable_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));
}
} /* ecma_op_array_list_lazy_property_names */
/**
* @}
* @}
@@ -90,7 +90,7 @@ uint32_t
ecma_delete_fast_array_properties (ecma_object_t *object_p, uint32_t new_length);
ecma_collection_t *
ecma_fast_array_get_property_names (ecma_object_t *object_p, uint32_t opts);
ecma_fast_array_object_own_property_keys (ecma_object_t *object_p);
void
ecma_fast_array_convert_to_normal (ecma_object_t *object_p);
@@ -121,12 +121,6 @@ uint32_t ecma_array_get_length (ecma_object_t *array_p);
ecma_value_t
ecma_array_object_to_string (ecma_value_t this_arg);
void
ecma_op_array_list_lazy_property_names (ecma_object_t *obj_p,
uint32_t opts,
ecma_collection_t *main_collection_p,
ecma_collection_t *non_enum_collection_p);
/**
* @}
* @}
@@ -1747,27 +1747,21 @@ ecma_op_bound_function_try_to_lazy_instantiate_property (ecma_object_t *object_p
*/
void
ecma_op_function_list_lazy_property_names (ecma_object_t *object_p, /**< functionobject */
uint32_t opts, /**< listing options using flags
* from ecma_list_properties_options_t */
ecma_collection_t *main_collection_p, /**< 'main' collection */
ecma_collection_t *non_enum_collection_p) /**< skipped
* 'non-enumerable'
* collection */
ecma_collection_t *prop_names_p, /**< prop name collection */
ecma_property_counter_t *prop_counter_p) /**< prop counter */
{
JERRY_UNUSED (main_collection_p);
ecma_collection_t *for_non_enumerable_p = (opts & ECMA_LIST_ENUMERABLE) ? non_enum_collection_p : main_collection_p;
#if ENABLED (JERRY_ESNEXT)
ecma_extended_object_t *ext_func_p = (ecma_extended_object_t *) object_p;
if (!ECMA_GET_FIRST_BIT_FROM_POINTER_TAG (ext_func_p->u.function.scope_cp))
{
/* Unintialized 'length' property is non-enumerable (ECMA-262 v6, 19.2.4.1) */
ecma_collection_push_back (for_non_enumerable_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));
ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));
prop_counter_p->string_named_props++;
}
#else /* !ENABLED (JERRY_ESNEXT) */
/* 'length' property is non-enumerable (ECMA-262 v5, 13.2.5) */
ecma_collection_push_back (for_non_enumerable_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));
ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));
prop_counter_p->string_named_props++;
#endif /* ENABLED (JERRY_ESNEXT) */
const ecma_compiled_code_t *bytecode_data_p;
@@ -1781,7 +1775,8 @@ ecma_op_function_list_lazy_property_names (ecma_object_t *object_p, /**< functio
#endif /* ENABLED (JERRY_ESNEXT) */
/* 'prototype' property is non-enumerable (ECMA-262 v5, 13.2.18) */
ecma_collection_push_back (for_non_enumerable_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_PROTOTYPE));
ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_PROTOTYPE));
prop_counter_p->string_named_props++;
#if ENABLED (JERRY_ESNEXT)
bool append_caller_and_arguments = !(bytecode_data_p->status_flags & CBC_CODE_FLAGS_STRICT_MODE);
@@ -1792,10 +1787,12 @@ ecma_op_function_list_lazy_property_names (ecma_object_t *object_p, /**< functio
if (append_caller_and_arguments)
{
/* 'caller' property is non-enumerable (ECMA-262 v5, 13.2.5) */
ecma_collection_push_back (for_non_enumerable_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_CALLER));
ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_CALLER));
/* 'arguments' property is non-enumerable (ECMA-262 v5, 13.2.5) */
ecma_collection_push_back (for_non_enumerable_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_ARGUMENTS));
ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_ARGUMENTS));
prop_counter_p->string_named_props += 2;
}
} /* ecma_op_function_list_lazy_property_names */
@@ -1808,16 +1805,9 @@ ecma_op_function_list_lazy_property_names (ecma_object_t *object_p, /**< functio
*/
void
ecma_op_external_function_list_lazy_property_names (ecma_object_t *object_p, /**< function object */
uint32_t opts, /**< listing options using flags
* from ecma_list_properties_options_t */
ecma_collection_t *main_collection_p, /**< 'main' collection */
ecma_collection_t *non_enum_collection_p) /**< skipped
* collection */
ecma_collection_t *prop_names_p, /**< prop name collection */
ecma_property_counter_t *prop_counter_p) /**< prop counter */
{
JERRY_UNUSED (main_collection_p);
ecma_collection_t *for_non_enumerable_p = (opts & ECMA_LIST_ENUMERABLE) ? non_enum_collection_p : main_collection_p;
#if !ENABLED (JERRY_ESNEXT)
JERRY_UNUSED (object_p);
#else /* ENABLED (JERRY_ESNEXT) */
@@ -1825,7 +1815,8 @@ ecma_op_external_function_list_lazy_property_names (ecma_object_t *object_p, /**
#endif /* !ENABLED (JERRY_ESNEXT) */
{
/* 'prototype' property is non-enumerable (ECMA-262 v5, 13.2.18) */
ecma_collection_push_back (for_non_enumerable_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_PROTOTYPE));
ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_PROTOTYPE));
prop_counter_p->string_named_props++;
}
} /* ecma_op_external_function_list_lazy_property_names */
@@ -1838,35 +1829,31 @@ ecma_op_external_function_list_lazy_property_names (ecma_object_t *object_p, /**
*/
void
ecma_op_bound_function_list_lazy_property_names (ecma_object_t *object_p, /**< bound function object*/
uint32_t opts, /**< listing options using flags
* from ecma_list_properties_options_t */
ecma_collection_t *main_collection_p, /**< 'main' collection */
ecma_collection_t *non_enum_collection_p) /**< skipped
* 'non-enumerable'
* collection */
ecma_collection_t *prop_names_p, /**< prop name collection */
ecma_property_counter_t *prop_counter_p) /**< prop counter */
{
JERRY_UNUSED (main_collection_p);
ecma_collection_t *for_non_enumerable_p = (opts & ECMA_LIST_ENUMERABLE) ? non_enum_collection_p : main_collection_p;
#if ENABLED (JERRY_ESNEXT)
/* Unintialized 'length' property is non-enumerable (ECMA-262 v6, 19.2.4.1) */
ecma_bound_function_t *bound_func_p = (ecma_bound_function_t *) object_p;
if (!ECMA_GET_FIRST_BIT_FROM_POINTER_TAG (bound_func_p->header.u.bound_function.target_function))
{
ecma_collection_push_back (for_non_enumerable_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));
ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));
prop_counter_p->string_named_props++;
}
#else /* !ENABLED (JERRY_ESNEXT) */
JERRY_UNUSED (object_p);
/* 'length' property is non-enumerable (ECMA-262 v5, 13.2.5) */
ecma_collection_push_back (for_non_enumerable_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));
ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));
prop_counter_p->string_named_props++;
#endif /* ENABLED (JERRY_ESNEXT) */
/* 'caller' property is non-enumerable (ECMA-262 v5, 13.2.5) */
ecma_collection_push_back (for_non_enumerable_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_CALLER));
ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_CALLER));
/* 'arguments' property is non-enumerable (ECMA-262 v5, 13.2.5) */
ecma_collection_push_back (for_non_enumerable_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_ARGUMENTS));
ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_ARGUMENTS));
prop_counter_p->string_named_props += 2;
} /* ecma_op_bound_function_list_lazy_property_names */
/**
@@ -89,21 +89,18 @@ ecma_op_bound_function_try_to_lazy_instantiate_property (ecma_object_t *object_p
void
ecma_op_function_list_lazy_property_names (ecma_object_t *object_p,
uint32_t opts,
ecma_collection_t *main_collection_p,
ecma_collection_t *non_enum_collection_p);
ecma_collection_t *prop_names_p,
ecma_property_counter_t *prop_counter_p);
void
ecma_op_external_function_list_lazy_property_names (ecma_object_t *object_p,
uint32_t opts,
ecma_collection_t *main_collection_p,
ecma_collection_t *non_enum_collection_p);
ecma_collection_t *prop_names_p,
ecma_property_counter_t *prop_counter_p);
void
ecma_op_bound_function_list_lazy_property_names (ecma_object_t *object_p,
uint32_t opts,
ecma_collection_t *main_collection_p,
ecma_collection_t *non_enum_collection_p);
ecma_collection_t *prop_names_p,
ecma_property_counter_t *prop_counter_p);
/**
* @}
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -67,9 +67,10 @@ ecma_value_t ecma_op_object_get_own_property_descriptor (ecma_object_t *object_p
ecma_property_descriptor_t *prop_desc_p);
ecma_value_t ecma_op_object_has_instance (ecma_object_t *obj_p, ecma_value_t value);
ecma_value_t ecma_op_object_is_prototype_of (ecma_object_t *base_p, ecma_object_t *target_p);
ecma_collection_t * ecma_op_object_get_property_names (ecma_object_t *obj_p, uint32_t opts);
ecma_collection_t * ecma_op_object_get_enumerable_property_names (ecma_object_t *obj_p,
ecma_enumerable_property_names_options_t option);
ecma_collection_t *ecma_op_object_own_property_keys (ecma_object_t *obj_p);
ecma_collection_t *ecma_op_object_enumerate (ecma_object_t *obj_p);
lit_magic_string_id_t ecma_object_get_class_name (ecma_object_t *obj_p);
bool ecma_object_class_is (ecma_object_t *object_p, uint32_t class_id);
+22 -36
View File
@@ -1396,25 +1396,6 @@ ecma_proxy_object_delete_property (ecma_object_t *obj_p, /**< proxy object */
return ret_value;
} /* ecma_proxy_object_delete_property */
/**
* The Proxy object [[Enumerate]] internal routine
*
* See also:
* ECMAScript v6, 9.5.11
*
* Note: Returned value must be freed with ecma_free_value.
*
* @return ECMA_VALUE_ERROR - if the operation fails
* ecma-object - otherwise
*/
ecma_value_t
ecma_proxy_object_enumerate (ecma_object_t *obj_p) /**< proxy object */
{
JERRY_ASSERT (ECMA_OBJECT_IS_PROXY (obj_p));
JERRY_UNUSED (obj_p);
return ecma_raise_type_error (ECMA_ERR_MSG ("UNIMPLEMENTED: Proxy.[[Enumerate]]"));
} /* ecma_proxy_object_enumerate */
/**
* Helper method for the Proxy object [[OwnPropertyKeys]] operation
*
@@ -1532,7 +1513,7 @@ ecma_proxy_check_invariants_for_own_prop_keys (ecma_collection_t *trap_result,
* The Proxy object [[OwnPropertyKeys]] internal routine
*
* See also:
* ECMAScript v6, 9.5.12
* ECMAScript v11, 9.5.11
*
* Note: If the returned collection is not NULL, it must be freed with
* ecma_collection_free if it is no longer needed
@@ -1553,7 +1534,6 @@ ecma_proxy_object_own_property_keys (ecma_object_t *obj_p) /**< proxy object */
/* 2-5. */
ecma_value_t trap = ecma_validate_proxy_object (handler, LIT_MAGIC_STRING_OWN_KEYS_UL);
/* 6. */
if (ECMA_IS_VALUE_ERROR (trap))
{
return NULL;
@@ -1562,15 +1542,15 @@ ecma_proxy_object_own_property_keys (ecma_object_t *obj_p) /**< proxy object */
ecma_value_t target = proxy_obj_p->target;
ecma_object_t *target_obj_p = ecma_get_object_from_value (target);
/* 7. */
/* 6. */
if (ecma_is_value_undefined (trap))
{
return ecma_op_object_get_property_names (target_obj_p, ECMA_LIST_SYMBOLS);
return ecma_op_object_own_property_keys (target_obj_p);
}
ecma_object_t *func_obj_p = ecma_get_object_from_value (trap);
/* 8. */
/* 7. */
ecma_value_t trap_result_array = ecma_op_function_call (func_obj_p, handler, &target, 1);
ecma_deref_object (func_obj_p);
@@ -1580,46 +1560,51 @@ ecma_proxy_object_own_property_keys (ecma_object_t *obj_p) /**< proxy object */
return NULL;
}
/* 9. */
/* 8. */
ecma_collection_t *trap_result = ecma_op_create_list_from_array_like (trap_result_array, true);
ecma_free_value (trap_result_array);
/* 10. */
if (trap_result == NULL)
{
return trap_result;
}
/* 11. */
/* 9. */
if (ecma_collection_check_duplicated_entries (trap_result))
{
ecma_collection_free (trap_result);
ecma_raise_type_error (ECMA_ERR_MSG ("Trap returned duplicate entries"));
return NULL;
}
/* 10. */
ecma_value_t extensible_target = ecma_builtin_object_object_is_extensible (target_obj_p);
/* 12. */
if (ECMA_IS_VALUE_ERROR (extensible_target))
{
ecma_collection_free (trap_result);
return NULL;
}
/* 13. */
ecma_collection_t *target_keys = ecma_op_object_get_property_names (target_obj_p, ECMA_LIST_SYMBOLS);
/* 11. */
ecma_collection_t *target_keys = ecma_op_object_own_property_keys (target_obj_p);
/* 14. */
if (target_keys == NULL)
{
ecma_collection_free (trap_result);
return target_keys;
}
/* 16. */
/* 14. */
ecma_collection_t *target_configurable_keys = ecma_new_collection ();
/* 17. */
/* 15. */
ecma_collection_t *target_non_configurable_keys = ecma_new_collection ();
ecma_collection_t *ret_value = NULL;
/* 18. */
/* 16. */
for (uint32_t i = 0; i < target_keys->item_count; i++)
{
ecma_property_descriptor_t target_desc;
@@ -1654,12 +1639,12 @@ ecma_proxy_object_own_property_keys (ecma_object_t *obj_p) /**< proxy object */
}
}
/* 19. */
/* 17. */
if (ecma_is_value_true (extensible_target) && target_non_configurable_keys->item_count == 0)
{
ret_value = trap_result;
}
/* 20-25. */
/* 18-22. */
else if (ecma_proxy_check_invariants_for_own_prop_keys (trap_result,
target_non_configurable_keys,
target_configurable_keys,
@@ -1678,6 +1663,7 @@ free_target_collections:
ecma_collection_free (target_configurable_keys);
ecma_collection_free (target_non_configurable_keys);
/* 23. */
return ret_value;
} /* ecma_proxy_object_own_property_keys */
@@ -92,9 +92,6 @@ ecma_value_t
ecma_proxy_object_delete_property (ecma_object_t *obj_p,
ecma_string_t *prop_name_p);
ecma_value_t
ecma_proxy_object_enumerate (ecma_object_t *obj_p);
ecma_collection_t *
ecma_proxy_object_own_property_keys (ecma_object_t *obj_p);
@@ -84,19 +84,11 @@ ecma_op_create_string_object (const ecma_value_t *arguments_list_p, /**< list of
*/
void
ecma_op_string_list_lazy_property_names (ecma_object_t *obj_p, /**< a String object */
uint32_t opts, /**< listing options using flags
* from ecma_list_properties_options_t */
ecma_collection_t *main_collection_p, /**< 'main' collection */
ecma_collection_t *non_enum_collection_p) /**< skipped
* 'non-enumerable'
* collection */
ecma_collection_t *prop_names_p, /**< prop name collection */
ecma_property_counter_t *prop_counter_p) /**< prop counter */
{
JERRY_ASSERT (ecma_get_object_type (obj_p) == ECMA_OBJECT_TYPE_CLASS);
ecma_collection_t *for_enumerable_p = main_collection_p;
ecma_collection_t *for_non_enumerable_p = (opts & ECMA_LIST_ENUMERABLE) ? non_enum_collection_p : main_collection_p;
ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) obj_p;
JERRY_ASSERT (ext_object_p->u.class_prop.class_id == LIT_MAGIC_STRING_STRING_UL);
@@ -109,13 +101,13 @@ ecma_op_string_list_lazy_property_names (ecma_object_t *obj_p, /**< a String obj
ecma_string_t *name_p = ecma_new_ecma_string_from_uint32 (i);
/* the properties are enumerable (ECMA-262 v5, 15.5.5.2.9) */
ecma_collection_push_back (for_enumerable_p, ecma_make_string_value (name_p));
ecma_collection_push_back (prop_names_p, ecma_make_string_value (name_p));
}
if ((opts & ECMA_LIST_ARRAY_INDICES) == 0)
{
ecma_collection_push_back (for_non_enumerable_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));
}
prop_counter_p->array_index_named_props += length;
ecma_collection_push_back (prop_names_p, ecma_make_magic_string_value (LIT_MAGIC_STRING_LENGTH));
prop_counter_p->string_named_props++;
} /* ecma_op_string_list_lazy_property_names */
/**
@@ -30,9 +30,8 @@ ecma_op_create_string_object (const ecma_value_t *arguments_list_p, uint32_t arg
void
ecma_op_string_list_lazy_property_names (ecma_object_t *obj_p,
uint32_t opts,
ecma_collection_t *main_collection_p,
ecma_collection_t *non_enum_collection_p);
ecma_collection_t *prop_names_p,
ecma_property_counter_t *prop_counter_p);
/**
* @}
@@ -1300,7 +1300,8 @@ ecma_is_typedarray (ecma_value_t value) /**< the target need to be checked */
*/
void
ecma_op_typedarray_list_lazy_property_names (ecma_object_t *obj_p, /**< a TypedArray object */
ecma_collection_t *main_collection_p) /**< 'main' collection */
ecma_collection_t *prop_names_p, /**< prop name collection */
ecma_property_counter_t *prop_counter_p) /**< prop counter */
{
JERRY_ASSERT (ecma_object_is_typedarray (obj_p));
@@ -1309,9 +1310,10 @@ ecma_op_typedarray_list_lazy_property_names (ecma_object_t *obj_p, /**< a TypedA
for (uint32_t i = 0; i < array_length; i++)
{
ecma_string_t *name_p = ecma_new_ecma_string_from_uint32 (i);
ecma_collection_push_back (main_collection_p, ecma_make_string_value (name_p));
ecma_collection_push_back (prop_names_p, ecma_make_string_value (name_p));
}
prop_counter_p->array_index_named_props += array_length;
} /* ecma_op_typedarray_list_lazy_property_names */
/**
@@ -64,7 +64,8 @@ ecma_typedarray_iterators_helper (ecma_value_t this_arg, ecma_iterator_kind_t ki
bool ecma_object_is_typedarray (ecma_object_t *obj_p);
bool ecma_is_typedarray (ecma_value_t target);
void ecma_op_typedarray_list_lazy_property_names (ecma_object_t *obj_p,
ecma_collection_t *main_collection_p);
ecma_collection_t *prop_names_p,
ecma_property_counter_t *prop_counter_p);
bool ecma_op_typedarray_define_index_prop (ecma_object_t *obj_p,
uint32_t index,
const ecma_property_descriptor_t *property_desc_p);