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:
@@ -275,22 +275,22 @@ void
|
||||
re_append_char (re_compiler_ctx_t *re_ctx_p, /**< RegExp bytecode context */
|
||||
const lit_code_point_t cp) /**< code point */
|
||||
{
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
const size_t size = (re_ctx_p->flags & RE_FLAG_UNICODE) ? sizeof (lit_code_point_t) : sizeof (ecma_char_t);
|
||||
#else /* !ENABLED (JERRY_ES2015) */
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
JERRY_UNUSED (re_ctx_p);
|
||||
const size_t size = sizeof (ecma_char_t);
|
||||
#endif /* !ENABLED (JERRY_ES2015) */
|
||||
#endif /* !ENABLED (JERRY_ESNEXT) */
|
||||
|
||||
uint8_t *dest_p = re_bytecode_reserve (re_ctx_p, size);
|
||||
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
if (re_ctx_p->flags & RE_FLAG_UNICODE)
|
||||
{
|
||||
re_encode_u32 (dest_p, cp);
|
||||
return;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
|
||||
JERRY_ASSERT (cp <= LIT_UTF16_CODE_UNIT_MAX);
|
||||
re_encode_u16 (dest_p, (ecma_char_t) cp);
|
||||
@@ -304,22 +304,22 @@ re_insert_char (re_compiler_ctx_t *re_ctx_p, /**< RegExp bytecode context */
|
||||
const uint32_t offset, /**< bytecode offset */
|
||||
const lit_code_point_t cp) /**< code point*/
|
||||
{
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
const size_t size = (re_ctx_p->flags & RE_FLAG_UNICODE) ? sizeof (lit_code_point_t) : sizeof (ecma_char_t);
|
||||
#else /* !ENABLED (JERRY_ES2015) */
|
||||
#else /* !ENABLED (JERRY_ESNEXT) */
|
||||
JERRY_UNUSED (re_ctx_p);
|
||||
const size_t size = sizeof (ecma_char_t);
|
||||
#endif /* !ENABLED (JERRY_ES2015) */
|
||||
#endif /* !ENABLED (JERRY_ESNEXT) */
|
||||
|
||||
uint8_t *dest_p = re_bytecode_insert (re_ctx_p, offset, size);
|
||||
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
if (re_ctx_p->flags & RE_FLAG_UNICODE)
|
||||
{
|
||||
re_encode_u32 (dest_p, cp);
|
||||
return;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
|
||||
JERRY_ASSERT (cp <= LIT_UTF16_CODE_UNIT_MAX);
|
||||
re_encode_u16 (dest_p, (ecma_char_t) cp);
|
||||
@@ -336,16 +336,16 @@ re_get_char (const uint8_t **bc_p, /**< reference to bytecode pointer */
|
||||
{
|
||||
lit_code_point_t cp;
|
||||
|
||||
#if !ENABLED (JERRY_ES2015)
|
||||
#if !ENABLED (JERRY_ESNEXT)
|
||||
JERRY_UNUSED (unicode);
|
||||
#else /* ENABLED (JERRY_ES2015) */
|
||||
#else /* ENABLED (JERRY_ESNEXT) */
|
||||
if (unicode)
|
||||
{
|
||||
cp = re_decode_u32 (*bc_p);
|
||||
*bc_p += sizeof (lit_code_point_t);
|
||||
}
|
||||
else
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
{
|
||||
cp = re_decode_u16 (*bc_p);
|
||||
*bc_p += sizeof (ecma_char_t);
|
||||
@@ -592,13 +592,13 @@ re_dump_bytecode (re_compiler_ctx_t *re_ctx_p) /**< RegExp bytecode context */
|
||||
JERRY_DEBUG_MSG ("\n");
|
||||
break;
|
||||
}
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
#if ENABLED (JERRY_ESNEXT)
|
||||
case RE_OP_UNICODE_PERIOD:
|
||||
{
|
||||
JERRY_DEBUG_MSG ("UNICODE_PERIOD\n");
|
||||
break;
|
||||
}
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
#endif /* ENABLED (JERRY_ESNEXT) */
|
||||
case RE_OP_PERIOD:
|
||||
{
|
||||
JERRY_DEBUG_MSG ("PERIOD\n");
|
||||
|
||||
Reference in New Issue
Block a user