mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Renaming ecma_compare_ecma_string_to_ecma_string to ecma_compare_ecma_strings.
This commit is contained in:
parent
11d772fda4
commit
0a6e1a83f8
@ -42,10 +42,10 @@ do_strict_eval_arguments_check (ecma_reference_t ref) /**< ECMA-reference */
|
||||
ecma_string_t* magic_string_eval = ecma_get_magic_string (ECMA_MAGIC_STRING_EVAL);
|
||||
ecma_string_t* magic_string_arguments = ecma_get_magic_string (ECMA_MAGIC_STRING_ARGUMENTS);
|
||||
|
||||
ret = (ecma_compare_ecma_string_to_ecma_string (ref.referenced_name_p,
|
||||
magic_string_eval) == 0
|
||||
|| ecma_compare_ecma_string_to_ecma_string (ref.referenced_name_p,
|
||||
magic_string_arguments) == 0);
|
||||
ret = (ecma_compare_ecma_strings (ref.referenced_name_p,
|
||||
magic_string_eval) == 0
|
||||
|| ecma_compare_ecma_strings (ref.referenced_name_p,
|
||||
magic_string_arguments) == 0);
|
||||
|
||||
ecma_deref_ecma_string (magic_string_eval);
|
||||
ecma_deref_ecma_string (magic_string_arguments);
|
||||
|
||||
@ -613,14 +613,14 @@ ecma_compare_ecma_string_to_zt_string (const ecma_string_t *string_p, /**< ecma-
|
||||
* Long path part of ecma-string to ecma-string comparison routine
|
||||
*
|
||||
* See also:
|
||||
* ecma_compare_ecma_string_to_ecma_string
|
||||
* ecma_compare_ecma_strings
|
||||
*
|
||||
* @return true - if strings are equal;
|
||||
* false - otherwise.
|
||||
*/
|
||||
static bool __noinline
|
||||
ecma_compare_ecma_string_to_ecma_string_longpath (const ecma_string_t *string1_p, /* ecma-string */
|
||||
const ecma_string_t *string2_p) /* ecma-string */
|
||||
ecma_compare_ecma_strings_longpath (const ecma_string_t *string1_p, /* ecma-string */
|
||||
const ecma_string_t *string2_p) /* ecma-string */
|
||||
{
|
||||
if (string1_p->container == ECMA_STRING_CONTAINER_HEAP_CHUNKS)
|
||||
{
|
||||
@ -728,7 +728,7 @@ ecma_compare_ecma_string_to_ecma_string_longpath (const ecma_string_t *string1_p
|
||||
}
|
||||
|
||||
return is_equal;
|
||||
} /* ecma_compare_ecma_string_to_ecma_string_longpath */
|
||||
} /* ecma_compare_ecma_strings_longpath */
|
||||
|
||||
/**
|
||||
* Compare ecma-string to ecma-string
|
||||
@ -737,8 +737,8 @@ ecma_compare_ecma_string_to_ecma_string_longpath (const ecma_string_t *string1_p
|
||||
* false - otherwise.
|
||||
*/
|
||||
bool
|
||||
ecma_compare_ecma_string_to_ecma_string (const ecma_string_t *string1_p, /* ecma-string */
|
||||
const ecma_string_t *string2_p) /* ecma-string */
|
||||
ecma_compare_ecma_strings (const ecma_string_t *string1_p, /* ecma-string */
|
||||
const ecma_string_t *string2_p) /* ecma-string */
|
||||
{
|
||||
JERRY_ASSERT (string1_p != NULL && string2_p != NULL);
|
||||
|
||||
@ -803,8 +803,8 @@ ecma_compare_ecma_string_to_ecma_string (const ecma_string_t *string1_p, /* ecma
|
||||
}
|
||||
}
|
||||
|
||||
return ecma_compare_ecma_string_to_ecma_string_longpath (string1_p, string2_p);
|
||||
} /* ecma_compare_ecma_string_to_ecma_string */
|
||||
return ecma_compare_ecma_strings_longpath (string1_p, string2_p);
|
||||
} /* ecma_compare_ecma_strings */
|
||||
|
||||
/**
|
||||
* Relational compare of ecma-strings.
|
||||
@ -817,11 +817,11 @@ ecma_compare_ecma_string_to_ecma_string (const ecma_string_t *string1_p, /* ecma
|
||||
* false - otherwise.
|
||||
*/
|
||||
bool
|
||||
ecma_compare_ecma_string_to_ecma_string_relational (const ecma_string_t *string1_p, /**< ecma-string */
|
||||
const ecma_string_t *string2_p) /**< ecma-string */
|
||||
ecma_compare_ecma_strings_relational (const ecma_string_t *string1_p, /**< ecma-string */
|
||||
const ecma_string_t *string2_p) /**< ecma-string */
|
||||
{
|
||||
JERRY_UNIMPLEMENTED_REF_UNUSED_VARS (string1_p, string2_p);
|
||||
} /* ecma_compare_ecma_string_to_ecma_string_relational */
|
||||
} /* ecma_compare_ecma_strings_relational */
|
||||
|
||||
/**
|
||||
* Get length of ecma-string
|
||||
|
||||
@ -499,7 +499,7 @@ ecma_find_named_property (ecma_object_t *obj_p, /**< object to find property in
|
||||
|
||||
JERRY_ASSERT(property_name_p != NULL);
|
||||
|
||||
if (ecma_compare_ecma_string_to_ecma_string (name_p, property_name_p))
|
||||
if (ecma_compare_ecma_strings (name_p, property_name_p))
|
||||
{
|
||||
return property_p;
|
||||
}
|
||||
|
||||
@ -107,10 +107,10 @@ extern ecma_number_t ecma_string_to_number (const ecma_string_t *str_p);
|
||||
extern ssize_t ecma_string_to_zt_string (const ecma_string_t *string_desc_p,
|
||||
ecma_char_t *buffer_p,
|
||||
ssize_t buffer_size);
|
||||
extern bool ecma_compare_ecma_string_to_ecma_string (const ecma_string_t *string1_p,
|
||||
const ecma_string_t *string2_p);
|
||||
extern bool ecma_compare_ecma_string_to_ecma_string_relational (const ecma_string_t *string1_p,
|
||||
const ecma_string_t *string2_p);
|
||||
extern bool ecma_compare_ecma_strings (const ecma_string_t *string1_p,
|
||||
const ecma_string_t *string2_p);
|
||||
extern bool ecma_compare_ecma_strings_relational (const ecma_string_t *string1_p,
|
||||
const ecma_string_t *string2_p);
|
||||
extern int32_t ecma_string_get_length (const ecma_string_t *string_p);
|
||||
extern bool ecma_compare_zt_string_to_zt_string (const ecma_char_t *string1_p, const ecma_char_t *string2_p);
|
||||
extern ssize_t ecma_copy_zt_string_to_buffer (const ecma_char_t *string_p, ecma_char_t *buffer_p, ssize_t buffer_size);
|
||||
|
||||
@ -177,8 +177,8 @@ ecma_op_array_object_define_own_property (ecma_object_t *obj_p, /**< the array o
|
||||
uint32_t old_len_uint32 = ecma_number_to_uint32 (*num_p);
|
||||
|
||||
// 3.
|
||||
bool is_property_name_equal_length = (ecma_compare_ecma_string_to_ecma_string (property_name_p,
|
||||
magic_string_length_p) == 0);
|
||||
bool is_property_name_equal_length = (ecma_compare_ecma_strings (property_name_p,
|
||||
magic_string_length_p) == 0);
|
||||
|
||||
ecma_deref_ecma_string (magic_string_length_p);
|
||||
|
||||
|
||||
@ -101,7 +101,7 @@ ecma_op_abstract_equality_compare (ecma_value_t x, /**< first operand */
|
||||
ecma_string_t* x_str_p = ECMA_GET_POINTER(x.value);
|
||||
ecma_string_t* y_str_p = ECMA_GET_POINTER(y.value);
|
||||
|
||||
bool is_equal = ecma_compare_ecma_string_to_ecma_string (x_str_p, y_str_p);
|
||||
bool is_equal = ecma_compare_ecma_strings (x_str_p, y_str_p);
|
||||
|
||||
ret_value = ecma_make_simple_completion_value (is_equal ? ECMA_SIMPLE_VALUE_TRUE : ECMA_SIMPLE_VALUE_FALSE);
|
||||
}
|
||||
@ -272,7 +272,7 @@ ecma_op_strict_equality_compare (ecma_value_t x, /**< first operand */
|
||||
ecma_string_t* x_str_p = ECMA_GET_POINTER (x.value);
|
||||
ecma_string_t* y_str_p = ECMA_GET_POINTER (y.value);
|
||||
|
||||
return ecma_compare_ecma_string_to_ecma_string (x_str_p, y_str_p);
|
||||
return ecma_compare_ecma_strings (x_str_p, y_str_p);
|
||||
}
|
||||
|
||||
// 6. If Type (x) is Boolean, return true if x and y are both true or both false; otherwise, return false.
|
||||
@ -351,7 +351,7 @@ ecma_op_abstract_relational_compare (ecma_value_t x, /**< first operand */
|
||||
ecma_string_t *str_x_p = ECMA_GET_POINTER (px.u.value.value);
|
||||
ecma_string_t *str_y_p = ECMA_GET_POINTER (py.u.value.value);
|
||||
|
||||
bool is_px_less = ecma_compare_ecma_string_to_ecma_string_relational (str_x_p, str_y_p);
|
||||
bool is_px_less = ecma_compare_ecma_strings_relational (str_x_p, str_y_p);
|
||||
|
||||
ret_value = ecma_make_simple_completion_value (is_px_less ? ECMA_SIMPLE_VALUE_TRUE
|
||||
: ECMA_SIMPLE_VALUE_FALSE);
|
||||
|
||||
@ -147,7 +147,7 @@ ecma_op_same_value (ecma_value_t x, /**< ecma-value */
|
||||
ecma_string_t* x_str_p = ECMA_GET_POINTER(x.value);
|
||||
ecma_string_t* y_str_p = ECMA_GET_POINTER(y.value);
|
||||
|
||||
return ecma_compare_ecma_string_to_ecma_string (x_str_p, y_str_p);
|
||||
return ecma_compare_ecma_strings (x_str_p, y_str_p);
|
||||
}
|
||||
|
||||
if (is_x_boolean)
|
||||
|
||||
@ -155,7 +155,7 @@ ecma_create_arguments_object (ecma_object_t *func_obj_p, /**< callee function */
|
||||
indx2 < formal_params_number;
|
||||
indx2++)
|
||||
{
|
||||
if (ecma_compare_ecma_string_to_ecma_string (name_p, formal_params[indx2]))
|
||||
if (ecma_compare_ecma_strings (name_p, formal_params[indx2]))
|
||||
{
|
||||
is_first_occurence = false;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user