Skip to content

Commit 7f5c151

Browse files
committed
Remove ecma_get_length_string
Fixes #2231 JerryScript-DCO-1.0-Signed-off-by: Daniella Barsony [email protected]
1 parent 94760b1 commit 7f5c151

File tree

5 files changed

+3
-18
lines changed

5 files changed

+3
-18
lines changed

jerry-core/ecma/base/ecma-helpers-string.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -512,20 +512,6 @@ ecma_new_ecma_string_from_magic_string_ex_id (lit_magic_string_ex_id_t id) /**<
512512
return string_desc_p;
513513
} /* ecma_new_ecma_string_from_magic_string_ex_id */
514514

515-
/**
516-
* Returns the constant assigned to the length magic string.
517-
*
518-
* Note:
519-
* Calling ecma_deref_ecma_string on the returned pointer is optional.
520-
*
521-
* @return pointer to ecma-string descriptor
522-
*/
523-
ecma_string_t *
524-
ecma_get_length_string (void)
525-
{
526-
return ecma_get_magic_string (LIT_MAGIC_STRING_LENGTH);
527-
} /* ecma_get_length_string */
528-
529515
/**
530516
* Append a cesu8 string after an ecma-string
531517
*

jerry-core/ecma/base/ecma-helpers.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ ecma_string_t *ecma_get_ecma_string_from_uint32 (uint32_t uint32_number);
200200
ecma_string_t *ecma_new_ecma_string_from_number (ecma_number_t num);
201201
ecma_string_t *ecma_get_magic_string (lit_magic_string_id_t id);
202202
ecma_string_t *ecma_new_ecma_string_from_magic_string_ex_id (lit_magic_string_ex_id_t id);
203-
ecma_string_t *ecma_get_length_string (void);
204203
ecma_string_t *ecma_append_chars_to_string (ecma_string_t *string1_p,
205204
const lit_utf8_byte_t *cesu8_string2_p,
206205
lit_utf8_size_t cesu8_string2_size,

jerry-core/ecma/builtin-objects/ecma-builtin-array-prototype.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ ecma_builtin_array_prototype_helper_set_length (ecma_object_t *object, /**< obje
6262

6363
ecma_value_t length_value = ecma_make_number_value (length);
6464
ret_value = ecma_op_object_put (object,
65-
ecma_get_length_string (),
65+
ecma_get_magic_string (LIT_MAGIC_STRING_LENGTH),
6666
length_value,
6767
true),
6868

jerry-core/ecma/operations/ecma-objects-arguments.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ ecma_op_create_arguments_object (ecma_object_t *func_obj_p, /**< callee function
133133

134134
/* 7. */
135135
prop_value_p = ecma_create_named_data_property (obj_p,
136-
ecma_get_length_string (),
136+
ecma_get_magic_string (LIT_MAGIC_STRING_LENGTH),
137137
ECMA_PROPERTY_CONFIGURABLE_WRITABLE,
138138
NULL);
139139

jerry-core/ecma/operations/ecma-regexp-object.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1185,7 +1185,7 @@ re_set_result_array_properties (ecma_object_t *array_obj_p, /**< result array */
11851185
array_item_prop_desc.value = ecma_make_uint32_value (num_of_elements);
11861186

11871187
ecma_op_object_define_own_property (array_obj_p,
1188-
ecma_get_length_string (),
1188+
ecma_get_magic_string (LIT_MAGIC_STRING_LENGTH),
11891189
&array_item_prop_desc,
11901190
true);
11911191
}

0 commit comments

Comments
 (0)