Improve magic string handling. (#2221)
Remove unnecessary ref / deref calls when magic strings are used. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
@@ -72,7 +72,7 @@ ecma_builtin_function_helper_get_function_arguments (const ecma_value_t *argumen
|
||||
|
||||
if (arguments_list_len <= 1)
|
||||
{
|
||||
return ecma_make_string_value (ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY));
|
||||
return ecma_make_magic_string_value (LIT_MAGIC_STRING__EMPTY);
|
||||
}
|
||||
|
||||
ecma_value_t final_str = ecma_op_to_string (arguments_list_p[0]);
|
||||
@@ -146,7 +146,7 @@ ecma_builtin_function_dispatch_construct (const ecma_value_t *arguments_list_p,
|
||||
else
|
||||
{
|
||||
/* Very unlikely code path, not optimized. */
|
||||
function_body_value = ecma_make_string_value (ecma_get_magic_string (LIT_MAGIC_STRING__EMPTY));
|
||||
function_body_value = ecma_make_magic_string_value (LIT_MAGIC_STRING__EMPTY);
|
||||
}
|
||||
|
||||
ecma_string_t *arguments_str_p = ecma_get_string_from_value (arguments_value);
|
||||
|
||||
Reference in New Issue
Block a user