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:
@@ -49,13 +49,9 @@ ecma_builtin_regexp_dispatch_helper (const ecma_value_t *arguments_list_p, /**<
|
||||
{
|
||||
ecma_value_t pattern_value = ECMA_VALUE_UNDEFINED;
|
||||
ecma_value_t flags_value = ECMA_VALUE_UNDEFINED;
|
||||
#if JERRY_ESNEXT
|
||||
bool create_regexp_from_bc = false;
|
||||
bool free_arguments = false;
|
||||
ecma_object_t *new_target_p = JERRY_CONTEXT (current_new_target_p);
|
||||
#else /* !JERRY_ESNEXT */
|
||||
ecma_object_t *new_target_p = NULL;
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
if (arguments_list_len > 0)
|
||||
{
|
||||
@@ -68,7 +64,6 @@ ecma_builtin_regexp_dispatch_helper (const ecma_value_t *arguments_list_p, /**<
|
||||
}
|
||||
}
|
||||
|
||||
#if JERRY_ESNEXT
|
||||
ecma_value_t regexp_value = ecma_op_is_regexp (pattern_value);
|
||||
|
||||
if (ECMA_IS_VALUE_ERROR (regexp_value))
|
||||
@@ -144,31 +139,18 @@ ecma_builtin_regexp_dispatch_helper (const ecma_value_t *arguments_list_p, /**<
|
||||
|
||||
free_arguments = true;
|
||||
}
|
||||
#else /* !JERRY_ESNEXT */
|
||||
if (ecma_object_is_regexp_object (pattern_value))
|
||||
{
|
||||
if (ecma_is_value_undefined (flags_value))
|
||||
{
|
||||
return ecma_copy_value (pattern_value);
|
||||
}
|
||||
|
||||
return ecma_raise_type_error (ECMA_ERR_INVALID_ARGUMENT_IS_PASSED_TO_REGEXP_FUNCTION);
|
||||
}
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
ecma_value_t ret_value = ECMA_VALUE_ERROR;
|
||||
ecma_object_t *new_target_obj_p = ecma_op_regexp_alloc (new_target_p);
|
||||
|
||||
if (JERRY_LIKELY (new_target_obj_p != NULL))
|
||||
{
|
||||
#if JERRY_ESNEXT
|
||||
if (create_regexp_from_bc)
|
||||
{
|
||||
ret_value = ecma_op_create_regexp_from_bytecode (new_target_obj_p, bc_p);
|
||||
JERRY_ASSERT (!ECMA_IS_VALUE_ERROR (ret_value));
|
||||
}
|
||||
else
|
||||
#endif /* JERRY_ESNEXT */
|
||||
{
|
||||
ret_value = ecma_op_create_regexp_from_pattern (new_target_obj_p, pattern_value, flags_value);
|
||||
|
||||
@@ -179,13 +161,11 @@ ecma_builtin_regexp_dispatch_helper (const ecma_value_t *arguments_list_p, /**<
|
||||
}
|
||||
}
|
||||
|
||||
#if JERRY_ESNEXT
|
||||
if (free_arguments)
|
||||
{
|
||||
ecma_free_value (pattern_value);
|
||||
ecma_free_value (flags_value);
|
||||
}
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
return ret_value;
|
||||
} /* ecma_builtin_regexp_dispatch_helper */
|
||||
@@ -216,7 +196,6 @@ ecma_builtin_regexp_dispatch_construct (const ecma_value_t *arguments_list_p, /*
|
||||
return ecma_builtin_regexp_dispatch_helper (arguments_list_p, arguments_list_len);
|
||||
} /* ecma_builtin_regexp_dispatch_construct */
|
||||
|
||||
#if JERRY_ESNEXT
|
||||
/**
|
||||
* 21.2.4.2 get RegExp [ @@species ] accessor
|
||||
*
|
||||
@@ -228,7 +207,6 @@ ecma_builtin_regexp_species_get (ecma_value_t this_value) /**< This Value */
|
||||
{
|
||||
return ecma_copy_value (this_value);
|
||||
} /* ecma_builtin_regexp_species_get */
|
||||
#endif /* JERRY_ESNEXT */
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
Reference in New Issue
Block a user