Properly implement static class fields. (#4221)

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2020-09-25 14:23:02 +02:00
committed by GitHub
parent e478640d80
commit bc64957d19
15 changed files with 344 additions and 162 deletions
+1 -7
View File
@@ -2848,15 +2848,9 @@ lexer_construct_function_object (parser_context_t *context_p, /**< context */
{
compiled_code_p = parser_parse_function (context_p, extra_status_flags);
}
else if (JERRY_LIKELY (!(extra_status_flags & PARSER_CLASS_CONSTRUCTOR)))
{
compiled_code_p = parser_parse_arrow_function (context_p, extra_status_flags);
}
else
{
/* Since PARSER_IS_ARROW_FUNCTION and PARSER_CLASS_CONSTRUCTOR bits cannot
* be set at the same time, this bit combination triggers class field parsing. */
compiled_code_p = parser_parse_class_fields (context_p);
compiled_code_p = parser_parse_arrow_function (context_p, extra_status_flags);
}
#else /* !ENABLED (JERRY_ESNEXT) */
compiled_code_p = parser_parse_function (context_p, extra_status_flags);