Refactor builtins to handle CESU-8 encoded strings.

JerryScript-DCO-1.0-Signed-off-by: Zsolt Borbély zsborbely.u-szeged@partner.samsung.com
JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai.u-szeged@partner.samsung.com
This commit is contained in:
Dániel Bátyai
2015-09-09 14:27:17 +02:00
parent dcd610b305
commit 579b1edaa5
17 changed files with 517 additions and 696 deletions
+3 -3
View File
@@ -177,7 +177,7 @@ lexer_create_token_for_charset (token_type tt, /**< token type */
lit_utf8_byte_t *converted_str_p;
if (should_convert)
if (unlikely (should_convert))
{
lit_utf8_iterator_seek_bos (&iter);
converted_str_p = (lit_utf8_byte_t *) jsp_mm_alloc (new_size);
@@ -198,7 +198,7 @@ lexer_create_token_for_charset (token_type tt, /**< token type */
literal_t lit = lit_find_literal_by_utf8_string (converted_str_p, new_length);
if (lit != NULL)
{
if (should_convert)
if (unlikely (should_convert))
{
jsp_mm_free (converted_str_p);
}
@@ -210,7 +210,7 @@ lexer_create_token_for_charset (token_type tt, /**< token type */
|| lit->get_type () == LIT_MAGIC_STR_T
|| lit->get_type () == LIT_MAGIC_STR_EX_T);
if (should_convert)
if (unlikely (should_convert))
{
jsp_mm_free (converted_str_p);
}