Skip to content

Remove ecma_get_length_string #2234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions jerry-core/ecma/base/ecma-helpers-string.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,20 +512,6 @@ ecma_new_ecma_string_from_magic_string_ex_id (lit_magic_string_ex_id_t id) /**<
return string_desc_p;
} /* ecma_new_ecma_string_from_magic_string_ex_id */

/**
* Returns the constant assigned to the length magic string.
*
* Note:
* Calling ecma_deref_ecma_string on the returned pointer is optional.
*
* @return pointer to ecma-string descriptor
*/
ecma_string_t *
ecma_get_length_string (void)
{
return ecma_get_magic_string (LIT_MAGIC_STRING_LENGTH);
} /* ecma_get_length_string */

/**
* Append a cesu8 string after an ecma-string
*
Expand Down
1 change: 0 additions & 1 deletion jerry-core/ecma/base/ecma-helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ ecma_string_t *ecma_get_ecma_string_from_uint32 (uint32_t uint32_number);
ecma_string_t *ecma_new_ecma_string_from_number (ecma_number_t num);
ecma_string_t *ecma_get_magic_string (lit_magic_string_id_t id);
ecma_string_t *ecma_new_ecma_string_from_magic_string_ex_id (lit_magic_string_ex_id_t id);
ecma_string_t *ecma_get_length_string (void);
ecma_string_t *ecma_append_chars_to_string (ecma_string_t *string1_p,
const lit_utf8_byte_t *cesu8_string2_p,
lit_utf8_size_t cesu8_string2_size,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ ecma_builtin_array_prototype_helper_set_length (ecma_object_t *object, /**< obje

ecma_value_t length_value = ecma_make_number_value (length);
ret_value = ecma_op_object_put (object,
ecma_get_length_string (),
ecma_get_magic_string (LIT_MAGIC_STRING_LENGTH),
length_value,
true),

Expand Down
2 changes: 1 addition & 1 deletion jerry-core/ecma/operations/ecma-objects-arguments.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ ecma_op_create_arguments_object (ecma_object_t *func_obj_p, /**< callee function

/* 7. */
prop_value_p = ecma_create_named_data_property (obj_p,
ecma_get_length_string (),
ecma_get_magic_string (LIT_MAGIC_STRING_LENGTH),
ECMA_PROPERTY_CONFIGURABLE_WRITABLE,
NULL);

Expand Down
2 changes: 1 addition & 1 deletion jerry-core/ecma/operations/ecma-regexp-object.c
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ re_set_result_array_properties (ecma_object_t *array_obj_p, /**< result array */
array_item_prop_desc.value = ecma_make_uint32_value (num_of_elements);

ecma_op_object_define_own_property (array_obj_p,
ecma_get_length_string (),
ecma_get_magic_string (LIT_MAGIC_STRING_LENGTH),
&array_item_prop_desc,
true);
}
Expand Down