Continue replacing duplicate ecma definitions (#4644)
JerryScript-DCO-1.0-Signed-off-by: Bela Toth tbela@inf.u-szeged.hu
This commit is contained in:
@@ -934,7 +934,7 @@ ecma_builtin_array_prototype_object_slice (ecma_value_t arg1, /**< start */
|
||||
/* 10.c.ii */
|
||||
ecma_value_t put_comp;
|
||||
#if JERRY_ESNEXT
|
||||
const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | ECMA_PROP_SHOULD_THROW;
|
||||
const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | JERRY_PROP_SHOULD_THROW;
|
||||
#else /* !JERRY_ESNEXT */
|
||||
const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE;
|
||||
#endif /* JERRY_ESNEXT */
|
||||
@@ -1331,7 +1331,7 @@ ecma_builtin_array_prototype_object_splice (const ecma_value_t args[], /**< argu
|
||||
if (ecma_is_value_found (from_present))
|
||||
{
|
||||
#if JERRY_ESNEXT
|
||||
const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | ECMA_PROP_SHOULD_THROW;
|
||||
const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | JERRY_PROP_SHOULD_THROW;
|
||||
#else /* !JERRY_ESNEXT */
|
||||
const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE;
|
||||
#endif /* JERRY_ESNEXT */
|
||||
@@ -1985,7 +1985,7 @@ ecma_builtin_array_prototype_object_map (ecma_value_t arg1, /**< callbackfn */
|
||||
/* 8.c.iii */
|
||||
ecma_value_t put_comp;
|
||||
#if JERRY_ESNEXT
|
||||
const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | ECMA_PROP_SHOULD_THROW;
|
||||
const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | JERRY_PROP_SHOULD_THROW;
|
||||
#else /* !JERRY_ESNEXT */
|
||||
const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE;
|
||||
#endif /* JERRY_ESNEXT */
|
||||
@@ -2042,7 +2042,7 @@ ecma_builtin_array_prototype_object_filter (ecma_value_t arg1, /**< callbackfn *
|
||||
}
|
||||
|
||||
/* ES11: 22.1.3.7. 7.c.iii.1 */
|
||||
const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | ECMA_PROP_SHOULD_THROW;
|
||||
const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | JERRY_PROP_SHOULD_THROW;
|
||||
#else /* !JERRY_ESNEXT */
|
||||
ecma_object_t *new_array_p = ecma_op_new_array_object (0);
|
||||
|
||||
@@ -2752,7 +2752,7 @@ ecma_builtin_array_flatten_into_array (ecma_value_t target, /**< target will con
|
||||
}
|
||||
|
||||
/* vi. */
|
||||
const uint32_t flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | ECMA_PROP_SHOULD_THROW;
|
||||
const uint32_t flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | JERRY_PROP_SHOULD_THROW;
|
||||
ecma_value_t element_temp = ecma_builtin_helper_def_prop_by_index (ecma_get_object_from_value (target),
|
||||
target_index,
|
||||
element,
|
||||
|
||||
@@ -239,7 +239,7 @@ ecma_builtin_array_object_from (ecma_value_t this_arg, /**< 'this' argument */
|
||||
}
|
||||
|
||||
/* 6.g.ix */
|
||||
const uint32_t flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | ECMA_PROP_SHOULD_THROW;
|
||||
const uint32_t flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | JERRY_PROP_SHOULD_THROW;
|
||||
ecma_value_t set_status = ecma_builtin_helper_def_prop_by_index (array_obj_p, k, mapped_value, flags);
|
||||
|
||||
ecma_free_value (mapped_value);
|
||||
@@ -359,7 +359,7 @@ iterator_cleanup:
|
||||
}
|
||||
|
||||
/* 16.f */
|
||||
const uint32_t flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | ECMA_PROP_SHOULD_THROW;
|
||||
const uint32_t flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | JERRY_PROP_SHOULD_THROW;
|
||||
ecma_value_t set_status = ecma_builtin_helper_def_prop_by_index (array_obj_p, k, mapped_value, flags);
|
||||
|
||||
ecma_free_value (mapped_value);
|
||||
@@ -433,7 +433,7 @@ ecma_builtin_array_object_of (ecma_value_t this_arg, /**< 'this' argument */
|
||||
|
||||
uint32_t k = 0;
|
||||
ecma_object_t *obj_p = ecma_get_object_from_value (ret_val);
|
||||
const uint32_t prop_status_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | ECMA_PROP_SHOULD_THROW;
|
||||
const uint32_t prop_status_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | JERRY_PROP_SHOULD_THROW;
|
||||
|
||||
while (k < arguments_list_len)
|
||||
{
|
||||
|
||||
@@ -346,7 +346,7 @@ ecma_builtin_helper_array_concat_value (ecma_object_t *array_obj_p, /**< array *
|
||||
|
||||
bool spread_object = is_spreadable == ECMA_VALUE_TRUE;
|
||||
/* ES11: 22.1.3.1.5.c.iv.3.b */
|
||||
const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | ECMA_PROP_SHOULD_THROW;
|
||||
const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE | JERRY_PROP_SHOULD_THROW;
|
||||
#else /* !JERRY_ESNEXT */
|
||||
/* ES5.1: 15.4.4.4.5.b.iii.3.b */
|
||||
const uint32_t prop_flags = ECMA_PROPERTY_CONFIGURABLE_ENUMERABLE_WRITABLE;
|
||||
|
||||
@@ -201,7 +201,7 @@ ecma_builtin_object_prototype_object_property_is_enumerable (ecma_object_t *obj_
|
||||
return status;
|
||||
}
|
||||
|
||||
bool is_enumerable = (prop_desc.flags & ECMA_PROP_IS_ENUMERABLE);
|
||||
bool is_enumerable = (prop_desc.flags & JERRY_PROP_IS_ENUMERABLE);
|
||||
|
||||
ecma_free_property_descriptor (&prop_desc);
|
||||
|
||||
@@ -247,21 +247,21 @@ ecma_builtin_object_prototype_define_getter_setter (ecma_value_t this_arg, /**<
|
||||
|
||||
/* 3. */
|
||||
ecma_property_descriptor_t desc = ecma_make_empty_property_descriptor ();
|
||||
desc.flags |= (ECMA_PROP_IS_ENUMERABLE
|
||||
| ECMA_PROP_IS_CONFIGURABLE
|
||||
| ECMA_PROP_IS_ENUMERABLE_DEFINED
|
||||
| ECMA_PROP_IS_CONFIGURABLE_DEFINED
|
||||
| ECMA_PROP_SHOULD_THROW);
|
||||
desc.flags |= (JERRY_PROP_IS_ENUMERABLE
|
||||
| JERRY_PROP_IS_CONFIGURABLE
|
||||
| JERRY_PROP_IS_ENUMERABLE_DEFINED
|
||||
| JERRY_PROP_IS_CONFIGURABLE_DEFINED
|
||||
| JERRY_PROP_SHOULD_THROW);
|
||||
|
||||
if (define_getter)
|
||||
{
|
||||
desc.get_p = accessor_obj_p;
|
||||
desc.flags |= ECMA_PROP_IS_GET_DEFINED;
|
||||
desc.flags |= JERRY_PROP_IS_GET_DEFINED;
|
||||
}
|
||||
else
|
||||
{
|
||||
desc.set_p = accessor_obj_p;
|
||||
desc.flags |= ECMA_PROP_IS_SET_DEFINED;
|
||||
desc.flags |= JERRY_PROP_IS_SET_DEFINED;
|
||||
}
|
||||
|
||||
/* 4. */
|
||||
@@ -345,7 +345,7 @@ ecma_builtin_object_prototype_lookup_getter_setter (ecma_value_t this_arg, /**<
|
||||
/* 3.b */
|
||||
if (ecma_is_value_true (get_desc))
|
||||
{
|
||||
if ((desc.flags & ECMA_PROP_IS_SET_DEFINED) || (desc.flags & ECMA_PROP_IS_GET_DEFINED))
|
||||
if ((desc.flags & JERRY_PROP_IS_SET_DEFINED) || (desc.flags & JERRY_PROP_IS_GET_DEFINED))
|
||||
{
|
||||
if (lookup_getter && desc.get_p != NULL)
|
||||
{
|
||||
|
||||
@@ -370,8 +370,8 @@ ecma_builtin_object_set_integrity_level (ecma_object_t *obj_p, /**< object */
|
||||
continue;
|
||||
}
|
||||
|
||||
prop_desc.flags &= (uint16_t) ~ECMA_PROP_IS_CONFIGURABLE;
|
||||
prop_desc.flags |= ECMA_PROP_SHOULD_THROW;
|
||||
prop_desc.flags &= (uint16_t) ~JERRY_PROP_IS_CONFIGURABLE;
|
||||
prop_desc.flags |= JERRY_PROP_SHOULD_THROW;
|
||||
|
||||
/* 8.a.i */
|
||||
ecma_value_t define_own_prop_ret = ecma_op_object_define_own_property (obj_p,
|
||||
@@ -415,14 +415,14 @@ ecma_builtin_object_set_integrity_level (ecma_object_t *obj_p, /**< object */
|
||||
}
|
||||
|
||||
/* 9.2 */
|
||||
if ((prop_desc.flags & (ECMA_PROP_IS_WRITABLE_DEFINED | ECMA_PROP_IS_WRITABLE))
|
||||
== (ECMA_PROP_IS_WRITABLE_DEFINED | ECMA_PROP_IS_WRITABLE))
|
||||
if ((prop_desc.flags & (JERRY_PROP_IS_WRITABLE_DEFINED | JERRY_PROP_IS_WRITABLE))
|
||||
== (JERRY_PROP_IS_WRITABLE_DEFINED | JERRY_PROP_IS_WRITABLE))
|
||||
{
|
||||
prop_desc.flags &= (uint16_t) ~ECMA_PROP_IS_WRITABLE;
|
||||
prop_desc.flags &= (uint16_t) ~JERRY_PROP_IS_WRITABLE;
|
||||
}
|
||||
|
||||
prop_desc.flags &= (uint16_t) ~ECMA_PROP_IS_CONFIGURABLE;
|
||||
prop_desc.flags |= ECMA_PROP_SHOULD_THROW;
|
||||
prop_desc.flags &= (uint16_t) ~JERRY_PROP_IS_CONFIGURABLE;
|
||||
prop_desc.flags |= JERRY_PROP_SHOULD_THROW;
|
||||
|
||||
/* 9.3 */
|
||||
ecma_value_t define_own_prop_ret = ecma_op_object_define_own_property (obj_p,
|
||||
@@ -628,9 +628,9 @@ ecma_builtin_object_test_integrity_level (ecma_object_t *obj_p, /**< routine's a
|
||||
continue;
|
||||
}
|
||||
|
||||
bool is_writable_data = ((prop_desc.flags & (ECMA_PROP_IS_VALUE_DEFINED | ECMA_PROP_IS_WRITABLE))
|
||||
== (ECMA_PROP_IS_VALUE_DEFINED | ECMA_PROP_IS_WRITABLE));
|
||||
bool is_configurable = (prop_desc.flags & ECMA_PROP_IS_CONFIGURABLE);
|
||||
bool is_writable_data = ((prop_desc.flags & (JERRY_PROP_IS_VALUE_DEFINED | JERRY_PROP_IS_WRITABLE))
|
||||
== (JERRY_PROP_IS_VALUE_DEFINED | JERRY_PROP_IS_WRITABLE));
|
||||
bool is_configurable = (prop_desc.flags & JERRY_PROP_IS_CONFIGURABLE);
|
||||
|
||||
ecma_free_property_descriptor (&prop_desc);
|
||||
|
||||
@@ -868,7 +868,7 @@ ecma_builtin_object_object_define_properties (ecma_object_t *obj_p, /**< routine
|
||||
|
||||
if (ecma_is_value_true (get_desc))
|
||||
{
|
||||
if (prop_desc.flags & ECMA_PROP_IS_ENUMERABLE)
|
||||
if (prop_desc.flags & JERRY_PROP_IS_ENUMERABLE)
|
||||
{
|
||||
ecma_value_t desc_obj = ecma_op_object_get (props_p, prop_name_p);
|
||||
|
||||
@@ -881,7 +881,7 @@ ecma_builtin_object_object_define_properties (ecma_object_t *obj_p, /**< routine
|
||||
ecma_value_t conv_result = ecma_op_to_property_descriptor (desc_obj,
|
||||
&property_descriptors[property_descriptor_number]);
|
||||
|
||||
property_descriptors[property_descriptor_number].flags |= ECMA_PROP_SHOULD_THROW;
|
||||
property_descriptors[property_descriptor_number].flags |= JERRY_PROP_SHOULD_THROW;
|
||||
|
||||
ecma_free_value (desc_obj);
|
||||
|
||||
@@ -1009,7 +1009,7 @@ ecma_builtin_object_object_define_property (ecma_object_t *obj_p, /**< routine's
|
||||
return conv_result;
|
||||
}
|
||||
|
||||
prop_desc.flags |= ECMA_PROP_SHOULD_THROW;
|
||||
prop_desc.flags |= JERRY_PROP_SHOULD_THROW;
|
||||
|
||||
ecma_value_t define_own_prop_ret = ecma_op_object_define_own_property (obj_p,
|
||||
name_str_p,
|
||||
@@ -1107,9 +1107,9 @@ ecma_builtin_object_object_assign (ecma_object_t *target_p, /**< target object *
|
||||
}
|
||||
|
||||
/* 5.c.iii */
|
||||
if ((prop_desc.flags & ECMA_PROP_IS_ENUMERABLE)
|
||||
&& (((prop_desc.flags & ECMA_PROP_IS_VALUE_DEFINED) && !ecma_is_value_undefined (prop_desc.value))
|
||||
|| (prop_desc.flags & ECMA_PROP_IS_GET_DEFINED)))
|
||||
if ((prop_desc.flags & JERRY_PROP_IS_ENUMERABLE)
|
||||
&& (((prop_desc.flags & JERRY_PROP_IS_VALUE_DEFINED) && !ecma_is_value_undefined (prop_desc.value))
|
||||
|| (prop_desc.flags & JERRY_PROP_IS_GET_DEFINED)))
|
||||
{
|
||||
/* 5.c.iii.1 */
|
||||
ecma_value_t prop_value = ecma_op_object_get (from_obj_p, property_name_p);
|
||||
|
||||
@@ -310,7 +310,7 @@ ecma_builtin_regexp_prototype_compile (ecma_value_t this_arg, /**< this */
|
||||
ecma_value_t status = ecma_builtin_helper_def_prop (this_obj_p,
|
||||
ecma_get_magic_string (LIT_MAGIC_STRING_LASTINDEX_UL),
|
||||
ecma_make_uint32_value (0),
|
||||
ECMA_PROPERTY_FLAG_WRITABLE | ECMA_PROP_SHOULD_THROW);
|
||||
ECMA_PROPERTY_FLAG_WRITABLE | JERRY_PROP_SHOULD_THROW);
|
||||
|
||||
ecma_bytecode_deref ((ecma_compiled_code_t *) old_bc_p);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user