Implement RegExp unicode and sticky flags (#3379)

JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
This commit is contained in:
Dániel Bátyai
2019-11-29 14:08:30 +01:00
committed by GitHub
parent 8956eff2bd
commit 35c0a6e299
9 changed files with 484 additions and 77 deletions
+11 -2
View File
@@ -15,6 +15,7 @@
#include "ecma-globals.h"
#include "re-bytecode.h"
#include "ecma-regexp-object.h"
#if ENABLED (JERRY_BUILTIN_REGEXP)
@@ -455,8 +456,16 @@ re_dump_bytecode (re_bytecode_ctx_t *bc_ctx_p) /**< RegExp bytecode context */
JERRY_DEBUG_MSG ("%d", num_of_class);
while (num_of_class)
{
JERRY_DEBUG_MSG (" %d", re_get_char (&bytecode_p));
JERRY_DEBUG_MSG ("-%d", re_get_char (&bytecode_p));
if ((compiled_code_p->header.status_flags & RE_FLAG_UNICODE) != 0)
{
JERRY_DEBUG_MSG (" %u", re_get_value (&bytecode_p));
JERRY_DEBUG_MSG ("-%u", re_get_value (&bytecode_p));
}
else
{
JERRY_DEBUG_MSG (" %u", re_get_char (&bytecode_p));
JERRY_DEBUG_MSG ("-%u", re_get_char (&bytecode_p));
}
num_of_class--;
}
JERRY_DEBUG_MSG (", ");