Improve empty checks of ecma strings

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-05-31 14:38:36 +02:00
parent 2324617928
commit 7f153c799a
8 changed files with 29 additions and 17 deletions
@@ -103,7 +103,7 @@ ecma_builtin_regexp_dispatch_construct (const ecma_value_t *arguments_list_p, /*
ecma_op_to_string (pattern_value),
ret_value);
if (ecma_string_get_length (ecma_get_string_from_value (regexp_str_value)) == 0)
if (ecma_string_is_empty (ecma_get_string_from_value (regexp_str_value)))
{
pattern_string_p = ecma_get_magic_string (LIT_MAGIC_STRING_EMPTY_NON_CAPTURE_GROUP);
}