Fix three async function issues. (#3863)

- Invalid assert
- Add missing async prefix check when an identifier is enclosed in brackets
- Adding a new byte-code

Fixes #3855
Fixes #3856
Fixes #3857

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2020-06-08 10:25:34 +02:00
committed by GitHub
parent c2c623df79
commit ab2e821777
8 changed files with 59 additions and 14 deletions
+1 -2
View File
@@ -3017,8 +3017,7 @@ parser_parse_statements (parser_context_t *context_p) /**< context */
#if ENABLED (JERRY_ES2015)
if (context_p->status_flags & PARSER_IS_ASYNC_FUNCTION)
{
parser_emit_cbc (context_p, CBC_PUSH_UNDEFINED);
parser_emit_cbc_ext (context_p, CBC_EXT_RETURN_PROMISE);
parser_emit_cbc_ext (context_p, CBC_EXT_RETURN_PROMISE_UNDEFINED);
break;
}
#endif /* ENABLED (JERRY_ES2015) */