Cleanup toNumber and toNumeric abstract operations (#4034)

JerryScript-DCO-1.0-Signed-off-by: Virag Orkenyi orkvi@inf.u-szeged.hu
This commit is contained in:
Virag Orkenyi
2020-08-27 13:32:30 +02:00
committed by GitHub
parent a6cd19fa6e
commit 777b7e9c87
22 changed files with 109 additions and 156 deletions
@@ -119,16 +119,12 @@ ecma_op_create_arraybuffer_object (const ecma_value_t *arguments_list_p, /**< li
}
else
{
ecma_value_t to_number_value = ecma_op_to_number (arguments_list_p[0], ECMA_TO_NUMERIC_NO_OPTS);
ecma_value_t to_number_value = ecma_op_to_number (arguments_list_p[0], &length_num);
if (ECMA_IS_VALUE_ERROR (to_number_value))
{
return to_number_value;
}
length_num = ecma_get_number_from_value (to_number_value);
ecma_free_value (to_number_value);
}
if (ecma_number_is_nan (length_num))