Rework map_to member of the scope chain that it can store flags. (#3552)

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2020-02-13 17:39:56 +01:00
committed by GitHub
parent 8cd5d06620
commit 4b325ea9e3
7 changed files with 116 additions and 31 deletions
+3 -3
View File
@@ -2194,7 +2194,7 @@ parser_parse_source (const uint8_t *arg_list_p, /**< function argument list */
if (context.scope_stack_p != NULL)
{
parser_free (context.scope_stack_p, context.scope_stack_size * sizeof (parser_scope_stack));
parser_free (context.scope_stack_p, context.scope_stack_size * sizeof (parser_scope_stack_t));
}
#if ENABLED (JERRY_PARSER_DUMP_BYTE_CODE)
@@ -2297,7 +2297,7 @@ parser_restore_context (parser_context_t *context_p, /**< context */
if (context_p->scope_stack_p != NULL)
{
parser_free (context_p->scope_stack_p, context_p->scope_stack_size * sizeof (parser_scope_stack));
parser_free (context_p->scope_stack_p, context_p->scope_stack_size * sizeof (parser_scope_stack_t));
}
/* Restore private part of the context. */
@@ -2568,7 +2568,7 @@ parser_raise_error (parser_context_t *context_p, /**< context */
if (context_p->scope_stack_p != NULL)
{
parser_free (context_p->scope_stack_p, context_p->scope_stack_size * sizeof (parser_scope_stack));
parser_free (context_p->scope_stack_p, context_p->scope_stack_size * sizeof (parser_scope_stack_t));
}
context_p->scope_stack_p = saved_context_p->scope_stack_p;
context_p->scope_stack_size = saved_context_p->scope_stack_size;