Re-target for ES.Next (#3901)
A list of changes: - 'es2015-subset' profile is deprecated, and an 'es.next' profile is added. - The default profile is changed to 'es.next' - Renamed the JERRY_ES2015 guard to JERRY_ESNEXT - Renamed JERRY_ES2015_BUILTIN_* guards to JERRY_BUILTIN_* - Moved es2015 specific tests to a new 'es.next' subdirectory - Updated docs, targets, and test runners to reflect these changes Resolves #3737. JerryScript-DCO-1.0-Signed-off-by: Dániel Bátyai dbatyai@inf.u-szeged.hu
This commit is contained in:
@@ -39,18 +39,18 @@ typedef enum
|
||||
SCANNER_TYPE_WHILE, /**< while statement */
|
||||
SCANNER_TYPE_FOR, /**< for statement */
|
||||
SCANNER_TYPE_FOR_IN, /**< for-in statement */
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
SCANNER_TYPE_FOR_OF, /**< for-of statement */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
SCANNER_TYPE_SWITCH, /**< switch statement */
|
||||
SCANNER_TYPE_CASE, /**< case statement */
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
SCANNER_TYPE_INITIALIZER, /**< destructuring binding or assignment pattern with initializer */
|
||||
SCANNER_TYPE_CLASS_CONSTRUCTOR, /**< class constructor */
|
||||
SCANNER_TYPE_LET_EXPRESSION, /**< let expression */
|
||||
SCANNER_TYPE_ERR_REDECLARED, /**< syntax error: a variable is redeclared */
|
||||
SCANNER_TYPE_ERR_ASYNC_FUNCTION, /**< an invalid async function follows */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
} scanner_info_type_t;
|
||||
|
||||
/**
|
||||
@@ -146,30 +146,30 @@ typedef enum
|
||||
SCANNER_STREAM_TYPE_END, /**< end of scanner data */
|
||||
SCANNER_STREAM_TYPE_HOLE, /**< no name is assigned to this argument */
|
||||
SCANNER_STREAM_TYPE_VAR, /**< var declaration */
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
SCANNER_STREAM_TYPE_LET, /**< let declaration */
|
||||
SCANNER_STREAM_TYPE_CONST, /**< const declaration */
|
||||
SCANNER_STREAM_TYPE_LOCAL, /**< local declaration (e.g. catch block) */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
#if ENABLED (JERRY_ES2015_MODULE_SYSTEM)
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
#if ENABLED (JERRY_MODULE_SYSTEM)
|
||||
SCANNER_STREAM_TYPE_IMPORT, /**< module import */
|
||||
#endif /* ENABLED (JERRY_ES2015_MODULE_SYSTEM) */
|
||||
#endif /* ENABLED (JERRY_MODULE_SYSTEM) */
|
||||
/* The next four types must be in this order (see SCANNER_STREAM_TYPE_IS_ARG). */
|
||||
SCANNER_STREAM_TYPE_ARG, /**< argument declaration */
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
SCANNER_STREAM_TYPE_ARG_VAR, /**< argument declaration which is later copied
|
||||
* into a variable declared by var statement */
|
||||
SCANNER_STREAM_TYPE_DESTRUCTURED_ARG, /**< destructuring argument declaration */
|
||||
SCANNER_STREAM_TYPE_DESTRUCTURED_ARG_VAR, /**< destructuring argument declaration which is later
|
||||
* copied into a variable declared by var statement */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
/* Function types should be at the end. See the SCANNER_STREAM_TYPE_IS_FUNCTION macro. */
|
||||
SCANNER_STREAM_TYPE_ARG_FUNC, /**< argument declaration which
|
||||
* is later initialized with a function */
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
SCANNER_STREAM_TYPE_DESTRUCTURED_ARG_FUNC, /**< destructuring argument declaration which
|
||||
* is later initialized with a function */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
SCANNER_STREAM_TYPE_FUNC, /**< function declaration */
|
||||
} scanner_compressed_stream_types_t;
|
||||
|
||||
@@ -183,7 +183,7 @@ typedef enum
|
||||
*/
|
||||
#define SCANNER_STREAM_TYPE_IS_FUNCTION(type) ((type) >= SCANNER_STREAM_TYPE_ARG_FUNC)
|
||||
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
|
||||
/**
|
||||
* Checks whether the decoded type represents a function argument.
|
||||
@@ -197,7 +197,7 @@ typedef enum
|
||||
#define SCANNER_STREAM_TYPE_IS_ARG_FUNC(type) \
|
||||
((type) == SCANNER_STREAM_TYPE_ARG_FUNC || (type) == SCANNER_STREAM_TYPE_DESTRUCTURED_ARG_FUNC)
|
||||
|
||||
#else /* !ENABLED (JERRY_ES2015) */
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
|
||||
/**
|
||||
* Checks whether the decoded type represents a function argument.
|
||||
@@ -209,7 +209,7 @@ typedef enum
|
||||
*/
|
||||
#define SCANNER_STREAM_TYPE_IS_ARG_FUNC(type) ((type) == SCANNER_STREAM_TYPE_ARG_FUNC)
|
||||
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
|
||||
/**
|
||||
* Constants for u8_arg flags in scanner_function_info_t.
|
||||
@@ -218,12 +218,12 @@ typedef enum
|
||||
{
|
||||
SCANNER_FUNCTION_ARGUMENTS_NEEDED = (1 << 0), /**< arguments object needs to be created */
|
||||
SCANNER_FUNCTION_MAPPED_ARGUMENTS = (1 << 1), /**< arguments object should be mapped */
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
SCANNER_FUNCTION_LEXICAL_ENV_NEEDED = (1 << 2), /**< lexical environment is needed for the function body */
|
||||
SCANNER_FUNCTION_STATEMENT = (1 << 3), /**< function is function statement (not arrow expression)
|
||||
* this flag must be combined with the type of function (e.g. async) */
|
||||
SCANNER_FUNCTION_ASYNC = (1 << 4), /**< function is async function */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
} scanner_function_flags_t;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user