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
+6 -6
View File
@@ -1200,7 +1200,7 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
#if ENABLED (JERRY_BUILTIN_TYPEDARRAY)
case LIT_MAGIC_STRING_ARRAY_BUFFER_UL:
{
ecma_length_t arraybuffer_length = ext_object_p->u.class_prop.u.length;
uint32_t arraybuffer_length = ext_object_p->u.class_prop.u.length;
if (ECMA_ARRAYBUFFER_HAS_EXTERNAL_MEMORY (ext_object_p))
{
@@ -1340,14 +1340,14 @@ ecma_gc_free_object (ecma_object_t *object_p) /**< object to free */
{
JERRY_ASSERT (ext_object_p->u.pseudo_array.type == ECMA_PSEUDO_ARRAY_ARGUMENTS);
ecma_length_t formal_params_number = ext_object_p->u.pseudo_array.u1.length;
ecma_value_t *arg_Literal_p = (ecma_value_t *) (ext_object_p + 1);
uint32_t formal_params_number = ext_object_p->u.pseudo_array.u1.length;
ecma_value_t *arg_literal_p = (ecma_value_t *) (ext_object_p + 1);
for (ecma_length_t i = 0; i < formal_params_number; i++)
for (uint32_t i = 0; i < formal_params_number; i++)
{
if (arg_Literal_p[i] != ECMA_VALUE_EMPTY)
if (arg_literal_p[i] != ECMA_VALUE_EMPTY)
{
ecma_string_t *name_p = ecma_get_string_from_value (arg_Literal_p[i]);
ecma_string_t *name_p = ecma_get_string_from_value (arg_literal_p[i]);
ecma_deref_ecma_string (name_p);
}
}