Introduce ecma_op_object_get_length and ecma_op_object_get_by_index operations (#3245)
These two functions helps to reduce code duplication, also invokes the elimination of several ECMA_TRY_CATCH macros. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
@@ -129,7 +129,7 @@ ecma_op_container_create (const ecma_value_t *arguments_list_p, /**< arguments l
|
||||
|
||||
ecma_object_t *next_object_p = ecma_get_object_from_value (next_value);
|
||||
|
||||
ecma_value_t key = ecma_op_object_get (next_object_p, ecma_new_ecma_string_from_uint32 (0));
|
||||
ecma_value_t key = ecma_op_object_get_by_uint32_index (next_object_p, 0);
|
||||
|
||||
if (ECMA_IS_VALUE_ERROR (key))
|
||||
{
|
||||
@@ -141,7 +141,7 @@ ecma_op_container_create (const ecma_value_t *arguments_list_p, /**< arguments l
|
||||
return key;
|
||||
}
|
||||
|
||||
ecma_value_t value = ecma_op_object_get (next_object_p, ecma_new_ecma_string_from_uint32 (1));
|
||||
ecma_value_t value = ecma_op_object_get_by_uint32_index (next_object_p, 1);
|
||||
|
||||
if (ECMA_IS_VALUE_ERROR (value))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user