There is no need to update the scanner info chain after a for/while statement. (#3138)
Fixes #3131. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
committed by
Robert Fancsik
parent
1acbf83d1a
commit
a7c654617d
@@ -842,8 +842,9 @@ parser_parse_while_statement_end (parser_context_t *context_p) /**< context */
|
||||
parser_emit_cbc_backward_branch (context_p, (uint16_t) opcode, while_statement.start_offset);
|
||||
parser_set_breaks_to_current_position (context_p, loop.branch_list_p);
|
||||
|
||||
/* Calling scanner_seek is unnecessary because all
|
||||
* info blocks inside the while statement should be processed. */
|
||||
scanner_set_location (context_p, &location);
|
||||
scanner_seek (context_p);
|
||||
context_p->token = current_token;
|
||||
} /* parser_parse_while_statement_end */
|
||||
|
||||
@@ -1186,8 +1187,9 @@ parser_parse_for_statement_end (parser_context_t *context_p) /**< context */
|
||||
parser_emit_cbc_backward_branch (context_p, (uint16_t) opcode, for_statement.start_offset);
|
||||
parser_set_breaks_to_current_position (context_p, loop.branch_list_p);
|
||||
|
||||
/* Calling scanner_seek is unnecessary because all
|
||||
* info blocks inside the for statement should be processed. */
|
||||
scanner_set_location (context_p, &location);
|
||||
scanner_seek (context_p);
|
||||
context_p->token = current_token;
|
||||
} /* parser_parse_for_statement_end */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user