Fix "arguments" and "eval" parsing (#2661)

This patch fixes #2656 and fixes #2659 as well.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2019-01-15 13:29:56 +01:00
committed by László Langó
parent 98aa08e33c
commit c305d70b11
4 changed files with 41 additions and 3 deletions
+2 -2
View File
@@ -1546,9 +1546,9 @@ parser_process_unary_expression (parser_context_t *context_p) /**< context */
else
{
if (context_p->last_cbc_opcode == CBC_PUSH_LITERAL
&& context_p->last_cbc.literal_object_type == LEXER_LITERAL_OBJECT_EVAL)
&& context_p->last_cbc.literal_object_type == LEXER_LITERAL_OBJECT_EVAL
&& context_p->last_cbc.literal_type == LEXER_IDENT_LITERAL)
{
JERRY_ASSERT (context_p->last_cbc.literal_type == LEXER_IDENT_LITERAL);
context_p->status_flags |= PARSER_ARGUMENTS_NEEDED | PARSER_LEXICAL_ENV_NEEDED | PARSER_NO_REG_STORE;
is_eval = true;
}