Export assignment expression must not track variables (#4660)

Only export the result of the assignment expression. This value cannot be changed later.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2021-04-21 08:56:50 +02:00
committed by GitHub
parent dead11cdd0
commit b4bea25f13
7 changed files with 38 additions and 13 deletions
+2
View File
@@ -2587,6 +2587,8 @@ parser_parse_export_statement (parser_context_t *context_p) /**< context */
context_p->token.lit_location.type = LEXER_IDENT_LITERAL;
parser_emit_cbc_literal_from_token (context_p, CBC_PUSH_LITERAL);
/* Do not overwrite this identifier. */
context_p->status_flags &= (uint32_t) ~PARSER_MODULE_STORE_IDENT;
context_p->module_identifier_lit_p = context_p->lit_object.literal_p;
/* Fake an assignment to the default identifier */