Fix this property reference on assignment patterns (#3365)
This patch fixes #3348. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
committed by
Zoltan Herczeg
parent
12211d8aaa
commit
cbeecdb703
@@ -2427,6 +2427,14 @@ parser_pattern_process_assignment (parser_context_t *context_p, /**< context */
|
||||
parser_raise_error (context_p, PARSER_ERR_INVALID_DESTRUCTURING_PATTERN);
|
||||
}
|
||||
|
||||
if (context_p->last_cbc_opcode == CBC_PUSH_PROP_THIS_LITERAL)
|
||||
{
|
||||
context_p->last_cbc_opcode = PARSER_CBC_UNAVAILABLE;
|
||||
uint16_t lit_index = context_p->last_cbc.literal_index;
|
||||
parser_emit_cbc (context_p, CBC_PUSH_THIS);
|
||||
parser_emit_cbc_literal (context_p, CBC_PUSH_PROP_LITERAL, lit_index);
|
||||
}
|
||||
|
||||
if (end_type == LEXER_RIGHT_SQUARE)
|
||||
{
|
||||
PARSER_PLUS_EQUAL_U16 (rhs_opcode, 1);
|
||||
|
||||
Reference in New Issue
Block a user