Refactor ecma_op_to_string (#3171)
Similar to the ecma_op_to_object rework, in this new method we return directly with the pointer to the ecma string, and we don't wrap the result into an ecma_value_t JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
This commit is contained in:
committed by
Robert Fancsik
parent
b7aa21ebc7
commit
4b352758c1
@@ -55,15 +55,15 @@ ecma_op_create_symbol (const ecma_value_t *arguments_list_p, /**< list of argume
|
||||
}
|
||||
else
|
||||
{
|
||||
string_desc = ecma_op_to_string (arguments_list_p[0]);
|
||||
ecma_string_t *str_p = ecma_op_to_string (arguments_list_p[0]);
|
||||
|
||||
/* 4. */
|
||||
if (ECMA_IS_VALUE_ERROR (string_desc))
|
||||
if (JERRY_UNLIKELY (str_p == NULL))
|
||||
{
|
||||
return string_desc;
|
||||
return ECMA_VALUE_ERROR;
|
||||
}
|
||||
|
||||
JERRY_ASSERT (ecma_is_value_string (string_desc));
|
||||
string_desc = ecma_make_string_value (str_p);
|
||||
}
|
||||
|
||||
/* 5. */
|
||||
|
||||
Reference in New Issue
Block a user