From 0a6e1a83f8b27ea1aa5d4d47b2ee87d37b87e0db Mon Sep 17 00:00:00 2001 From: Ruben Ayrapetyan Date: Tue, 2 Sep 2014 20:16:41 +0400 Subject: [PATCH] Renaming ecma_compare_ecma_string_to_ecma_string to ecma_compare_ecma_strings. --- src/libcoreint/opcodes-helpers-variables.c | 8 +++---- src/libecmaobjects/ecma-helpers-string.c | 22 +++++++++---------- src/libecmaobjects/ecma-helpers.c | 2 +- src/libecmaobjects/ecma-helpers.h | 8 +++---- src/libecmaoperations/ecma-array-object.c | 4 ++-- src/libecmaoperations/ecma-comparison.c | 6 ++--- src/libecmaoperations/ecma-conversion.c | 2 +- .../ecma-objects-arguments.c | 2 +- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/libcoreint/opcodes-helpers-variables.c b/src/libcoreint/opcodes-helpers-variables.c index 494759ae0..771ae2287 100644 --- a/src/libcoreint/opcodes-helpers-variables.c +++ b/src/libcoreint/opcodes-helpers-variables.c @@ -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); diff --git a/src/libecmaobjects/ecma-helpers-string.c b/src/libecmaobjects/ecma-helpers-string.c index a59eed2bb..7fb0ea8ce 100644 --- a/src/libecmaobjects/ecma-helpers-string.c +++ b/src/libecmaobjects/ecma-helpers-string.c @@ -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 diff --git a/src/libecmaobjects/ecma-helpers.c b/src/libecmaobjects/ecma-helpers.c index bbbd1f2a6..af917559e 100644 --- a/src/libecmaobjects/ecma-helpers.c +++ b/src/libecmaobjects/ecma-helpers.c @@ -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; } diff --git a/src/libecmaobjects/ecma-helpers.h b/src/libecmaobjects/ecma-helpers.h index cc5a99d71..f77434a3d 100644 --- a/src/libecmaobjects/ecma-helpers.h +++ b/src/libecmaobjects/ecma-helpers.h @@ -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); diff --git a/src/libecmaoperations/ecma-array-object.c b/src/libecmaoperations/ecma-array-object.c index 648232435..19acb5baf 100644 --- a/src/libecmaoperations/ecma-array-object.c +++ b/src/libecmaoperations/ecma-array-object.c @@ -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); diff --git a/src/libecmaoperations/ecma-comparison.c b/src/libecmaoperations/ecma-comparison.c index 80cbba361..9c430e382 100644 --- a/src/libecmaoperations/ecma-comparison.c +++ b/src/libecmaoperations/ecma-comparison.c @@ -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); diff --git a/src/libecmaoperations/ecma-conversion.c b/src/libecmaoperations/ecma-conversion.c index a1017bf58..b6c98031d 100644 --- a/src/libecmaoperations/ecma-conversion.c +++ b/src/libecmaoperations/ecma-conversion.c @@ -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) diff --git a/src/libecmaoperations/ecma-objects-arguments.c b/src/libecmaoperations/ecma-objects-arguments.c index 4b2b66258..6ebc9d121 100644 --- a/src/libecmaoperations/ecma-objects-arguments.c +++ b/src/libecmaoperations/ecma-objects-arguments.c @@ -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; }