Remove string copy

Changed 'ecma_copy_or_ref_ecma_string' to 'ecma_ref_ecma_string'. It does
not copy the string if the maximum number of reference counter is reached,
but bails out with an error like the 'ecma_ref_object' function does.

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
This commit is contained in:
László Langó
2016-06-14 13:51:44 +02:00
parent 7a3ed2650d
commit 0daeb2f942
18 changed files with 36 additions and 117 deletions
@@ -109,7 +109,7 @@ ecma_builtin_regexp_dispatch_construct (const ecma_value_t *arguments_list_p, /*
}
else
{
pattern_string_p = ecma_copy_or_ref_ecma_string (ecma_get_string_from_value (regexp_str_value));
pattern_string_p = ecma_ref_ecma_string (ecma_get_string_from_value (regexp_str_value));
}
ECMA_FINALIZE (regexp_str_value);
@@ -125,7 +125,7 @@ ecma_builtin_regexp_dispatch_construct (const ecma_value_t *arguments_list_p, /*
ecma_op_to_string (flags_value),
ret_value);
flags_string_p = ecma_copy_or_ref_ecma_string (ecma_get_string_from_value (flags_str_value));
flags_string_p = ecma_ref_ecma_string (ecma_get_string_from_value (flags_str_value));
ECMA_FINALIZE (flags_str_value);
}