Remove ES_NEXT macro (#4915)

- remove all '#JERRY_ESNEXT' macro
- remove 5.1 build profile, update test runner accordingly (Note: all builtins are turn on by default)
- move tests from tests/jerry/esnext into tests/jerry, concatenate files with same names
- add skiplist to some snapshot tests that were supported only in 5.1
- fix doxygen issues that were hidden before (bc. of es.next macro)

Co-authored-by: Martin Negyokru negyokru@inf.u-szeged.hu
JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi aszilagy@inf.u-szeged.hu
This commit is contained in:
Szilagyi Adam
2022-01-31 16:46:00 +01:00
committed by GitHub
parent 76403606d0
commit 4924f9fd31
973 changed files with 1902 additions and 8240 deletions
-32
View File
@@ -29,8 +29,6 @@
* @{
*/
#if JERRY_ESNEXT
/**
* Add the "async" literal to the literal pool.
*/
@@ -242,9 +240,7 @@ scanner_check_arrow_arg (parser_context_t *context_p, /**< context */
if (context_p->token.type == LEXER_LEFT_BRACE)
{
#if JERRY_ESNEXT
parser_stack_push_uint8 (context_p, 0);
#endif /* JERRY_ESNEXT */
parser_stack_push_uint8 (context_p, SCAN_STACK_OBJECT_LITERAL);
scanner_context_p->mode = SCAN_MODE_PROPERTY_NAME;
return;
@@ -352,8 +348,6 @@ scanner_check_function_after_if (parser_context_t *context_p, /**< context */
}
} /* scanner_check_function_after_if */
#endif /* JERRY_ESNEXT */
#if JERRY_MODULE_SYSTEM
/**
@@ -378,8 +372,6 @@ scanner_check_import_meta (parser_context_t *context_p) /**< context */
#endif /* JERRY_MODULE_SYSTEM */
#if JERRY_ESNEXT
/**
* Arrow types for scanner_scan_bracket() function.
*/
@@ -390,8 +382,6 @@ typedef enum
SCANNER_SCAN_BRACKET_ARROW_WITH_ONE_ARG, /**< arrow function with one argument */
} scanner_scan_bracket_arrow_type_t;
#endif /* JERRY_ESNEXT */
/**
* Scan bracketed expressions.
*/
@@ -400,19 +390,15 @@ scanner_scan_bracket (parser_context_t *context_p, /**< context */
scanner_context_t *scanner_context_p) /**< scanner context */
{
size_t depth = 0;
#if JERRY_ESNEXT
const uint8_t *arrow_source_p;
const uint8_t *async_source_p = NULL;
scanner_scan_bracket_arrow_type_t arrow_type = SCANNER_SCAN_BRACKET_NO_ARROW;
#endif /* JERRY_ESNEXT */
JERRY_ASSERT (context_p->token.type == LEXER_LEFT_PAREN);
do
{
#if JERRY_ESNEXT
arrow_source_p = context_p->source_p;
#endif /* JERRY_ESNEXT */
depth++;
lexer_next_token (context_p);
} while (context_p->token.type == LEXER_LEFT_PAREN);
@@ -425,13 +411,10 @@ scanner_scan_bracket (parser_context_t *context_p, /**< context */
{
if (context_p->token.lit_location.type != LEXER_IDENT_LITERAL)
{
#if JERRY_ESNEXT
arrow_source_p = NULL;
#endif /* JERRY_ESNEXT */
break;
}
#if JERRY_ESNEXT
const uint8_t *source_p = context_p->source_p;
if (lexer_check_arrow (context_p))
@@ -442,7 +425,6 @@ scanner_scan_bracket (parser_context_t *context_p, /**< context */
}
size_t total_depth = depth;
#endif /* JERRY_ESNEXT */
while (depth > 0 && lexer_check_next_character (context_p, LIT_CHAR_RIGHT_PAREN))
{
@@ -453,19 +435,14 @@ scanner_scan_bracket (parser_context_t *context_p, /**< context */
if (context_p->token.keyword_type == LEXER_KEYW_EVAL
&& lexer_check_next_character (context_p, LIT_CHAR_LEFT_PAREN))
{
#if JERRY_ESNEXT
/* A function call cannot be an eval function. */
arrow_source_p = NULL;
const uint16_t flags = (uint16_t) (SCANNER_LITERAL_POOL_CAN_EVAL | SCANNER_LITERAL_POOL_HAS_SUPER_REFERENCE);
#else /* !JERRY_ESNEXT */
const uint16_t flags = SCANNER_LITERAL_POOL_CAN_EVAL;
#endif /* JERRY_ESNEXT */
scanner_context_p->active_literal_pool_p->status_flags |= flags;
break;
}
#if JERRY_ESNEXT
if (total_depth == depth)
{
if (lexer_check_arrow_param (context_p))
@@ -493,10 +470,8 @@ scanner_scan_bracket (parser_context_t *context_p, /**< context */
}
arrow_source_p = NULL;
#endif /* JERRY_ESNEXT */
break;
}
#if JERRY_ESNEXT
case LEXER_THREE_DOTS:
case LEXER_LEFT_SQUARE:
case LEXER_LEFT_BRACE:
@@ -506,22 +481,17 @@ scanner_scan_bracket (parser_context_t *context_p, /**< context */
depth--;
break;
}
#endif /* JERRY_ESNEXT */
default:
{
#if JERRY_ESNEXT
arrow_source_p = NULL;
#endif /* JERRY_ESNEXT */
break;
}
}
#if JERRY_ESNEXT
if (JERRY_UNLIKELY (scanner_context_p->async_source_p != NULL) && (arrow_source_p == NULL || depth > 0))
{
scanner_context_p->async_source_p = NULL;
}
#endif /* JERRY_ESNEXT */
while (depth > 0)
{
@@ -529,7 +499,6 @@ scanner_scan_bracket (parser_context_t *context_p, /**< context */
depth--;
}
#if JERRY_ESNEXT
if (arrow_source_p != NULL)
{
JERRY_ASSERT (async_source_p == NULL);
@@ -577,7 +546,6 @@ scanner_scan_bracket (parser_context_t *context_p, /**< context */
scanner_context_p->async_source_p = async_source_p;
scanner_check_async_function (context_p, scanner_context_p);
}
#endif /* JERRY_ESNEXT */
} /* scanner_scan_bracket */
/**