Remove the usage of ecma_length_t (#4009)

Now the following conventions are applied:
 - passing the number of arguments for a function call is always uint32_t
 - string size/length/position related operation should use lit_utf8_size_t
 - Extended objects internal fields must be uint32_t

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2020-07-20 16:36:27 +02:00
committed by GitHub
parent 321215fdbb
commit 39cb67397d
110 changed files with 417 additions and 415 deletions
@@ -218,7 +218,7 @@ ecma_builtin_array_prototype_object_to_locale_string (ecma_object_t *obj_p, /**<
*/
static ecma_value_t
ecma_builtin_array_prototype_object_concat (const ecma_value_t args[], /**< arguments list */
ecma_length_t args_number, /**< number of arguments */
uint32_t args_number, /**< number of arguments */
ecma_object_t *obj_p) /**< array object */
{
/* 2. */
@@ -472,7 +472,7 @@ ecma_builtin_array_prototype_object_pop (ecma_object_t *obj_p, /**< array object
*/
static ecma_value_t
ecma_builtin_array_prototype_object_push (const ecma_value_t *argument_list_p, /**< arguments list */
ecma_length_t arguments_number, /**< number of arguments */
uint32_t arguments_number, /**< number of arguments */
ecma_object_t *obj_p, /**< array object */
uint32_t length) /**< array object's length */
{
@@ -1259,7 +1259,7 @@ clean_up:
*/
static ecma_value_t
ecma_builtin_array_prototype_object_splice (const ecma_value_t args[], /**< arguments list */
ecma_length_t args_number, /**< number of arguments */
uint32_t args_number, /**< number of arguments */
ecma_object_t *obj_p, /**< array object */
uint32_t len) /**< array object's length */
{
@@ -1380,11 +1380,11 @@ ecma_builtin_array_prototype_object_splice (const ecma_value_t args[], /**< argu
#endif /* ENABLED (JERRY_ESNEXT) */
/* 11. */
ecma_length_t item_count;
uint32_t item_count;
if (args_number > 2)
{
item_count = (ecma_length_t) (args_number - 2);
item_count = (uint32_t) (args_number - 2);
}
else
{
@@ -1489,8 +1489,8 @@ ecma_builtin_array_prototype_object_splice (const ecma_value_t args[], /**< argu
}
/* 15. */
ecma_length_t idx = 0;
for (ecma_length_t arg_index = 2; arg_index < args_number; arg_index++, idx++)
uint32_t idx = 0;
for (uint32_t arg_index = 2; arg_index < args_number; arg_index++, idx++)
{
ecma_value_t put_value = ecma_op_object_put_by_uint32_index (obj_p,
(uint32_t) (start + idx),
@@ -1527,7 +1527,7 @@ ecma_builtin_array_prototype_object_splice (const ecma_value_t args[], /**< argu
*/
static ecma_value_t
ecma_builtin_array_prototype_object_unshift (const ecma_value_t args[], /**< arguments list */
ecma_length_t args_number, /**< number of arguments */
uint32_t args_number, /**< number of arguments */
ecma_object_t *obj_p, /**< array object */
uint32_t len) /**< array object's length */
{
@@ -1635,7 +1635,7 @@ ecma_builtin_array_prototype_object_unshift (const ecma_value_t args[], /**< arg
*/
static ecma_value_t
ecma_builtin_array_prototype_object_index_of (const ecma_value_t args[], /**< arguments list */
ecma_length_t args_number, /**< number of arguments */
uint32_t args_number, /**< number of arguments */
ecma_object_t *obj_p, /**< array object */
uint32_t len) /**< array object's length */
{
@@ -1740,7 +1740,7 @@ ecma_builtin_array_prototype_object_index_of (const ecma_value_t args[], /**< ar
*/
static ecma_value_t
ecma_builtin_array_prototype_object_last_index_of (const ecma_value_t args[], /**< arguments list */
ecma_length_t args_number, /**< number of arguments */
uint32_t args_number, /**< number of arguments */
ecma_object_t *obj_p, /**< array object */
uint32_t len) /**< array object's length */
{
@@ -2142,7 +2142,7 @@ ecma_builtin_array_prototype_object_filter (ecma_value_t arg1, /**< callbackfn *
*/
static ecma_value_t
ecma_builtin_array_reduce_from (const ecma_value_t args_p[], /**< routine's arguments */
ecma_length_t args_number, /**< arguments list length */
uint32_t args_number, /**< arguments list length */
bool start_from_left, /**< whether the reduce starts from left or right */
ecma_object_t *obj_p, /**< array object */
uint32_t len) /**< array object's length */
@@ -2436,7 +2436,7 @@ ecma_builtin_array_prototype_object_find (ecma_value_t predicate, /**< callback
*/
static ecma_value_t
ecma_builtin_array_prototype_object_copy_within (const ecma_value_t args[], /**< arguments list */
ecma_length_t args_number, /**< number of arguments */
uint32_t args_number, /**< number of arguments */
ecma_object_t *obj_p, /**< array object */
uint32_t len) /**< array object's length */
{
@@ -2592,7 +2592,7 @@ ecma_builtin_array_prototype_object_copy_within (const ecma_value_t args[], /**<
*/
static ecma_value_t
ecma_builtin_array_prototype_includes (const ecma_value_t args[], /**< arguments list */
ecma_length_t args_number, /**< number of arguments */
uint32_t args_number, /**< number of arguments */
ecma_object_t *obj_p, /**< array object */
uint32_t len) /**< array object's length */
{
@@ -2678,7 +2678,7 @@ ecma_builtin_array_prototype_dispatch_routine (uint16_t builtin_routine_id, /**<
ecma_value_t this_arg, /**< 'this' argument value */
const ecma_value_t arguments_list_p[], /**< list of arguments
* passed to routine */
ecma_length_t arguments_number) /**< length of arguments' list */
uint32_t arguments_number) /**< length of arguments' list */
{
ecma_value_t obj_this = ecma_op_to_object (this_arg);
@@ -78,7 +78,7 @@ ecma_builtin_array_object_is_array (ecma_value_t this_arg, /**< 'this' argument
static ecma_value_t
ecma_builtin_array_object_from (ecma_value_t this_arg, /**< 'this' argument */
const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
/* 1. */
ecma_value_t constructor = this_arg;
@@ -408,7 +408,7 @@ cleanup:
static ecma_value_t
ecma_builtin_array_object_of (ecma_value_t this_arg, /**< 'this' argument */
const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
if (!ecma_is_constructor (this_arg))
{
@@ -485,7 +485,7 @@ ecma_builtin_array_species_get (ecma_value_t this_value) /**< This Value */
*/
ecma_value_t
ecma_builtin_array_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -499,7 +499,7 @@ ecma_builtin_array_dispatch_call (const ecma_value_t *arguments_list_p, /**< arg
*/
ecma_value_t
ecma_builtin_array_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -65,7 +65,7 @@ ecma_builtin_arraybuffer_prototype_bytelength_getter (ecma_value_t this_arg) /**
{
return ecma_raise_type_error (ECMA_ERR_MSG ("ArrayBuffer has been detached."));
}
ecma_length_t len = ecma_arraybuffer_get_length (object_p);
uint32_t len = ecma_arraybuffer_get_length (object_p);
return ecma_make_uint32_value (len);
}
@@ -105,9 +105,9 @@ ecma_builtin_arraybuffer_prototype_object_slice (ecma_value_t this_arg, /**< thi
return ecma_raise_type_error (ECMA_ERR_MSG ("ArrayBuffer has been detached."));
}
ecma_length_t len = ecma_arraybuffer_get_length (object_p);
uint32_t len = ecma_arraybuffer_get_length (object_p);
ecma_length_t start = 0, end = len;
uint32_t start = 0, end = len;
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
@@ -134,7 +134,7 @@ ecma_builtin_arraybuffer_prototype_object_slice (ecma_value_t this_arg, /**< thi
}
JERRY_ASSERT (start <= len && end <= len);
ecma_length_t new_len = (end >= start) ? (end - start) : 0;
uint32_t new_len = (end >= start) ? (end - start) : 0;
ecma_object_t *new_arraybuffer_p = ecma_arraybuffer_new_object (new_len);
lit_utf8_byte_t *old_buf = ecma_arraybuffer_get_buffer (object_p);
lit_utf8_byte_t *new_buf = ecma_arraybuffer_get_buffer (new_arraybuffer_p);
@@ -72,7 +72,7 @@ ecma_builtin_arraybuffer_object_is_view (ecma_value_t this_arg, /**< 'this' argu
*/
ecma_value_t
ecma_builtin_arraybuffer_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -86,7 +86,7 @@ ecma_builtin_arraybuffer_dispatch_call (const ecma_value_t *arguments_list_p, /*
*/
ecma_value_t
ecma_builtin_arraybuffer_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -43,7 +43,7 @@
*/
ecma_value_t
ecma_builtin_async_function_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -60,7 +60,7 @@ ecma_builtin_async_function_dispatch_call (const ecma_value_t *arguments_list_p,
*/
ecma_value_t
ecma_builtin_async_function_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_builtin_async_function_dispatch_call (arguments_list_p, arguments_list_len);
} /* ecma_builtin_async_function_dispatch_construct */
@@ -43,7 +43,7 @@
*/
ecma_value_t
ecma_builtin_async_generator_function_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -60,7 +60,7 @@ ecma_builtin_async_generator_function_dispatch_call (const ecma_value_t *argumen
*/
ecma_value_t
ecma_builtin_async_generator_function_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_builtin_async_generator_function_dispatch_call (arguments_list_p, arguments_list_len);
} /* ecma_builtin_async_generator_function_dispatch_construct */
@@ -91,8 +91,8 @@ ecma_builtin_async_generator_prototype_dispatch_routine (uint16_t builtin_routin
const ecma_value_t arguments_list_p[], /**< list of arguments
* passed to
* routine */
ecma_length_t arguments_number) /**< length of arguments'
* list */
uint32_t arguments_number) /**< length of arguments'
* list */
{
JERRY_UNUSED (arguments_number);
@@ -51,7 +51,7 @@
*/
ecma_value_t
ecma_builtin_boolean_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -76,7 +76,7 @@ ecma_builtin_boolean_dispatch_call (const ecma_value_t *arguments_list_p, /**< a
*/
ecma_value_t
ecma_builtin_boolean_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -142,7 +142,7 @@ ecma_builtin_dataview_prototype_dispatch_routine (uint16_t builtin_routine_id, /
ecma_value_t this_arg, /**< 'this' argument value */
const ecma_value_t arguments_list_p[], /**< list of arguments
* passed to routine */
ecma_length_t arguments_number) /**< length of arguments' list */
uint32_t arguments_number) /**< length of arguments' list */
{
ecma_value_t byte_offset = arguments_number > 0 ? arguments_list_p[0] : ECMA_VALUE_UNDEFINED;
@@ -43,7 +43,7 @@
*/
ecma_value_t
ecma_builtin_dataview_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -57,7 +57,7 @@ ecma_builtin_dataview_dispatch_call (const ecma_value_t *arguments_list_p, /**<
*/
ecma_value_t
ecma_builtin_dataview_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_op_dataview_create (arguments_list_p, arguments_list_len);
} /* ecma_builtin_dataview_dispatch_construct */
@@ -340,10 +340,10 @@ ecma_builtin_date_prototype_dispatch_set (uint16_t builtin_routine_id, /**< buil
ecma_number_t date_num, /**< date converted to number */
const ecma_value_t arguments_list[], /**< list of arguments
* passed to routine */
ecma_length_t arguments_number) /**< length of arguments' list */
uint32_t arguments_number) /**< length of arguments' list */
{
ecma_number_t converted_number[4];
ecma_length_t conversions = 0;
uint32_t conversions = 0;
/* If the first argument is not specified, it is always converted to NaN. */
converted_number[0] = ecma_number_make_nan ();
@@ -392,7 +392,7 @@ ecma_builtin_date_prototype_dispatch_set (uint16_t builtin_routine_id, /**< buil
conversions = arguments_number;
}
for (ecma_length_t i = 0; i < conversions; i++)
for (uint32_t i = 0; i < conversions; i++)
{
ecma_value_t value = ecma_op_to_number (arguments_list[i]);
@@ -591,7 +591,7 @@ ecma_builtin_date_prototype_dispatch_routine (uint16_t builtin_routine_id, /**<
ecma_value_t this_arg, /**< 'this' argument value */
const ecma_value_t arguments_list[], /**< list of arguments
* passed to routine */
ecma_length_t arguments_number) /**< length of arguments' list */
uint32_t arguments_number) /**< length of arguments' list */
{
if (JERRY_UNLIKELY (builtin_routine_id == ECMA_DATE_PROTOTYPE_TO_JSON))
{
@@ -195,7 +195,7 @@ ecma_date_parse_month_name (const lit_utf8_byte_t **str_p, /**< pointer to the c
*/
static ecma_value_t
ecma_date_construct_helper (const ecma_value_t *args, /**< arguments passed to the Date constructor */
ecma_length_t args_len) /**< number of arguments */
uint32_t args_len) /**< number of arguments */
{
ecma_number_t date_nums[7] =
{
@@ -301,8 +301,8 @@ ecma_builtin_date_parse_ISO_string_format (const lit_utf8_byte_t *date_str_curr_
ecma_number_t seconds = ECMA_NUMBER_ZERO;
ecma_number_t milliseconds = ECMA_NUMBER_ZERO;
ecma_length_t remaining_length = lit_utf8_string_length (date_str_curr_p,
(lit_utf8_size_t) (date_str_end_p - date_str_curr_p));
lit_utf8_size_t remaining_length = lit_utf8_string_length (date_str_curr_p,
(lit_utf8_size_t) (date_str_end_p - date_str_curr_p));
if (remaining_length >= 5)
{
@@ -613,7 +613,7 @@ ecma_builtin_date_parse (ecma_value_t this_arg, /**< this argument */
static ecma_value_t
ecma_builtin_date_utc (ecma_value_t this_arg, /**< this argument */
const ecma_value_t args[], /**< arguments list */
ecma_length_t args_number) /**< number of arguments */
uint32_t args_number) /**< number of arguments */
{
JERRY_UNUSED (this_arg);
@@ -677,7 +677,7 @@ ecma_builtin_date_now (ecma_value_t this_arg) /**< this argument */
*/
ecma_value_t
ecma_builtin_date_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_UNUSED (arguments_list_p);
JERRY_UNUSED (arguments_list_len);
@@ -698,7 +698,7 @@ ecma_builtin_date_dispatch_call (const ecma_value_t *arguments_list_p, /**< argu
*/
ecma_value_t
ecma_builtin_date_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
#if ENABLED (JERRY_ESNEXT)
JERRY_ASSERT (JERRY_CONTEXT (current_new_target));
@@ -49,7 +49,7 @@
*/
ecma_value_t
ecma_builtin_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_builtin_helper_error_dispatch_call (ECMA_ERROR_COMMON, arguments_list_p, arguments_list_len);
} /* ecma_builtin_error_dispatch_call */
@@ -61,7 +61,7 @@ ecma_builtin_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arg
*/
ecma_value_t
ecma_builtin_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_builtin_error_dispatch_call (arguments_list_p, arguments_list_len);
} /* ecma_builtin_error_dispatch_construct */
@@ -51,7 +51,7 @@
*/
ecma_value_t
ecma_builtin_eval_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_builtin_helper_error_dispatch_call (ECMA_ERROR_EVAL, arguments_list_p, arguments_list_len);
} /* ecma_builtin_eval_error_dispatch_call */
@@ -63,7 +63,7 @@ ecma_builtin_eval_error_dispatch_call (const ecma_value_t *arguments_list_p, /**
*/
ecma_value_t
ecma_builtin_eval_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_builtin_eval_error_dispatch_call (arguments_list_p, arguments_list_len);
} /* ecma_builtin_eval_error_dispatch_construct */
@@ -177,7 +177,7 @@ ecma_builtin_function_prototype_object_apply (ecma_object_t *func_obj_p, /**< th
static ecma_value_t
ecma_builtin_function_prototype_object_call (ecma_object_t *func_obj_p , /**< this argument object */
const ecma_value_t *arguments_list_p, /**< list of arguments */
ecma_length_t arguments_number) /**< number of arguments */
uint32_t arguments_number) /**< number of arguments */
{
if (arguments_number == 0)
{
@@ -191,7 +191,7 @@ ecma_builtin_function_prototype_object_call (ecma_object_t *func_obj_p , /**< th
return ecma_op_function_call (func_obj_p,
arguments_list_p[0],
arguments_list_p + 1,
(ecma_length_t) (arguments_number - 1u));
(uint32_t) (arguments_number - 1u));
} /* ecma_builtin_function_prototype_object_call */
/**
@@ -206,7 +206,7 @@ ecma_builtin_function_prototype_object_call (ecma_object_t *func_obj_p , /**< th
static ecma_value_t
ecma_builtin_function_prototype_object_bind (ecma_object_t *this_arg_obj_p , /**< this argument object */
const ecma_value_t *arguments_list_p, /**< list of arguments */
ecma_length_t arguments_number) /**< number of arguments */
uint32_t arguments_number) /**< number of arguments */
{
/* 4. 11. 18. */
ecma_object_t *prototype_obj_p;
@@ -287,7 +287,7 @@ ecma_builtin_function_prototype_object_bind (ecma_object_t *this_arg_obj_p , /**
bound_func_p->header.u.bound_function.args_len_or_this = ECMA_VALUE_UNDEFINED;
ecma_value_t *args_p = (ecma_value_t *) (bound_func_p + 1);
for (ecma_length_t i = 0; i < arguments_number; i++)
for (uint32_t i = 0; i < arguments_number; i++)
{
*args_p++ = ecma_copy_value_if_not_object (arguments_list_p[i]);
}
@@ -390,7 +390,7 @@ ecma_builtin_function_prototype_object_bind (ecma_object_t *this_arg_obj_p , /**
*/
ecma_value_t
ecma_builtin_function_prototype_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -404,7 +404,7 @@ ecma_builtin_function_prototype_dispatch_call (const ecma_value_t *arguments_lis
*/
ecma_value_t
ecma_builtin_function_prototype_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -423,7 +423,7 @@ ecma_builtin_function_prototype_dispatch_routine (uint16_t builtin_routine_id, /
ecma_value_t this_arg, /**< 'this' argument value */
const ecma_value_t arguments_list_p[], /**< list of arguments
* passed to routine */
ecma_length_t arguments_number) /**< length of arguments' list */
uint32_t arguments_number) /**< length of arguments' list */
{
if (!ecma_op_is_callable (this_arg))
{
@@ -48,7 +48,7 @@
*/
ecma_value_t
ecma_builtin_function_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -65,7 +65,7 @@ ecma_builtin_function_dispatch_call (const ecma_value_t *arguments_list_p, /**<
*/
ecma_value_t
ecma_builtin_function_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_op_create_dynamic_function (arguments_list_p, arguments_list_len, ECMA_PARSE_NO_OPTS);
} /* ecma_builtin_function_dispatch_construct */
@@ -43,7 +43,7 @@
*/
ecma_value_t
ecma_builtin_generator_function_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -58,7 +58,7 @@ ecma_builtin_generator_function_dispatch_call (const ecma_value_t *arguments_lis
*/
ecma_value_t
ecma_builtin_generator_function_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_builtin_generator_function_dispatch_call (arguments_list_p, arguments_list_len);
} /* ecma_builtin_generator_function_dispatch_construct */
@@ -205,7 +205,7 @@ ecma_builtin_generator_prototype_dispatch_routine (uint16_t builtin_routine_id,
ecma_value_t this_arg, /**< 'this' argument value */
const ecma_value_t arguments_list_p[], /**< list of arguments
* passed to routine */
ecma_length_t arguments_number) /**< length of arguments' list */
uint32_t arguments_number) /**< length of arguments' list */
{
JERRY_UNUSED (arguments_number);
@@ -595,7 +595,7 @@ ecma_builtin_global_dispatch_routine (uint16_t builtin_routine_id, /**< built-in
ecma_value_t this_arg, /**< 'this' argument value */
const ecma_value_t arguments_list_p[], /**< list of arguments
* passed to routine */
ecma_length_t arguments_number) /**< length of arguments' list */
uint32_t arguments_number) /**< length of arguments' list */
{
JERRY_UNUSED (this_arg);
JERRY_UNUSED (arguments_list_p);
@@ -40,7 +40,7 @@
ecma_value_t
ecma_builtin_helper_error_dispatch_call (ecma_standard_error_t error_type, /**< native error type */
const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -414,11 +414,11 @@ ecma_builtin_helper_array_concat_value (ecma_object_t *array_obj_p, /**< array *
* - The String.prototype.substring routine.
* - The ecma_builtin_helper_string_prototype_object_index_of helper routine.
*
* @return uint32_t - the normalized value of the index
* @return lit_utf8_size_t - the normalized value of the index
*/
uint32_t
lit_utf8_size_t
ecma_builtin_helper_string_index_normalize (ecma_number_t index, /**< index */
uint32_t length, /**< string's length */
lit_utf8_size_t length, /**< string's length */
bool nan_to_zero) /**< whether NaN is mapped to zero (t) or length (f) */
{
uint32_t norm_index = 0;
@@ -477,7 +477,7 @@ ecma_builtin_helper_string_prototype_object_index_of (ecma_string_t *original_st
ecma_string_index_of_mode_t mode) /**< routine's mode */
{
/* 5 (indexOf) -- 6 (lastIndexOf) */
const ecma_length_t original_len = ecma_string_get_length (original_str_p);
const lit_utf8_size_t original_len = ecma_string_get_length (original_str_p);
#if ENABLED (JERRY_ESNEXT)
/* 4, 6 (startsWith, includes, endsWith) */
@@ -532,11 +532,11 @@ ecma_builtin_helper_string_prototype_object_index_of (ecma_string_t *original_st
bool use_first_index = mode != ECMA_STRING_LAST_INDEX_OF;
/* 4b, 6 (indexOf) - 4b, 5, 7 (lastIndexOf) */
ecma_length_t start = ecma_builtin_helper_string_index_normalize (pos_num, original_len, use_first_index);
lit_utf8_size_t start = ecma_builtin_helper_string_index_normalize (pos_num, original_len, use_first_index);
ecma_number_t ret_num = ECMA_NUMBER_MINUS_ONE;
ecma_length_t index_of = 0;
lit_utf8_size_t index_of = 0;
ret_value = ECMA_VALUE_FALSE;
@@ -545,7 +545,7 @@ ecma_builtin_helper_string_prototype_object_index_of (ecma_string_t *original_st
#if ENABLED (JERRY_ESNEXT)
case ECMA_STRING_STARTS_WITH:
{
const ecma_length_t search_len = ecma_string_get_length (search_str_p);
const lit_utf8_size_t search_len = ecma_string_get_length (search_str_p);
if (search_len + start > original_len)
{
@@ -574,7 +574,7 @@ ecma_builtin_helper_string_prototype_object_index_of (ecma_string_t *original_st
start = original_len;
}
ecma_length_t search_str_len = ecma_string_get_length (search_str_p);
lit_utf8_size_t search_str_len = ecma_string_get_length (search_str_p);
if (search_str_len == 0)
{
@@ -589,9 +589,9 @@ ecma_builtin_helper_string_prototype_object_index_of (ecma_string_t *original_st
break;
}
if (ecma_builtin_helper_string_find_index (original_str_p, search_str_p, true,
(ecma_length_t) start_ends_with, &index_of))
(lit_utf8_size_t) start_ends_with, &index_of))
{
ret_value = ecma_make_boolean_value (index_of == (ecma_length_t) start_ends_with);
ret_value = ecma_make_boolean_value (index_of == (lit_utf8_size_t) start_ends_with);
}
break;
}
@@ -637,12 +637,12 @@ bool
ecma_builtin_helper_string_find_index (ecma_string_t *original_str_p, /**< index */
ecma_string_t *search_str_p, /**< string's length */
bool first_index, /**< whether search for first (t) or last (f) index */
ecma_length_t start_pos, /**< start position */
ecma_length_t *ret_index_p) /**< [out] position found in original string */
lit_utf8_size_t start_pos, /**< start position */
lit_utf8_size_t *ret_index_p) /**< [out] position found in original string */
{
bool match_found = false;
const ecma_length_t original_len = ecma_string_get_length (original_str_p);
const ecma_length_t search_len = ecma_string_get_length (search_str_p);
const lit_utf8_size_t original_len = ecma_string_get_length (original_str_p);
const lit_utf8_size_t search_len = ecma_string_get_length (search_str_p);
if (search_len <= original_len)
{
@@ -656,10 +656,10 @@ ecma_builtin_helper_string_find_index (ecma_string_t *original_str_p, /**< index
/* create utf8 string from original string and advance to position */
ECMA_STRING_TO_UTF8_STRING (original_str_p, original_str_utf8_p, original_str_size);
ecma_length_t index = start_pos;
lit_utf8_size_t index = start_pos;
const lit_utf8_byte_t *original_str_curr_p = original_str_utf8_p;
for (ecma_length_t idx = 0; idx < index; idx++)
for (lit_utf8_size_t idx = 0; idx < index; idx++)
{
lit_utf8_incr (&original_str_curr_p);
}
@@ -675,7 +675,7 @@ ecma_builtin_helper_string_find_index (ecma_string_t *original_str_p, /**< index
while (searching)
{
/* match as long as possible */
ecma_length_t match_len = 0;
lit_utf8_size_t match_len = 0;
const lit_utf8_byte_t *stored_original_str_curr_p = original_str_curr_p;
if (match_len < search_len &&
@@ -58,7 +58,7 @@ ecma_builtin_helper_string_prototype_object_index_of (ecma_string_t *original_st
ecma_value_t arg2, ecma_string_index_of_mode_t mode);
bool
ecma_builtin_helper_string_find_index (ecma_string_t *original_str_p, ecma_string_t *search_str_p, bool first_index,
ecma_length_t start_pos, ecma_length_t *ret_index_p);
lit_utf8_size_t start_pos, lit_utf8_size_t *ret_index_p);
ecma_value_t
ecma_builtin_helper_def_prop (ecma_object_t *obj_p, ecma_string_t *name_p, ecma_value_t value, uint32_t opts);
@@ -227,7 +227,7 @@ ecma_builtin_helper_json_create_non_formatted_json (lit_utf8_byte_t left_bracket
ecma_value_t
ecma_builtin_helper_error_dispatch_call (ecma_standard_error_t error_type, const ecma_value_t *arguments_list_p,
ecma_length_t arguments_list_len);
uint32_t arguments_list_len);
/* ecma-builtin-helpers-sort.c */
@@ -40,7 +40,7 @@
#define ROUTINE_ARG_LIST_2 ROUTINE_ARG_LIST_1 ROUTINE_ARG(2)
#define ROUTINE_ARG_LIST_3 ROUTINE_ARG_LIST_2 ROUTINE_ARG(3)
#define ROUTINE_ARG_LIST_NON_FIXED ROUTINE_ARG_LIST_0, \
const ecma_value_t *arguments_list_p, ecma_length_t arguments_list_len
const ecma_value_t *arguments_list_p, uint32_t arguments_list_len
#define ROUTINE(name, c_function_name, args_number, length_prop_value) \
static ecma_value_t c_function_name (ROUTINE_ARG_LIST_ ## args_number);
#define ROUTINE_CONFIGURABLE_ONLY(name, c_function_name, args_number, length_prop_value) \
@@ -236,8 +236,8 @@ DISPATCH_ROUTINE_ROUTINE_NAME (uint16_t builtin_routine_id, /**< built-in wide r
value */
const ecma_value_t arguments_list[], /**< list of arguments
passed to routine */
ecma_length_t arguments_number) /**< length of
arguments' list */
uint32_t arguments_number) /**< length of
* arguments' list */
{
/* the arguments may be unused for some built-ins */
JERRY_UNUSED (this_arg_value);
@@ -120,7 +120,7 @@ ecma_builtin_intrinsic_dispatch_routine (uint16_t builtin_routine_id, /**< built
ecma_value_t this_arg, /**< 'this' argument value */
const ecma_value_t arguments_list_p[], /**< list of arguments
* passed to routine */
ecma_length_t arguments_number) /**< length of arguments' list */
uint32_t arguments_number) /**< length of arguments' list */
{
JERRY_UNUSED (arguments_number);
@@ -1668,7 +1668,7 @@ ecma_builtin_json_stringify (ecma_value_t this_arg, /**< 'this' argument */
else if (ecma_is_value_string (space))
{
ecma_string_t *space_str_p = ecma_get_string_from_value (space);
ecma_length_t num_of_chars = ecma_string_get_length (space_str_p);
lit_utf8_size_t num_of_chars = ecma_string_get_length (space_str_p);
if (num_of_chars < 10)
{
@@ -50,7 +50,7 @@ ecma_builtin_map_prototype_dispatch_routine (uint16_t builtin_routine_id, /**< b
ecma_value_t this_arg, /**< 'this' argument value */
const ecma_value_t arguments_list_p[], /**< list of arguments
* passed to routine */
ecma_length_t arguments_number) /**< length of arguments' list */
uint32_t arguments_number) /**< length of arguments' list */
{
JERRY_UNUSED (arguments_number);
return ecma_builtin_container_dispatch_routine (builtin_routine_id,
@@ -43,7 +43,7 @@
*/
ecma_value_t
ecma_builtin_map_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -57,7 +57,7 @@ ecma_builtin_map_dispatch_call (const ecma_value_t *arguments_list_p, /**< argum
*/
ecma_value_t
ecma_builtin_map_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_op_container_create (arguments_list_p,
arguments_list_len,
@@ -120,7 +120,7 @@ enum
static ecma_value_t
ecma_builtin_math_object_max_min (bool is_max, /**< 'max' or 'min' operation */
const ecma_value_t *arg, /**< arguments list */
ecma_length_t args_number) /**< number of arguments */
uint32_t args_number) /**< number of arguments */
{
ecma_number_t result_num = ecma_number_make_infinity (is_max);
bool nan_found = false;
@@ -195,7 +195,7 @@ ecma_builtin_math_object_max_min (bool is_max, /**< 'max' or 'min' operation */
*/
static ecma_value_t
ecma_builtin_math_object_hypot (const ecma_value_t *arg, /**< arguments list */
ecma_length_t args_number) /**< number of arguments */
uint32_t args_number) /**< number of arguments */
{
if (args_number == 0)
{
@@ -340,7 +340,7 @@ ecma_builtin_math_dispatch_routine (uint16_t builtin_routine_id, /**< built-in w
ecma_value_t this_arg, /**< 'this' argument value */
const ecma_value_t arguments_list[], /**< list of arguments
* passed to routine */
ecma_length_t arguments_number) /**< length of arguments' list */
uint32_t arguments_number) /**< length of arguments' list */
{
JERRY_UNUSED (this_arg);
@@ -247,7 +247,7 @@ ecma_builtin_number_prototype_helper_round (lit_utf8_byte_t *digits_p, /**< [in,
static ecma_value_t
ecma_builtin_number_prototype_object_to_string (ecma_number_t this_arg_number, /**< this argument number */
const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
static const lit_utf8_byte_t digit_chars[36] =
{
@@ -977,7 +977,7 @@ ecma_builtin_number_prototype_dispatch_routine (uint16_t builtin_routine_id, /**
ecma_value_t this_arg, /**< 'this' argument value */
const ecma_value_t arguments_list_p[], /**< list of arguments
* passed to routine */
ecma_length_t arguments_number) /**< length of arguments' list */
uint32_t arguments_number) /**< length of arguments' list */
{
ecma_value_t this_value = ecma_builtin_number_prototype_object_value_of (this_arg);
@@ -53,7 +53,7 @@
*/
ecma_value_t
ecma_builtin_number_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -78,7 +78,7 @@ ecma_builtin_number_dispatch_call (const ecma_value_t *arguments_list_p, /**< ar
*/
ecma_value_t
ecma_builtin_number_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -215,7 +215,7 @@ ecma_builtin_object_prototype_dispatch_routine (uint16_t builtin_routine_id, /**
ecma_value_t this_arg, /**< 'this' argument value */
const ecma_value_t arguments_list_p[], /**< list of arguments
* passed to routine */
ecma_length_t arguments_number) /**< length of arguments' list */
uint32_t arguments_number) /**< length of arguments' list */
{
JERRY_UNUSED (arguments_number);
@@ -94,7 +94,7 @@ enum
*/
ecma_value_t
ecma_builtin_object_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -115,7 +115,7 @@ ecma_builtin_object_dispatch_call (const ecma_value_t *arguments_list_p, /**< ar
*/
ecma_value_t
ecma_builtin_object_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -1048,7 +1048,7 @@ ecma_builtin_object_object_define_property (ecma_object_t *obj_p, /**< routine's
static ecma_value_t
ecma_builtin_object_object_assign (ecma_object_t *target_p, /**< target object */
const ecma_value_t arguments_list_p[], /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
@@ -1178,7 +1178,7 @@ ecma_builtin_object_dispatch_routine (uint16_t builtin_routine_id, /**< built-in
ecma_value_t this_arg, /**< 'this' argument value */
const ecma_value_t arguments_list_p[], /**< list of arguments
* passed to routine */
ecma_length_t arguments_number) /**< length of arguments' list */
uint32_t arguments_number) /**< length of arguments' list */
{
JERRY_UNUSED (this_arg);
JERRY_UNUSED (arguments_list_p);
@@ -453,7 +453,7 @@ ecma_builtin_promise_all (ecma_value_t this_arg, /**< 'this' argument */
*/
ecma_value_t
ecma_builtin_promise_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -467,7 +467,7 @@ ecma_builtin_promise_dispatch_call (const ecma_value_t *arguments_list_p, /**< a
*/
ecma_value_t
ecma_builtin_promise_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -76,7 +76,7 @@ ecma_builtin_proxy_object_revocable (ecma_value_t this_arg, /**< 'this' argument
*/
ecma_value_t
ecma_builtin_proxy_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -95,7 +95,7 @@ ecma_builtin_proxy_dispatch_call (const ecma_value_t *arguments_list_p, /**< arg
*/
ecma_value_t
ecma_builtin_proxy_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -51,7 +51,7 @@
*/
ecma_value_t
ecma_builtin_range_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_builtin_helper_error_dispatch_call (ECMA_ERROR_RANGE, arguments_list_p, arguments_list_len);
} /* ecma_builtin_range_error_dispatch_call */
@@ -63,7 +63,7 @@ ecma_builtin_range_error_dispatch_call (const ecma_value_t *arguments_list_p, /*
*/
ecma_value_t
ecma_builtin_range_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_builtin_range_error_dispatch_call (arguments_list_p, arguments_list_len);
} /* ecma_builtin_range_error_dispatch_construct */
@@ -51,7 +51,7 @@
*/
ecma_value_t
ecma_builtin_reference_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_builtin_helper_error_dispatch_call (ECMA_ERROR_REFERENCE, arguments_list_p, arguments_list_len);
} /* ecma_builtin_reference_error_dispatch_call */
@@ -63,7 +63,7 @@ ecma_builtin_reference_error_dispatch_call (const ecma_value_t *arguments_list_p
*/
ecma_value_t
ecma_builtin_reference_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_builtin_reference_error_dispatch_call (arguments_list_p, arguments_list_len);
} /* ecma_builtin_reference_error_dispatch_construct */
@@ -82,7 +82,7 @@ ecma_builtin_reflect_dispatch_routine (uint16_t builtin_routine_id, /**< built-i
ecma_value_t this_arg, /**< 'this' argument value */
const ecma_value_t arguments_list[], /**< list of arguments
* passed to routine */
ecma_length_t arguments_number) /**< length of arguments' list */
uint32_t arguments_number) /**< length of arguments' list */
{
JERRY_UNUSED (this_arg);
JERRY_UNUSED (arguments_number);
@@ -45,7 +45,7 @@
static ecma_value_t
ecma_builtin_regexp_dispatch_helper (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
ecma_value_t pattern_value = ECMA_VALUE_UNDEFINED;
ecma_value_t flags_value = ECMA_VALUE_UNDEFINED;
@@ -199,7 +199,7 @@ ecma_builtin_regexp_dispatch_helper (const ecma_value_t *arguments_list_p, /**<
*/
ecma_value_t
ecma_builtin_regexp_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_builtin_regexp_dispatch_helper (arguments_list_p,
arguments_list_len);
@@ -213,7 +213,7 @@ ecma_builtin_regexp_dispatch_call (const ecma_value_t *arguments_list_p, /**< ar
*/
ecma_value_t
ecma_builtin_regexp_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_builtin_regexp_dispatch_helper (arguments_list_p,
arguments_list_len);
@@ -49,7 +49,7 @@ ecma_builtin_set_prototype_dispatch_routine (uint16_t builtin_routine_id, /**< b
ecma_value_t this_arg, /**< 'this' argument value */
const ecma_value_t arguments_list_p[], /**< list of arguments
* passed to routine */
ecma_length_t arguments_number) /**< length of arguments' list */
uint32_t arguments_number) /**< length of arguments' list */
{
JERRY_UNUSED (arguments_number);
return ecma_builtin_container_dispatch_routine (builtin_routine_id,
@@ -43,7 +43,7 @@
*/
ecma_value_t
ecma_builtin_set_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -57,7 +57,7 @@ ecma_builtin_set_dispatch_call (const ecma_value_t *arguments_list_p, /**< argum
*/
ecma_value_t
ecma_builtin_set_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_op_container_create (arguments_list_p,
arguments_list_len,
@@ -80,7 +80,7 @@ ecma_builtin_string_iterator_prototype_object_next (ecma_value_t this_val) /**<
ecma_string_t *string_p = ecma_get_string_from_value (iterated_value);
/* 6. */
ecma_length_t position = ext_obj_p->u.pseudo_array.u1.iterator_index;
lit_utf8_size_t position = ext_obj_p->u.pseudo_array.u1.iterator_index;
if (JERRY_UNLIKELY (position == ECMA_ITERATOR_INDEX_LIMIT))
{
@@ -88,7 +88,7 @@ ecma_builtin_string_iterator_prototype_object_next (ecma_value_t this_val) /**<
}
/* 7. */
ecma_length_t len = ecma_string_get_length (string_p);
lit_utf8_size_t len = ecma_string_get_length (string_p);
/* 8. */
if (position >= len)
@@ -102,7 +102,7 @@ ecma_builtin_string_iterator_prototype_object_next (ecma_value_t this_val) /**<
ecma_char_t first = ecma_string_get_char_at_pos (string_p, position);
ecma_string_t *result_str_p;
ecma_length_t result_size = 1;
lit_utf8_size_t result_size = 1;
/* 10. */
if (first < LIT_UTF16_HIGH_SURROGATE_MIN || first > LIT_UTF16_HIGH_SURROGATE_MAX || (position + 1 == len))
@@ -113,7 +113,7 @@ ecma_builtin_string_iterator_prototype_object_next (ecma_value_t this_val) /**<
else
{
/* 11.a */
ecma_char_t second = ecma_string_get_char_at_pos (string_p, (ecma_length_t) (position + 1));
ecma_char_t second = ecma_string_get_char_at_pos (string_p, position + 1);
/* 11.b */
if (second < LIT_UTF16_LOW_SURROGATE_MIN || second > LIT_UTF16_LOW_SURROGATE_MAX)
@@ -167,7 +167,7 @@ ecma_builtin_string_prototype_char_at_helper (ecma_value_t this_arg, /**< this a
}
/* 4 */
const ecma_length_t len = ecma_string_get_length (original_string_p);
const lit_utf8_size_t len = ecma_string_get_length (original_string_p);
/* 5 */
// When index_num is NaN, then the first two comparisons are false
@@ -206,7 +206,7 @@ ecma_builtin_string_prototype_char_at_helper (ecma_value_t this_arg, /**< this a
static ecma_value_t
ecma_builtin_string_prototype_object_concat (ecma_string_t *this_string_p, /**< this argument */
const ecma_value_t *argument_list_p, /**< arguments list */
ecma_length_t arguments_number) /**< number of arguments */
uint32_t arguments_number) /**< number of arguments */
{
ecma_stringbuilder_t builder = ecma_stringbuilder_create_from (this_string_p);
@@ -475,7 +475,7 @@ ecma_builtin_string_prototype_object_replace (ecma_value_t this_value, /**< this
const lit_utf8_byte_t *const input_end_p = replace_ctx.string_p + replace_ctx.string_size;
const lit_utf8_byte_t *const loop_end_p = input_end_p - search_size;
uint32_t pos = 0;
lit_utf8_size_t pos = 0;
for (const lit_utf8_byte_t *curr_p = replace_ctx.string_p;
curr_p <= loop_end_p;
lit_utf8_incr (&curr_p), pos++)
@@ -681,10 +681,10 @@ ecma_builtin_string_prototype_object_slice (ecma_string_t *get_string_val, /**<
ecma_value_t arg1, /**< routine's first argument */
ecma_value_t arg2) /**< routine's second argument */
{
const ecma_length_t len = ecma_string_get_length (get_string_val);
const lit_utf8_size_t len = ecma_string_get_length (get_string_val);
/* 4. 6. */
ecma_length_t start = 0, end = len;
lit_utf8_size_t start = 0, end = len;
if (ECMA_IS_VALUE_ERROR (ecma_builtin_helper_array_index_normalize (arg1,
len,
@@ -805,7 +805,7 @@ ecma_builtin_string_prototype_object_split (ecma_value_t this_value, /**< this a
}
ecma_object_t *array_p = ecma_get_object_from_value (result);
ecma_length_t array_length = 0;
lit_utf8_size_t array_length = 0;
/* 15. */
if (ecma_is_value_undefined (separator_value))
@@ -923,8 +923,8 @@ ecma_builtin_string_prototype_object_substring (ecma_string_t *original_string_p
ecma_value_t arg2) /**< routine's second argument */
{
/* 3 */
const ecma_length_t len = ecma_string_get_length (original_string_p);
ecma_length_t start = 0, end = len;
const lit_utf8_size_t len = ecma_string_get_length (original_string_p);
lit_utf8_size_t start = 0, end = len;
/* 4 */
ecma_number_t start_num;
@@ -1130,9 +1130,9 @@ ecma_builtin_string_prototype_object_code_point_at (ecma_string_t *this_string_p
return error;
}
ecma_length_t size = ecma_string_get_length (this_string_p);
lit_utf8_size_t length = ecma_string_get_length (this_string_p);
if (pos_num < 0 || pos_num >= size)
if (pos_num < 0 || pos_num >= length)
{
return ECMA_VALUE_UNDEFINED;
}
@@ -1143,7 +1143,7 @@ ecma_builtin_string_prototype_object_code_point_at (ecma_string_t *this_string_p
if (first < LIT_UTF16_HIGH_SURROGATE_MIN
|| first > LIT_UTF16_HIGH_SURROGATE_MAX
|| index + 1 == size)
|| index + 1 == length)
{
return ecma_make_uint32_value (first);
}
@@ -1201,7 +1201,7 @@ ecma_builtin_string_prototype_object_substr (ecma_string_t *this_string_p, /**<
}
/* 4. */
ecma_length_t this_len = ecma_string_get_length (this_string_p);
lit_utf8_size_t this_len = ecma_string_get_length (this_string_p);
/* 5. */
uint32_t from = (uint32_t) ((start_num < 0) ? JERRY_MAX (this_len + start_num, 0) : start_num);
@@ -1258,7 +1258,7 @@ ecma_builtin_string_prototype_dispatch_routine (uint16_t builtin_routine_id, /**
ecma_value_t this_arg, /**< 'this' argument value */
const ecma_value_t arguments_list_p[], /**< list of arguments
* passed to routine */
ecma_length_t arguments_number) /**< length of arguments' list */
uint32_t arguments_number) /**< length of arguments' list */
{
if (builtin_routine_id <= ECMA_STRING_PROTOTYPE_VALUE_OF)
{
@@ -60,7 +60,7 @@
static ecma_value_t
ecma_builtin_string_object_from_char_code (ecma_value_t this_arg, /**< 'this' argument */
const ecma_value_t args[], /**< arguments list */
ecma_length_t args_number) /**< number of arguments */
uint32_t args_number) /**< number of arguments */
{
JERRY_UNUSED (this_arg);
@@ -79,7 +79,7 @@ ecma_builtin_string_object_from_char_code (ecma_value_t this_arg, /**< 'this' ar
lit_utf8_size_t utf8_buf_used = 0;
for (ecma_length_t arg_index = 0;
for (uint32_t arg_index = 0;
arg_index < args_number && ecma_is_value_empty (ret_value);
arg_index++)
{
@@ -124,13 +124,13 @@ ecma_builtin_string_object_from_char_code (ecma_value_t this_arg, /**< 'this' ar
static ecma_value_t
ecma_builtin_string_object_raw (ecma_value_t this_arg, /**< 'this' argument */
const ecma_value_t args[], /**< arguments list */
ecma_length_t args_number) /**< number of arguments */
uint32_t args_number) /**< number of arguments */
{
JERRY_UNUSED (this_arg);
/* 1 - 2. */
const ecma_value_t *substitutions;
ecma_length_t number_of_substitutions;
uint32_t number_of_substitutions;
if (args_number > 1)
{
@@ -278,7 +278,7 @@ cleanup:
static ecma_value_t
ecma_builtin_string_object_from_code_point (ecma_value_t this_arg, /**< 'this' argument */
const ecma_value_t args[], /**< arguments list */
ecma_length_t args_number) /**< number of arguments */
uint32_t args_number) /**< number of arguments */
{
JERRY_UNUSED (this_arg);
@@ -289,7 +289,7 @@ ecma_builtin_string_object_from_code_point (ecma_value_t this_arg, /**< 'this' a
ecma_stringbuilder_t builder = ecma_stringbuilder_create ();
for (ecma_length_t index = 0; index < args_number; index++)
for (uint32_t index = 0; index < args_number; index++)
{
ecma_value_t to_number_value = ecma_op_to_number (args[index]);
@@ -317,7 +317,7 @@ ecma_builtin_string_object_from_code_point (ecma_value_t this_arg, /**< 'this' a
return ecma_raise_range_error (ECMA_ERR_MSG ("Error: Invalid code point"));
}
lit_code_point_t code_point = (uint32_t) to_int_num;
lit_code_point_t code_point = (lit_code_point_t) to_int_num;
ecma_char_t converted_cp[2];
uint8_t encoded_size = lit_utf16_encode_code_point (code_point, converted_cp);
@@ -345,7 +345,7 @@ ecma_builtin_string_object_from_code_point (ecma_value_t this_arg, /**< 'this' a
*/
ecma_value_t
ecma_builtin_string_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -385,7 +385,7 @@ ecma_builtin_string_dispatch_call (const ecma_value_t *arguments_list_p, /**< ar
*/
ecma_value_t
ecma_builtin_string_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -73,7 +73,7 @@ ecma_builtin_symbol_prototype_dispatch_routine (uint16_t builtin_routine_id, /**
ecma_value_t this_arg, /**< 'this' argument value */
const ecma_value_t arguments_list[], /**< list of arguments
* passed to routine */
ecma_length_t arguments_number) /**< length of arguments' list */
uint32_t arguments_number) /**< length of arguments' list */
{
JERRY_UNUSED_2 (arguments_list, arguments_number);
@@ -53,7 +53,7 @@
*/
ecma_value_t
ecma_builtin_symbol_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -72,7 +72,7 @@ ecma_builtin_symbol_dispatch_call (const ecma_value_t *arguments_list_p, /**< ar
*/
ecma_value_t
ecma_builtin_symbol_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -51,7 +51,7 @@
*/
ecma_value_t
ecma_builtin_syntax_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_builtin_helper_error_dispatch_call (ECMA_ERROR_SYNTAX, arguments_list_p, arguments_list_len);
} /* ecma_builtin_syntax_error_dispatch_call */
@@ -63,7 +63,7 @@ ecma_builtin_syntax_error_dispatch_call (const ecma_value_t *arguments_list_p, /
*/
ecma_value_t
ecma_builtin_syntax_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_builtin_syntax_error_dispatch_call (arguments_list_p, arguments_list_len);
} /* ecma_builtin_syntax_error_dispatch_construct */
@@ -51,7 +51,7 @@
*/
ecma_value_t
ecma_builtin_type_error_thrower_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -69,7 +69,7 @@ ecma_builtin_type_error_thrower_dispatch_call (const ecma_value_t *arguments_lis
*/
ecma_value_t
ecma_builtin_type_error_thrower_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -51,7 +51,7 @@
*/
ecma_value_t
ecma_builtin_type_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_builtin_helper_error_dispatch_call (ECMA_ERROR_TYPE, arguments_list_p, arguments_list_len);
} /* ecma_builtin_type_error_dispatch_call */
@@ -63,7 +63,7 @@ ecma_builtin_type_error_dispatch_call (const ecma_value_t *arguments_list_p, /**
*/
ecma_value_t
ecma_builtin_type_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_builtin_type_error_dispatch_call (arguments_list_p, arguments_list_len);
} /* ecma_builtin_type_error_dispatch_construct */
@@ -51,7 +51,7 @@
*/
ecma_value_t
ecma_builtin_uri_error_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_builtin_helper_error_dispatch_call (ECMA_ERROR_URI, arguments_list_p, arguments_list_len);
} /* ecma_builtin_uri_error_dispatch_call */
@@ -63,7 +63,7 @@ ecma_builtin_uri_error_dispatch_call (const ecma_value_t *arguments_list_p, /**<
*/
ecma_value_t
ecma_builtin_uri_error_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_builtin_uri_error_dispatch_call (arguments_list_p, arguments_list_len);
} /* ecma_builtin_uri_error_dispatch_construct */
@@ -49,7 +49,7 @@ ecma_builtin_weakmap_prototype_dispatch_routine (uint16_t builtin_routine_id, /*
ecma_value_t this_arg, /**< 'this' argument value */
const ecma_value_t arguments_list_p[], /**< list of arguments
* passed to routine */
ecma_length_t arguments_number) /**< length of arguments' list */
uint32_t arguments_number) /**< length of arguments' list */
{
JERRY_UNUSED (arguments_number);
return ecma_builtin_container_dispatch_routine (builtin_routine_id,
@@ -43,7 +43,7 @@
*/
ecma_value_t
ecma_builtin_weakmap_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -57,7 +57,7 @@ ecma_builtin_weakmap_dispatch_call (const ecma_value_t *arguments_list_p, /**< a
*/
ecma_value_t
ecma_builtin_weakmap_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_op_container_create (arguments_list_p,
arguments_list_len,
@@ -50,7 +50,7 @@ ecma_builtin_weakset_prototype_dispatch_routine (uint16_t builtin_routine_id, /*
ecma_value_t this_arg, /**< 'this' argument value */
const ecma_value_t arguments_list_p[], /**< list of arguments
* passed to routine */
ecma_length_t arguments_number) /**< length of arguments' list */
uint32_t arguments_number) /**< length of arguments' list */
{
JERRY_UNUSED (arguments_number);
return ecma_builtin_container_dispatch_routine (builtin_routine_id,
@@ -43,7 +43,7 @@
*/
ecma_value_t
ecma_builtin_weakset_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -57,7 +57,7 @@ ecma_builtin_weakset_dispatch_call (const ecma_value_t *arguments_list_p, /**< a
*/
ecma_value_t
ecma_builtin_weakset_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_op_container_create (arguments_list_p,
arguments_list_len,
@@ -89,15 +89,15 @@ extern const ecma_builtin_property_descriptor_t \
ecma_builtin_ ## lowercase_name ## _property_descriptor_list[]; \
ecma_value_t \
ecma_builtin_ ## lowercase_name ## _dispatch_call (const ecma_value_t *, \
ecma_length_t); \
uint32_t); \
ecma_value_t \
ecma_builtin_ ## lowercase_name ## _dispatch_construct (const ecma_value_t *, \
ecma_length_t); \
uint32_t); \
ecma_value_t \
ecma_builtin_ ## lowercase_name ## _dispatch_routine (uint16_t builtin_routine_id, \
ecma_value_t this_arg_value, \
const ecma_value_t [], \
ecma_length_t);
uint32_t);
#define BUILTIN(builtin_id, \
object_type, \
object_prototype_builtin_id, \
@@ -109,7 +109,7 @@ ecma_value_t \
ecma_builtin_ ## lowercase_name ## _dispatch_routine (uint16_t builtin_routine_id, \
ecma_value_t this_arg_value, \
const ecma_value_t [], \
ecma_length_t);
uint32_t);
#include "ecma-builtins.inc.h"
#undef BUILTIN_ROUTINE
@@ -47,12 +47,12 @@ typedef const ecma_builtin_property_descriptor_t *ecma_builtin_property_list_ref
typedef ecma_value_t (*ecma_builtin_dispatch_routine_t) (uint16_t builtin_routine_id,
ecma_value_t this_arg,
const ecma_value_t arguments_list[],
ecma_length_t arguments_number);
uint32_t arguments_number);
/**
* Definition of built-in dispatch call function pointer.
*/
typedef ecma_value_t (*ecma_builtin_dispatch_call_t) (const ecma_value_t arguments_list[],
ecma_length_t arguments_number);
uint32_t arguments_number);
/**
* Definition of a builtin descriptor which contains the builtin object's:
* - prototype objects's id (13-bits)
@@ -1118,7 +1118,7 @@ ecma_builtin_list_lazy_property_names (ecma_object_t *object_p, /**< a built-in
const ecma_builtin_property_descriptor_t *curr_property_p = ecma_builtin_property_list_references[builtin_id];
ecma_length_t index = 0;
uint32_t index = 0;
uint32_t *bitset_p = built_in_props_p->u.instantiated_bitset;
ecma_collection_t *for_non_enumerable_p = (separate_enumerable ? non_enum_collection_p
@@ -1182,7 +1182,7 @@ static ecma_value_t
ecma_builtin_dispatch_routine (ecma_extended_object_t *func_obj_p, /**< builtin object */
ecma_value_t this_arg_value, /**< 'this' argument value */
const ecma_value_t *arguments_list_p, /**< list of arguments passed to routine */
ecma_length_t arguments_list_len) /**< length of arguments' list */
uint32_t arguments_list_len) /**< length of arguments' list */
{
JERRY_ASSERT (ecma_builtin_function_is_routine ((ecma_object_t *) func_obj_p));
@@ -1226,7 +1226,7 @@ ecma_value_t
ecma_builtin_dispatch_call (ecma_object_t *obj_p, /**< built-in object */
ecma_value_t this_arg_value, /**< 'this' argument value */
const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< arguments list length */
uint32_t arguments_list_len) /**< arguments list length */
{
JERRY_ASSERT (ecma_get_object_type (obj_p) == ECMA_OBJECT_TYPE_FUNCTION);
JERRY_ASSERT (ecma_get_object_is_builtin (obj_p));
@@ -1255,7 +1255,7 @@ ecma_value_t
ecma_builtin_dispatch_construct (ecma_object_t *obj_p, /**< built-in object */
ecma_object_t *new_target_p, /**< new target */
const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< arguments list length */
uint32_t arguments_list_len) /**< arguments list length */
{
JERRY_ASSERT (ecma_get_object_type (obj_p) == ECMA_OBJECT_TYPE_FUNCTION);
JERRY_ASSERT (ecma_get_object_is_builtin (obj_p));
@@ -83,10 +83,10 @@ void ecma_finalize_builtins (void);
ecma_value_t
ecma_builtin_dispatch_call (ecma_object_t *obj_p, ecma_value_t this_arg_value,
const ecma_value_t *arguments_list_p, ecma_length_t arguments_list_len);
const ecma_value_t *arguments_list_p, uint32_t arguments_list_len);
ecma_value_t
ecma_builtin_dispatch_construct (ecma_object_t *obj_p, ecma_object_t *new_target_p,
const ecma_value_t *arguments_list_p, ecma_length_t arguments_list_len);
const ecma_value_t *arguments_list_p, uint32_t arguments_list_len);
ecma_property_t *
ecma_builtin_routine_try_to_instantiate_property (ecma_object_t *object_p, ecma_string_t *string_p);
ecma_property_t *
@@ -49,7 +49,7 @@
*/
ecma_value_t
ecma_builtin_float32array_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -63,7 +63,7 @@ ecma_builtin_float32array_dispatch_call (const ecma_value_t *arguments_list_p, /
*/
ecma_value_t
ecma_builtin_float32array_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_typedarray_helper_dispatch_construct (arguments_list_p, arguments_list_len,
ECMA_FLOAT32_ARRAY);
@@ -50,7 +50,7 @@
*/
ecma_value_t
ecma_builtin_float64array_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -64,7 +64,7 @@ ecma_builtin_float64array_dispatch_call (const ecma_value_t *arguments_list_p, /
*/
ecma_value_t
ecma_builtin_float64array_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_typedarray_helper_dispatch_construct (arguments_list_p, arguments_list_len,
ECMA_FLOAT64_ARRAY);
@@ -49,7 +49,7 @@
*/
ecma_value_t
ecma_builtin_int16array_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -63,7 +63,7 @@ ecma_builtin_int16array_dispatch_call (const ecma_value_t *arguments_list_p, /**
*/
ecma_value_t
ecma_builtin_int16array_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_typedarray_helper_dispatch_construct (arguments_list_p, arguments_list_len,
ECMA_INT16_ARRAY);
@@ -49,7 +49,7 @@
*/
ecma_value_t
ecma_builtin_int32array_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -63,7 +63,7 @@ ecma_builtin_int32array_dispatch_call (const ecma_value_t *arguments_list_p, /**
*/
ecma_value_t
ecma_builtin_int32array_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_typedarray_helper_dispatch_construct (arguments_list_p, arguments_list_len,
ECMA_INT32_ARRAY);
@@ -49,7 +49,7 @@
*/
ecma_value_t
ecma_builtin_int8array_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -63,7 +63,7 @@ ecma_builtin_int8array_dispatch_call (const ecma_value_t *arguments_list_p, /**<
*/
ecma_value_t
ecma_builtin_int8array_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_typedarray_helper_dispatch_construct (arguments_list_p, arguments_list_len,
ECMA_INT8_ARRAY);
@@ -33,7 +33,7 @@
*/
ecma_value_t
ecma_typedarray_helper_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len, /**< number of arguments */
uint32_t arguments_list_len, /**< number of arguments */
ecma_typedarray_type_t typedarray_id) /**< id of the typedarray */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -28,7 +28,7 @@
ecma_value_t
ecma_typedarray_helper_dispatch_construct (const ecma_value_t *arguments_list_p,
ecma_length_t arguments_list_len,
uint32_t arguments_list_len,
ecma_typedarray_type_t typedarray_id);
/**
@@ -213,7 +213,7 @@ ecma_builtin_typedarray_prototype_exec_routine (ecma_value_t this_arg, /**< this
ecma_typedarray_getter_fn_t typedarray_getter_cb = ecma_get_typedarray_getter_fn (info.id);
ecma_object_t *func_object_p = ecma_get_object_from_value (cb_func_val);
ecma_length_t byte_pos = 0;
uint32_t byte_pos = 0;
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
for (uint32_t index = 0; index < info.length && ecma_is_value_empty (ret_value); index++)
@@ -459,7 +459,7 @@ ecma_builtin_typedarray_prototype_map (ecma_value_t this_arg, /**< this argument
ecma_typedarray_getter_fn_t src_typedarray_getter_cb = ecma_get_typedarray_getter_fn (src_info.id);
ecma_typedarray_setter_fn_t target_typedarray_setter_cb = ecma_get_typedarray_setter_fn (target_info.id);
ecma_length_t src_byte_pos = 0;
uint32_t src_byte_pos = 0;
for (uint32_t index = 0; index < src_info.length; index++)
{
@@ -488,7 +488,7 @@ ecma_builtin_typedarray_prototype_map (ecma_value_t this_arg, /**< this argument
}
else
{
ecma_length_t target_byte_pos = index << target_info.shift;
uint32_t target_byte_pos = index << target_info.shift;
target_typedarray_setter_cb (target_info.buffer_p + target_byte_pos, mapped_num);
}
@@ -535,7 +535,7 @@ ecma_builtin_typedarray_prototype_reduce_with_direction (ecma_value_t this_arg,
ecma_typedarray_info_t info = ecma_typedarray_get_info (obj_p);
ecma_typedarray_getter_fn_t getter_cb = ecma_get_typedarray_getter_fn (info.id);
ecma_length_t byte_pos;
uint32_t byte_pos;
if (info.length == 0)
{
@@ -717,7 +717,7 @@ ecma_builtin_typedarray_prototype_filter (ecma_value_t this_arg, /**< this argum
JMEM_DEFINE_LOCAL_ARRAY (pass_value_list_p, info.length * info.element_size, lit_utf8_byte_t);
lit_utf8_byte_t *pass_value_p = pass_value_list_p;
ecma_length_t byte_pos = 0;
uint32_t byte_pos = 0;
for (uint32_t index = 0; index < info.length; index++)
{
@@ -1286,7 +1286,7 @@ ecma_builtin_typedarray_prototype_subarray (ecma_value_t this_arg, /**< this arg
}
/* 13. newLength */
ecma_length_t subarray_length = 0;
uint32_t subarray_length = 0;
if (end_index_uint32 > begin_index_uint32)
{
@@ -1294,7 +1294,7 @@ ecma_builtin_typedarray_prototype_subarray (ecma_value_t this_arg, /**< this arg
}
/* 17. beginByteOffset */
ecma_length_t begin_byte_offset = info.offset + begin_index_uint32 * info.element_size;
uint32_t begin_byte_offset = info.offset + begin_index_uint32 * info.element_size;
ecma_value_t arguments_p[3] =
{
@@ -1364,7 +1364,7 @@ ecma_builtin_typedarray_prototype_fill (ecma_value_t this_arg, /**< this argumen
}
}
ecma_length_t subarray_length = 0;
uint32_t subarray_length = 0;
if (end_index_uint32 > begin_index_uint32)
{
@@ -1695,7 +1695,7 @@ ecma_builtin_typedarray_prototype_find_index (ecma_value_t this_arg, /**< this a
static ecma_value_t
ecma_builtin_typedarray_prototype_index_of (ecma_value_t this_arg, /**< this argument */
const ecma_value_t args[], /**< arguments list */
ecma_length_t args_number) /**< number of arguments */
uint32_t args_number) /**< number of arguments */
{
if (!ecma_is_typedarray (this_arg))
{
@@ -1775,7 +1775,7 @@ ecma_builtin_typedarray_prototype_index_of (ecma_value_t this_arg, /**< this arg
static ecma_value_t
ecma_builtin_typedarray_prototype_last_index_of (ecma_value_t this_arg, /**< this argument */
const ecma_value_t args[], /**< arguments list */
ecma_length_t args_number) /**< number of arguments */
uint32_t args_number) /**< number of arguments */
{
if (!ecma_is_typedarray (this_arg))
{
@@ -1856,7 +1856,7 @@ ecma_builtin_typedarray_prototype_last_index_of (ecma_value_t this_arg, /**< thi
static ecma_value_t
ecma_builtin_typedarray_prototype_copy_within (ecma_value_t this_arg, /**< this argument */
const ecma_value_t args[], /**< arguments list */
ecma_length_t args_number) /**< number of arguments */
uint32_t args_number) /**< number of arguments */
{
if (!ecma_is_typedarray (this_arg))
{
@@ -1929,7 +1929,7 @@ ecma_builtin_typedarray_prototype_copy_within (ecma_value_t this_arg, /**< this
static ecma_value_t
ecma_builtin_typedarray_prototype_slice (ecma_value_t this_arg, /**< this argument */
const ecma_value_t args[], /**< arguments list */
ecma_length_t args_number) /**< number of arguments */
uint32_t args_number) /**< number of arguments */
{
if (!ecma_is_typedarray (this_arg))
{
@@ -57,7 +57,7 @@
static ecma_value_t
ecma_builtin_typedarray_from (ecma_value_t this_arg, /**< 'this' argument */
const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -126,7 +126,7 @@ ecma_builtin_typedarray_from (ecma_value_t this_arg, /**< 'this' argument */
static ecma_value_t
ecma_builtin_typedarray_of (ecma_value_t this_arg, /**< 'this' argument */
const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
if (!ecma_is_constructor (this_arg))
{
@@ -192,7 +192,7 @@ ecma_builtin_typedarray_of (ecma_value_t this_arg, /**< 'this' argument */
*/
ecma_value_t
ecma_builtin_typedarray_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -209,7 +209,7 @@ ecma_builtin_typedarray_dispatch_call (const ecma_value_t *arguments_list_p, /**
*/
ecma_value_t
ecma_builtin_typedarray_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -49,7 +49,7 @@
*/
ecma_value_t
ecma_builtin_uint16array_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -63,7 +63,7 @@ ecma_builtin_uint16array_dispatch_call (const ecma_value_t *arguments_list_p, /*
*/
ecma_value_t
ecma_builtin_uint16array_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_typedarray_helper_dispatch_construct (arguments_list_p, arguments_list_len,
ECMA_UINT16_ARRAY);
@@ -49,7 +49,7 @@
*/
ecma_value_t
ecma_builtin_uint32array_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -63,7 +63,7 @@ ecma_builtin_uint32array_dispatch_call (const ecma_value_t *arguments_list_p, /*
*/
ecma_value_t
ecma_builtin_uint32array_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -49,7 +49,7 @@
*/
ecma_value_t
ecma_builtin_uint8array_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -63,7 +63,7 @@ ecma_builtin_uint8array_dispatch_call (const ecma_value_t *arguments_list_p, /**
*/
ecma_value_t
ecma_builtin_uint8array_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
return ecma_typedarray_helper_dispatch_construct (arguments_list_p, arguments_list_len,
ECMA_UINT8_ARRAY);
@@ -49,7 +49,7 @@
*/
ecma_value_t
ecma_builtin_uint8clampedarray_dispatch_call (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);
@@ -63,7 +63,7 @@ ecma_builtin_uint8clampedarray_dispatch_call (const ecma_value_t *arguments_list
*/
ecma_value_t
ecma_builtin_uint8clampedarray_dispatch_construct (const ecma_value_t *arguments_list_p, /**< arguments list */
ecma_length_t arguments_list_len) /**< number of arguments */
uint32_t arguments_list_len) /**< number of arguments */
{
JERRY_ASSERT (arguments_list_len == 0 || arguments_list_p != NULL);