Implement generator support for object initializers and classes. (#3372)

Large part of the code is also reworked.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2019-11-29 12:28:51 +01:00
committed by Dániel Bátyai
parent 1b01bb034f
commit 8956eff2bd
7 changed files with 411 additions and 185 deletions
+3 -1
View File
@@ -670,13 +670,15 @@ parser_parse_function_statement (parser_context_t *context_p) /**< context */
context_p->status_flags &= (uint32_t) ~(PARSER_MODULE_STORE_IDENT);
#endif /* ENABLED (JERRY_ES2015_MODULE_SYSTEM) */
uint32_t status_flags = PARSER_IS_FUNCTION | PARSER_IS_CLOSURE;
uint32_t status_flags = PARSER_FUNCTION_CLOSURE;
if (context_p->lit_object.type != LEXER_LITERAL_OBJECT_ANY)
{
JERRY_ASSERT (context_p->lit_object.type == LEXER_LITERAL_OBJECT_EVAL
|| context_p->lit_object.type == LEXER_LITERAL_OBJECT_ARGUMENTS);
status_flags |= PARSER_HAS_NON_STRICT_ARG;
}
#if ENABLED (JERRY_ES2015)
if (is_generator_function)
{