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:
Tóth Béla 2021-04-19 13:44:01 +02:00 committed by GitHub
parent 1f2a8d4ac1
commit cc1a263657
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 231 additions and 262 deletions

View File

@ -53,19 +53,6 @@
JERRY_STATIC_ASSERT (sizeof (jerry_value_t) == sizeof (ecma_value_t),
size_of_jerry_value_t_must_be_equal_to_size_of_ecma_value_t);
JERRY_STATIC_ASSERT ((int) JERRY_PROP_NO_OPTS == (int) ECMA_PROP_NO_OPTS
&& (int) JERRY_PROP_IS_CONFIGURABLE == (int) ECMA_PROP_IS_CONFIGURABLE
&& (int) JERRY_PROP_IS_ENUMERABLE == (int) ECMA_PROP_IS_ENUMERABLE
&& (int) JERRY_PROP_IS_WRITABLE == (int) ECMA_PROP_IS_WRITABLE
&& (int) JERRY_PROP_IS_CONFIGURABLE_DEFINED == (int) ECMA_PROP_IS_CONFIGURABLE_DEFINED
&& (int) JERRY_PROP_IS_ENUMERABLE_DEFINED == (int) ECMA_PROP_IS_ENUMERABLE_DEFINED
&& (int) JERRY_PROP_IS_WRITABLE_DEFINED == (int) ECMA_PROP_IS_WRITABLE_DEFINED
&& (int) JERRY_PROP_IS_VALUE_DEFINED == (int) ECMA_PROP_IS_VALUE_DEFINED
&& (int) JERRY_PROP_IS_GET_DEFINED == (int) ECMA_PROP_IS_GET_DEFINED
&& (int) JERRY_PROP_IS_SET_DEFINED == (int) ECMA_PROP_IS_SET_DEFINED
&& (int) JERRY_PROP_SHOULD_THROW == (int) ECMA_PROP_SHOULD_THROW,
jerry_prop_desc_flags_must_be_equal_to_ecma_prop_desc_flags);
JERRY_STATIC_ASSERT ((int) ECMA_PARSE_STRICT_MODE == (int) JERRY_PARSE_STRICT_MODE
&& (int) ECMA_PARSE_MODULE == (int) JERRY_PARSE_MODULE
&& (int) ECMA_PARSE_HAS_RESOURCE == (int) JERRY_PARSE_HAS_RESOURCE
@ -3665,7 +3652,7 @@ jerry_property_descriptor_from_ecma (const ecma_property_descriptor_t *prop_desc
prop_desc.value = prop_desc_p->value;
}
if (prop_desc_p->flags & ECMA_PROP_IS_GET_DEFINED)
if (prop_desc_p->flags & JERRY_PROP_IS_GET_DEFINED)
{
prop_desc.getter = ECMA_VALUE_NULL;
@ -3676,7 +3663,7 @@ jerry_property_descriptor_from_ecma (const ecma_property_descriptor_t *prop_desc
}
}
if (prop_desc_p->flags & ECMA_PROP_IS_SET_DEFINED)
if (prop_desc_p->flags & JERRY_PROP_IS_SET_DEFINED)
{
prop_desc.setter = ECMA_VALUE_NULL;
@ -3771,7 +3758,7 @@ jerry_property_descriptor_to_ecma (const jerry_property_descriptor_t *prop_desc_
return prop_desc;
}
prop_desc.flags |= (uint16_t) (prop_desc_p->flags | ECMA_PROP_SHOULD_THROW);
prop_desc.flags |= (uint16_t) (prop_desc_p->flags | JERRY_PROP_SHOULD_THROW);
return prop_desc;
} /* jerry_property_descriptor_to_ecma */
@ -3870,10 +3857,10 @@ jerry_get_own_property_descriptor (const jerry_value_t obj_val, /**< object val
}
/* The flags are always filled in the returned descriptor. */
JERRY_ASSERT ((prop_desc.flags & ECMA_PROP_IS_CONFIGURABLE_DEFINED)
&& (prop_desc.flags & ECMA_PROP_IS_ENUMERABLE_DEFINED)
&& ((prop_desc.flags & ECMA_PROP_IS_WRITABLE_DEFINED)
|| !(prop_desc.flags & ECMA_PROP_IS_VALUE_DEFINED)));
JERRY_ASSERT ((prop_desc.flags & JERRY_PROP_IS_CONFIGURABLE_DEFINED)
&& (prop_desc.flags & JERRY_PROP_IS_ENUMERABLE_DEFINED)
&& ((prop_desc.flags & JERRY_PROP_IS_WRITABLE_DEFINED)
|| !(prop_desc.flags & JERRY_PROP_IS_VALUE_DEFINED)));
prop_desc_p->flags = prop_desc.flags;
prop_desc_p->value = ECMA_VALUE_UNDEFINED;
@ -4518,11 +4505,11 @@ jerry_object_get_property_names (const jerry_value_t obj_val, /**< object */
uint16_t flags = prop_desc.flags;
ecma_free_property_descriptor (&prop_desc);
if ((!(flags & ECMA_PROP_IS_CONFIGURABLE)
if ((!(flags & JERRY_PROP_IS_CONFIGURABLE)
&& (filter & JERRY_PROPERTY_FILTER_EXLCUDE_NON_CONFIGURABLE))
|| (!(flags & ECMA_PROP_IS_ENUMERABLE)
|| (!(flags & JERRY_PROP_IS_ENUMERABLE)
&& (filter & JERRY_PROPERTY_FILTER_EXLCUDE_NON_ENUMERABLE))
|| (!(flags & ECMA_PROP_IS_WRITABLE)
|| (!(flags & JERRY_PROP_IS_WRITABLE)
&& (filter & JERRY_PROPERTY_FILTER_EXLCUDE_NON_WRITABLE)))
{
continue;

View File

@ -1302,24 +1302,6 @@ typedef struct
#endif /* JERRY_BUILTIN_CONTAINER */
typedef enum
{
ECMA_PROP_NO_OPTS = (0), /** empty property descriptor */
ECMA_PROP_IS_CONFIGURABLE = (1 << 0), /** [[Configurable]] */
ECMA_PROP_IS_ENUMERABLE = (1 << 1), /** [[Enumerable]] */
ECMA_PROP_IS_WRITABLE = (1 << 2), /** [[Writable]] */
ECMA_PROP_IS_CONFIGURABLE_DEFINED = (1 << 3), /** is [[Configurable]] defined? */
ECMA_PROP_IS_ENUMERABLE_DEFINED = (1 << 4), /** is [[Enumerable]] defined? */
ECMA_PROP_IS_WRITABLE_DEFINED = (1 << 5), /** is [[Writable]] defined? */
ECMA_PROP_IS_VALUE_DEFINED = (1 << 6), /** is [[Value]] defined? */
ECMA_PROP_IS_GET_DEFINED = (1 << 7), /** is [[Get]] defined? */
ECMA_PROP_IS_SET_DEFINED = (1 << 8), /** is [[Set]] defined? */
ECMA_PROP_SHOULD_THROW = (1 << 9), /** should throw on error, instead of returning with false */
} ecma_property_descriptor_status_flags_t;
/**
* Description of ECMA property descriptor
*
@ -1355,17 +1337,17 @@ typedef struct
* - is_value_defined : true
* - is_configurable_defined, is_writable_defined, is_enumerable_defined : true
*/
#define ECMA_NAME_DATA_PROPERTY_DESCRIPTOR_BITS ((uint16_t) (ECMA_PROP_IS_VALUE_DEFINED \
| ECMA_PROP_IS_CONFIGURABLE_DEFINED \
| ECMA_PROP_IS_ENUMERABLE_DEFINED \
| ECMA_PROP_IS_WRITABLE_DEFINED))
#define ECMA_NAME_DATA_PROPERTY_DESCRIPTOR_BITS ((uint16_t) (JERRY_PROP_IS_VALUE_DEFINED \
| JERRY_PROP_IS_CONFIGURABLE_DEFINED \
| JERRY_PROP_IS_ENUMERABLE_DEFINED \
| JERRY_PROP_IS_WRITABLE_DEFINED))
/**
* Bitmask to get a the physical property flags from an ecma_property_descriptor
*/
#define ECMA_PROPERTY_FLAGS_MASK ((uint16_t) (ECMA_PROP_IS_CONFIGURABLE \
| ECMA_PROP_IS_ENUMERABLE \
| ECMA_PROP_IS_WRITABLE))
#define ECMA_PROPERTY_FLAGS_MASK ((uint16_t) (JERRY_PROP_IS_CONFIGURABLE \
| JERRY_PROP_IS_ENUMERABLE \
| JERRY_PROP_IS_WRITABLE))
#if !JERRY_NUMBER_TYPE_FLOAT64
/**

View File

@ -1257,18 +1257,18 @@ ecma_make_empty_property_descriptor (void)
void
ecma_free_property_descriptor (ecma_property_descriptor_t *prop_desc_p) /**< property descriptor */
{
if (prop_desc_p->flags & ECMA_PROP_IS_VALUE_DEFINED)
if (prop_desc_p->flags & JERRY_PROP_IS_VALUE_DEFINED)
{
ecma_free_value (prop_desc_p->value);
}
if ((prop_desc_p->flags & ECMA_PROP_IS_GET_DEFINED)
if ((prop_desc_p->flags & JERRY_PROP_IS_GET_DEFINED)
&& prop_desc_p->get_p != NULL)
{
ecma_deref_object (prop_desc_p->get_p);
}
if ((prop_desc_p->flags & ECMA_PROP_IS_SET_DEFINED)
if ((prop_desc_p->flags & JERRY_PROP_IS_SET_DEFINED)
&& prop_desc_p->set_p != NULL)
{
ecma_deref_object (prop_desc_p->set_p);

View File

@ -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,

View File

@ -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)
{

View File

@ -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;

View File

@ -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)
{

View File

@ -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);

View File

@ -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);

View File

@ -185,14 +185,14 @@ ecma_op_arguments_object_define_own_property (ecma_object_t *object_p, /**< the
if (!ecma_is_value_empty (argv_p[index]))
{
if (property_desc_p->flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED))
if (property_desc_p->flags & (JERRY_PROP_IS_GET_DEFINED | JERRY_PROP_IS_SET_DEFINED))
{
ecma_free_value_if_not_object (argv_p[index]);
argv_p[index] = ECMA_VALUE_EMPTY;
}
else
{
if (property_desc_p->flags & ECMA_PROP_IS_VALUE_DEFINED)
if (property_desc_p->flags & JERRY_PROP_IS_VALUE_DEFINED)
{
ecma_string_t *name_p = ecma_op_arguments_object_get_formal_parameter (mapped_arguments_p, index);
ecma_object_t *lex_env_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_object_t, mapped_arguments_p->lex_env);
@ -205,8 +205,8 @@ ecma_op_arguments_object_define_own_property (ecma_object_t *object_p, /**< the
JERRY_ASSERT (ecma_is_value_empty (completion));
}
if ((property_desc_p->flags & ECMA_PROP_IS_WRITABLE_DEFINED)
&& !(property_desc_p->flags & ECMA_PROP_IS_WRITABLE))
if ((property_desc_p->flags & JERRY_PROP_IS_WRITABLE_DEFINED)
&& !(property_desc_p->flags & JERRY_PROP_IS_WRITABLE))
{
ecma_free_value_if_not_object (argv_p[index]);
argv_p[index] = ECMA_VALUE_EMPTY;

View File

@ -1000,10 +1000,10 @@ ecma_op_array_object_set_length (ecma_object_t *object_p, /**< the array object
}
/* Only the writable and data properties can be modified. */
if (flags & (ECMA_PROP_IS_CONFIGURABLE
| ECMA_PROP_IS_ENUMERABLE
| ECMA_PROP_IS_GET_DEFINED
| ECMA_PROP_IS_SET_DEFINED))
if (flags & (JERRY_PROP_IS_CONFIGURABLE
| JERRY_PROP_IS_ENUMERABLE
| JERRY_PROP_IS_GET_DEFINED
| JERRY_PROP_IS_SET_DEFINED))
{
return ecma_raise_property_redefinition (ecma_get_magic_string (LIT_MAGIC_STRING_LENGTH), flags);
}
@ -1015,9 +1015,9 @@ ecma_op_array_object_set_length (ecma_object_t *object_p, /**< the array object
if (new_len_num == old_len_uint32)
{
/* Only the writable flag must be updated. */
if (flags & ECMA_PROP_IS_WRITABLE_DEFINED)
if (flags & JERRY_PROP_IS_WRITABLE_DEFINED)
{
if (!(flags & ECMA_PROP_IS_WRITABLE))
if (!(flags & JERRY_PROP_IS_WRITABLE))
{
if (ecma_op_array_is_fast_array (ext_object_p))
{
@ -1051,8 +1051,8 @@ ecma_op_array_object_set_length (ecma_object_t *object_p, /**< the array object
ext_object_p->u.array.length = current_len_uint32;
if ((flags & ECMA_PROP_IS_WRITABLE_DEFINED)
&& !(flags & ECMA_PROP_IS_WRITABLE))
if ((flags & JERRY_PROP_IS_WRITABLE_DEFINED)
&& !(flags & JERRY_PROP_IS_WRITABLE))
{
if (ecma_op_array_is_fast_array (ext_object_p))
{
@ -1075,13 +1075,13 @@ ecma_op_array_object_set_length (ecma_object_t *object_p, /**< the array object
* If the property desciptor fields contains all the flags below
* attempt to stay fast access array during [[DefineOwnProperty]] operation.
*/
#define ECMA_FAST_ARRAY_DATA_PROP_FLAGS (ECMA_PROP_IS_VALUE_DEFINED \
| ECMA_PROP_IS_ENUMERABLE_DEFINED \
| ECMA_PROP_IS_ENUMERABLE \
| ECMA_PROP_IS_CONFIGURABLE_DEFINED \
| ECMA_PROP_IS_CONFIGURABLE \
| ECMA_PROP_IS_WRITABLE_DEFINED \
| ECMA_PROP_IS_WRITABLE)
#define ECMA_FAST_ARRAY_DATA_PROP_FLAGS (JERRY_PROP_IS_VALUE_DEFINED \
| JERRY_PROP_IS_ENUMERABLE_DEFINED \
| JERRY_PROP_IS_ENUMERABLE \
| JERRY_PROP_IS_CONFIGURABLE_DEFINED \
| JERRY_PROP_IS_CONFIGURABLE \
| JERRY_PROP_IS_WRITABLE_DEFINED \
| JERRY_PROP_IS_WRITABLE)
/**
* [[DefineOwnProperty]] ecma array object's operation
@ -1100,14 +1100,14 @@ ecma_op_array_object_define_own_property (ecma_object_t *object_p, /**< the arra
{
if (ecma_string_is_length (property_name_p))
{
JERRY_ASSERT ((property_desc_p->flags & ECMA_PROP_IS_CONFIGURABLE_DEFINED)
|| !(property_desc_p->flags & ECMA_PROP_IS_CONFIGURABLE));
JERRY_ASSERT ((property_desc_p->flags & ECMA_PROP_IS_ENUMERABLE_DEFINED)
|| !(property_desc_p->flags & ECMA_PROP_IS_ENUMERABLE));
JERRY_ASSERT ((property_desc_p->flags & ECMA_PROP_IS_WRITABLE_DEFINED)
|| !(property_desc_p->flags & ECMA_PROP_IS_WRITABLE));
JERRY_ASSERT ((property_desc_p->flags & JERRY_PROP_IS_CONFIGURABLE_DEFINED)
|| !(property_desc_p->flags & JERRY_PROP_IS_CONFIGURABLE));
JERRY_ASSERT ((property_desc_p->flags & JERRY_PROP_IS_ENUMERABLE_DEFINED)
|| !(property_desc_p->flags & JERRY_PROP_IS_ENUMERABLE));
JERRY_ASSERT ((property_desc_p->flags & JERRY_PROP_IS_WRITABLE_DEFINED)
|| !(property_desc_p->flags & JERRY_PROP_IS_WRITABLE));
if (property_desc_p->flags & ECMA_PROP_IS_VALUE_DEFINED)
if (property_desc_p->flags & JERRY_PROP_IS_VALUE_DEFINED)
{
return ecma_op_array_object_set_length (object_p, property_desc_p->value, property_desc_p->flags);
}
@ -1165,7 +1165,7 @@ ecma_op_array_object_define_own_property (ecma_object_t *object_p, /**< the arra
ecma_property_descriptor_t prop_desc;
prop_desc = *property_desc_p;
prop_desc.flags &= (uint16_t) ~ECMA_PROP_SHOULD_THROW;
prop_desc.flags &= (uint16_t) ~JERRY_PROP_SHOULD_THROW;
ecma_value_t completition = ecma_op_general_object_define_own_property (object_p,
property_name_p,

View File

@ -610,20 +610,20 @@ ecma_op_from_property_descriptor (const ecma_property_descriptor_t *src_prop_des
ecma_value_t completion;
ecma_property_descriptor_t prop_desc = ecma_make_empty_property_descriptor ();
{
prop_desc.flags = (ECMA_PROP_IS_VALUE_DEFINED
| ECMA_PROP_IS_WRITABLE_DEFINED
| ECMA_PROP_IS_WRITABLE
| ECMA_PROP_IS_ENUMERABLE_DEFINED
| ECMA_PROP_IS_ENUMERABLE
| ECMA_PROP_IS_CONFIGURABLE_DEFINED
| ECMA_PROP_IS_CONFIGURABLE);
prop_desc.flags = (JERRY_PROP_IS_VALUE_DEFINED
| JERRY_PROP_IS_WRITABLE_DEFINED
| JERRY_PROP_IS_WRITABLE
| JERRY_PROP_IS_ENUMERABLE_DEFINED
| JERRY_PROP_IS_ENUMERABLE
| JERRY_PROP_IS_CONFIGURABLE_DEFINED
| JERRY_PROP_IS_CONFIGURABLE);
}
/* 3. */
if (src_prop_desc_p->flags & (ECMA_PROP_IS_VALUE_DEFINED | ECMA_PROP_IS_WRITABLE_DEFINED))
if (src_prop_desc_p->flags & (JERRY_PROP_IS_VALUE_DEFINED | JERRY_PROP_IS_WRITABLE_DEFINED))
{
JERRY_ASSERT ((prop_desc.flags & (ECMA_PROP_IS_VALUE_DEFINED | ECMA_PROP_IS_WRITABLE_DEFINED))
== (ECMA_PROP_IS_VALUE_DEFINED | ECMA_PROP_IS_WRITABLE_DEFINED));
JERRY_ASSERT ((prop_desc.flags & (JERRY_PROP_IS_VALUE_DEFINED | JERRY_PROP_IS_WRITABLE_DEFINED))
== (JERRY_PROP_IS_VALUE_DEFINED | JERRY_PROP_IS_WRITABLE_DEFINED));
/* a. */
prop_desc.value = src_prop_desc_p->value;
@ -634,7 +634,7 @@ ecma_op_from_property_descriptor (const ecma_property_descriptor_t *src_prop_des
JERRY_ASSERT (ecma_is_value_true (completion));
/* b. */
prop_desc.value = ecma_make_boolean_value (src_prop_desc_p->flags & ECMA_PROP_IS_WRITABLE);
prop_desc.value = ecma_make_boolean_value (src_prop_desc_p->flags & JERRY_PROP_IS_WRITABLE);
completion = ecma_op_object_define_own_property (obj_p,
ecma_get_magic_string (LIT_MAGIC_STRING_WRITABLE),
@ -644,9 +644,9 @@ ecma_op_from_property_descriptor (const ecma_property_descriptor_t *src_prop_des
else
{
#if !JERRY_ESNEXT
JERRY_ASSERT (src_prop_desc_p->flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED));
JERRY_ASSERT (src_prop_desc_p->flags & (JERRY_PROP_IS_GET_DEFINED | JERRY_PROP_IS_SET_DEFINED));
#else /* JERRY_ESNEXT */
if (src_prop_desc_p->flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED))
if (src_prop_desc_p->flags & (JERRY_PROP_IS_GET_DEFINED | JERRY_PROP_IS_SET_DEFINED))
#endif /* JERRY_ESNEXT */
{
/* a. */
@ -681,14 +681,14 @@ ecma_op_from_property_descriptor (const ecma_property_descriptor_t *src_prop_des
}
}
prop_desc.value = ecma_make_boolean_value (src_prop_desc_p->flags & ECMA_PROP_IS_ENUMERABLE);
prop_desc.value = ecma_make_boolean_value (src_prop_desc_p->flags & JERRY_PROP_IS_ENUMERABLE);
completion = ecma_op_object_define_own_property (obj_p,
ecma_get_magic_string (LIT_MAGIC_STRING_ENUMERABLE),
&prop_desc);
JERRY_ASSERT (ecma_is_value_true (completion));
prop_desc.value = ecma_make_boolean_value (src_prop_desc_p->flags & ECMA_PROP_IS_CONFIGURABLE);
prop_desc.value = ecma_make_boolean_value (src_prop_desc_p->flags & JERRY_PROP_IS_CONFIGURABLE);
completion = ecma_op_object_define_own_property (obj_p,
ecma_get_magic_string (LIT_MAGIC_STRING_CONFIGURABLE),
@ -735,10 +735,10 @@ ecma_op_to_property_descriptor (ecma_value_t obj_value, /**< object value */
if (ecma_is_value_found (enumerable_prop_value))
{
uint32_t is_enumerable = (ecma_op_to_boolean (enumerable_prop_value) ? ECMA_PROP_IS_ENUMERABLE
: ECMA_PROP_NO_OPTS);
uint32_t is_enumerable = (ecma_op_to_boolean (enumerable_prop_value) ? JERRY_PROP_IS_ENUMERABLE
: JERRY_PROP_NO_OPTS);
prop_desc.flags |= (uint16_t) (ECMA_PROP_IS_ENUMERABLE_DEFINED | is_enumerable);
prop_desc.flags |= (uint16_t) (JERRY_PROP_IS_ENUMERABLE_DEFINED | is_enumerable);
ecma_free_value (enumerable_prop_value);
}
@ -754,10 +754,10 @@ ecma_op_to_property_descriptor (ecma_value_t obj_value, /**< object value */
if (ecma_is_value_found (configurable_prop_value))
{
uint32_t is_configurable = (ecma_op_to_boolean (configurable_prop_value) ? ECMA_PROP_IS_CONFIGURABLE
: ECMA_PROP_NO_OPTS);
uint32_t is_configurable = (ecma_op_to_boolean (configurable_prop_value) ? JERRY_PROP_IS_CONFIGURABLE
: JERRY_PROP_NO_OPTS);
prop_desc.flags |= (uint16_t) (ECMA_PROP_IS_CONFIGURABLE_DEFINED | is_configurable);
prop_desc.flags |= (uint16_t) (JERRY_PROP_IS_CONFIGURABLE_DEFINED | is_configurable);
ecma_free_value (configurable_prop_value);
}
@ -773,7 +773,7 @@ ecma_op_to_property_descriptor (ecma_value_t obj_value, /**< object value */
if (ecma_is_value_found (value_prop_value))
{
prop_desc.flags |= ECMA_PROP_IS_VALUE_DEFINED;
prop_desc.flags |= JERRY_PROP_IS_VALUE_DEFINED;
prop_desc.value = ecma_copy_value (value_prop_value);
ecma_free_value (value_prop_value);
}
@ -789,10 +789,10 @@ ecma_op_to_property_descriptor (ecma_value_t obj_value, /**< object value */
if (ecma_is_value_found (writable_prop_value))
{
uint32_t is_writable = (ecma_op_to_boolean (writable_prop_value) ? ECMA_PROP_IS_WRITABLE
: ECMA_PROP_NO_OPTS);
uint32_t is_writable = (ecma_op_to_boolean (writable_prop_value) ? JERRY_PROP_IS_WRITABLE
: JERRY_PROP_NO_OPTS);
prop_desc.flags |= (uint16_t) (ECMA_PROP_IS_WRITABLE_DEFINED | is_writable);
prop_desc.flags |= (uint16_t) (JERRY_PROP_IS_WRITABLE_DEFINED | is_writable);
ecma_free_value (writable_prop_value);
}
@ -816,7 +816,7 @@ ecma_op_to_property_descriptor (ecma_value_t obj_value, /**< object value */
goto free_desc;
}
prop_desc.flags |= ECMA_PROP_IS_GET_DEFINED;
prop_desc.flags |= JERRY_PROP_IS_GET_DEFINED;
if (ecma_is_value_undefined (get_prop_value))
{
@ -854,7 +854,7 @@ ecma_op_to_property_descriptor (ecma_value_t obj_value, /**< object value */
goto free_desc;
}
prop_desc.flags |= ECMA_PROP_IS_SET_DEFINED;
prop_desc.flags |= JERRY_PROP_IS_SET_DEFINED;
if (ecma_is_value_undefined (set_prop_value))
{
@ -874,8 +874,8 @@ ecma_op_to_property_descriptor (ecma_value_t obj_value, /**< object value */
}
/* 9. */
if ((prop_desc.flags & (ECMA_PROP_IS_VALUE_DEFINED | ECMA_PROP_IS_WRITABLE_DEFINED))
&& (prop_desc.flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED)))
if ((prop_desc.flags & (JERRY_PROP_IS_VALUE_DEFINED | JERRY_PROP_IS_WRITABLE_DEFINED))
&& (prop_desc.flags & (JERRY_PROP_IS_GET_DEFINED | JERRY_PROP_IS_SET_DEFINED)))
{
ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("Accessors cannot be writable"));
}

View File

@ -257,7 +257,7 @@ ecma_op_create_mutable_binding (ecma_object_t *lex_env_p, /**< lexical environme
}
#endif /* JERRY_BUILTIN_PROXY && JERRY_BUILTIN_REALMS */
const uint32_t flags = ECMA_PROPERTY_ENUMERABLE_WRITABLE | ECMA_PROP_SHOULD_THROW;
const uint32_t flags = ECMA_PROPERTY_ENUMERABLE_WRITABLE | JERRY_PROP_SHOULD_THROW;
ecma_value_t completion = ecma_builtin_helper_def_prop (binding_obj_p,
name_p,

View File

@ -330,27 +330,27 @@ ecma_op_general_object_define_own_property (ecma_object_t *object_p, /**< the ob
uint8_t property_desc_type = ECMA_OP_OBJECT_DEFINE_GENERIC;
if (property_desc_p->flags & (ECMA_PROP_IS_VALUE_DEFINED | ECMA_PROP_IS_WRITABLE_DEFINED))
if (property_desc_p->flags & (JERRY_PROP_IS_VALUE_DEFINED | JERRY_PROP_IS_WRITABLE_DEFINED))
{
/* A property descriptor cannot be both named data and named accessor. */
JERRY_ASSERT ((property_desc_p->flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED))
!= (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED));
JERRY_ASSERT ((property_desc_p->flags & (JERRY_PROP_IS_GET_DEFINED | JERRY_PROP_IS_SET_DEFINED))
!= (JERRY_PROP_IS_GET_DEFINED | JERRY_PROP_IS_SET_DEFINED));
property_desc_type = ECMA_OP_OBJECT_DEFINE_DATA;
}
else if (property_desc_p->flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED))
else if (property_desc_p->flags & (JERRY_PROP_IS_GET_DEFINED | JERRY_PROP_IS_SET_DEFINED))
{
JERRY_ASSERT (!(property_desc_p->flags & ECMA_PROP_IS_WRITABLE_DEFINED));
JERRY_ASSERT (!(property_desc_p->flags & JERRY_PROP_IS_WRITABLE_DEFINED));
property_desc_type = ECMA_OP_OBJECT_DEFINE_ACCESSOR;
}
/* These three asserts ensures that a new property is created with the appropriate default flags.
* E.g. if ECMA_PROP_IS_CONFIGURABLE_DEFINED is false, the newly created property must be non-configurable. */
JERRY_ASSERT ((property_desc_p->flags & ECMA_PROP_IS_CONFIGURABLE_DEFINED)
|| !(property_desc_p->flags & ECMA_PROP_IS_CONFIGURABLE));
JERRY_ASSERT ((property_desc_p->flags & ECMA_PROP_IS_ENUMERABLE_DEFINED)
|| !(property_desc_p->flags & ECMA_PROP_IS_ENUMERABLE));
JERRY_ASSERT ((property_desc_p->flags & ECMA_PROP_IS_WRITABLE_DEFINED)
|| !(property_desc_p->flags & ECMA_PROP_IS_WRITABLE));
* E.g. if JERRY_PROP_IS_CONFIGURABLE_DEFINED is false, the newly created property must be non-configurable. */
JERRY_ASSERT ((property_desc_p->flags & JERRY_PROP_IS_CONFIGURABLE_DEFINED)
|| !(property_desc_p->flags & JERRY_PROP_IS_CONFIGURABLE));
JERRY_ASSERT ((property_desc_p->flags & JERRY_PROP_IS_ENUMERABLE_DEFINED)
|| !(property_desc_p->flags & JERRY_PROP_IS_ENUMERABLE));
JERRY_ASSERT ((property_desc_p->flags & JERRY_PROP_IS_WRITABLE_DEFINED)
|| !(property_desc_p->flags & JERRY_PROP_IS_WRITABLE));
/* 1. */
ecma_extended_property_ref_t ext_property_ref = { .property_ref.value_p = NULL, .property_p = NULL };
@ -367,7 +367,7 @@ ecma_op_general_object_define_own_property (ecma_object_t *object_p, /**< the ob
if (!ecma_op_ordinary_object_is_extensible (object_p))
{
/* 2. */
return ECMA_REJECT_WITH_FORMAT (property_desc_p->flags & ECMA_PROP_SHOULD_THROW,
return ECMA_REJECT_WITH_FORMAT (property_desc_p->flags & JERRY_PROP_SHOULD_THROW,
"Cannot define property '%', object is not extensible",
ecma_make_prop_name_value (property_name_p));
}
@ -386,7 +386,7 @@ ecma_op_general_object_define_own_property (ecma_object_t *object_p, /**< the ob
prop_attributes,
NULL);
JERRY_ASSERT ((property_desc_p->flags & ECMA_PROP_IS_VALUE_DEFINED)
JERRY_ASSERT ((property_desc_p->flags & JERRY_PROP_IS_VALUE_DEFINED)
|| ecma_is_value_undefined (property_desc_p->value));
new_prop_value_p->value = ecma_copy_value_if_not_object (property_desc_p->value);
@ -409,10 +409,10 @@ ecma_op_general_object_define_own_property (ecma_object_t *object_p, /**< the ob
const bool is_current_configurable = ecma_is_property_configurable (current_prop);
/* 7. a., b. */
bool is_enumerable = (property_desc_p->flags & ECMA_PROP_IS_ENUMERABLE) != 0;
bool is_enumerable = (property_desc_p->flags & JERRY_PROP_IS_ENUMERABLE) != 0;
if (!is_current_configurable
&& ((property_desc_p->flags & ECMA_PROP_IS_CONFIGURABLE)
|| ((property_desc_p->flags & ECMA_PROP_IS_ENUMERABLE_DEFINED)
&& ((property_desc_p->flags & JERRY_PROP_IS_CONFIGURABLE)
|| ((property_desc_p->flags & JERRY_PROP_IS_ENUMERABLE_DEFINED)
&& (is_enumerable != ecma_is_property_enumerable (current_prop)))))
{
if (ECMA_PROPERTY_IS_VIRTUAL (current_prop))
@ -425,7 +425,7 @@ ecma_op_general_object_define_own_property (ecma_object_t *object_p, /**< the ob
if (ECMA_PROPERTY_IS_VIRTUAL (current_prop))
{
bool writable_check_failed = (property_desc_p->flags & ECMA_PROP_IS_WRITABLE);
bool writable_check_failed = (property_desc_p->flags & JERRY_PROP_IS_WRITABLE);
#if JERRY_MODULE_SYSTEM
if (ecma_object_class_is (object_p, ECMA_OBJECT_CLASS_MODULE_NAMESPACE))
@ -435,9 +435,9 @@ ecma_op_general_object_define_own_property (ecma_object_t *object_p, /**< the ob
return ecma_raise_reference_error (ECMA_ERR_MSG (ecma_error_let_const_not_initialized));
}
if (property_desc_p->flags & ECMA_PROP_IS_WRITABLE_DEFINED)
if (property_desc_p->flags & JERRY_PROP_IS_WRITABLE_DEFINED)
{
writable_check_failed = ((property_desc_p->flags ^ current_prop) & ECMA_PROP_IS_WRITABLE) != 0;
writable_check_failed = ((property_desc_p->flags ^ current_prop) & JERRY_PROP_IS_WRITABLE) != 0;
}
}
else
@ -452,7 +452,7 @@ ecma_op_general_object_define_own_property (ecma_object_t *object_p, /**< the ob
if (property_desc_type == ECMA_OP_OBJECT_DEFINE_ACCESSOR
|| writable_check_failed
|| ((property_desc_p->flags & ECMA_PROP_IS_VALUE_DEFINED)
|| ((property_desc_p->flags & JERRY_PROP_IS_VALUE_DEFINED)
&& !ecma_op_same_value (property_desc_p->value,
ext_property_ref.property_ref.virtual_value)))
{
@ -477,8 +477,8 @@ ecma_op_general_object_define_own_property (ecma_object_t *object_p, /**< the ob
{
/* 10. a. i. & ii. */
if (!ecma_is_property_writable (current_prop)
&& ((property_desc_p->flags & ECMA_PROP_IS_WRITABLE)
|| ((property_desc_p->flags & ECMA_PROP_IS_VALUE_DEFINED)
&& ((property_desc_p->flags & JERRY_PROP_IS_WRITABLE)
|| ((property_desc_p->flags & JERRY_PROP_IS_VALUE_DEFINED)
&& !ecma_op_same_value (property_desc_p->value,
ext_property_ref.property_ref.value_p->value))))
{
@ -497,9 +497,9 @@ ecma_op_general_object_define_own_property (ecma_object_t *object_p, /**< the ob
ECMA_SET_POINTER (prop_desc_getter_cp, property_desc_p->get_p);
ECMA_SET_POINTER (prop_desc_setter_cp, property_desc_p->set_p);
if (((property_desc_p->flags & ECMA_PROP_IS_GET_DEFINED)
if (((property_desc_p->flags & JERRY_PROP_IS_GET_DEFINED)
&& prop_desc_getter_cp != get_set_pair_p->getter_cp)
|| ((property_desc_p->flags & ECMA_PROP_IS_SET_DEFINED)
|| ((property_desc_p->flags & JERRY_PROP_IS_SET_DEFINED)
&& prop_desc_setter_cp != get_set_pair_p->setter_cp))
{
/* i., ii. */
@ -559,30 +559,30 @@ ecma_op_general_object_define_own_property (ecma_object_t *object_p, /**< the ob
{
JERRY_ASSERT (ECMA_PROPERTY_IS_RAW_DATA (*ext_property_ref.property_p));
if (property_desc_p->flags & ECMA_PROP_IS_VALUE_DEFINED)
if (property_desc_p->flags & JERRY_PROP_IS_VALUE_DEFINED)
{
ecma_named_data_property_assign_value (object_p,
ext_property_ref.property_ref.value_p,
property_desc_p->value);
}
if (property_desc_p->flags & ECMA_PROP_IS_WRITABLE_DEFINED)
if (property_desc_p->flags & JERRY_PROP_IS_WRITABLE_DEFINED)
{
ecma_set_property_writable_attr (ext_property_ref.property_p, (property_desc_p->flags & ECMA_PROP_IS_WRITABLE));
ecma_set_property_writable_attr (ext_property_ref.property_p, (property_desc_p->flags & JERRY_PROP_IS_WRITABLE));
}
}
else if (property_desc_type == ECMA_OP_OBJECT_DEFINE_ACCESSOR)
{
JERRY_ASSERT (!(*ext_property_ref.property_p & ECMA_PROPERTY_FLAG_DATA));
if (property_desc_p->flags & ECMA_PROP_IS_GET_DEFINED)
if (property_desc_p->flags & JERRY_PROP_IS_GET_DEFINED)
{
ecma_set_named_accessor_property_getter (object_p,
ext_property_ref.property_ref.value_p,
property_desc_p->get_p);
}
if (property_desc_p->flags & ECMA_PROP_IS_SET_DEFINED)
if (property_desc_p->flags & JERRY_PROP_IS_SET_DEFINED)
{
ecma_set_named_accessor_property_setter (object_p,
ext_property_ref.property_ref.value_p,
@ -590,16 +590,16 @@ ecma_op_general_object_define_own_property (ecma_object_t *object_p, /**< the ob
}
}
if (property_desc_p->flags & ECMA_PROP_IS_ENUMERABLE_DEFINED)
if (property_desc_p->flags & JERRY_PROP_IS_ENUMERABLE_DEFINED)
{
ecma_set_property_enumerable_attr (ext_property_ref.property_p,
(property_desc_p->flags & ECMA_PROP_IS_ENUMERABLE));
(property_desc_p->flags & JERRY_PROP_IS_ENUMERABLE));
}
if (property_desc_p->flags & ECMA_PROP_IS_CONFIGURABLE_DEFINED)
if (property_desc_p->flags & JERRY_PROP_IS_CONFIGURABLE_DEFINED)
{
ecma_set_property_configurable_attr (ext_property_ref.property_p,
(property_desc_p->flags & ECMA_PROP_IS_CONFIGURABLE));
(property_desc_p->flags & JERRY_PROP_IS_CONFIGURABLE));
}
return ECMA_VALUE_TRUE;
@ -637,13 +637,13 @@ ecma_op_is_compatible_property_descriptor (const ecma_property_descriptor_t *des
/* 4. */
if ((current_p->flags & desc_p->flags) == desc_p->flags)
{
if ((current_p->flags & ECMA_PROP_IS_VALUE_DEFINED)
if ((current_p->flags & JERRY_PROP_IS_VALUE_DEFINED)
&& ecma_op_same_value (current_p->value, desc_p->value))
{
return true;
}
if ((current_p->flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED)
if ((current_p->flags & (JERRY_PROP_IS_GET_DEFINED | JERRY_PROP_IS_SET_DEFINED)
&& current_p->get_p == desc_p->get_p
&& current_p->set_p == desc_p->set_p))
{
@ -652,21 +652,21 @@ ecma_op_is_compatible_property_descriptor (const ecma_property_descriptor_t *des
}
/* 5. */
if (!(current_p->flags & ECMA_PROP_IS_CONFIGURABLE))
if (!(current_p->flags & JERRY_PROP_IS_CONFIGURABLE))
{
if (desc_p->flags & ECMA_PROP_IS_CONFIGURABLE)
if (desc_p->flags & JERRY_PROP_IS_CONFIGURABLE)
{
return false;
}
if ((desc_p->flags & ECMA_PROP_IS_ENUMERABLE_DEFINED)
&& ((current_p->flags & ECMA_PROP_IS_ENUMERABLE) != (desc_p->flags & ECMA_PROP_IS_ENUMERABLE)))
if ((desc_p->flags & JERRY_PROP_IS_ENUMERABLE_DEFINED)
&& ((current_p->flags & JERRY_PROP_IS_ENUMERABLE) != (desc_p->flags & JERRY_PROP_IS_ENUMERABLE)))
{
return false;
}
}
const uint32_t accessor_desc_flags = (ECMA_PROP_IS_SET_DEFINED | ECMA_PROP_IS_GET_DEFINED);
const uint32_t data_desc_flags = (ECMA_PROP_IS_VALUE_DEFINED | ECMA_PROP_IS_WRITABLE_DEFINED);
const uint32_t accessor_desc_flags = (JERRY_PROP_IS_SET_DEFINED | JERRY_PROP_IS_GET_DEFINED);
const uint32_t data_desc_flags = (JERRY_PROP_IS_VALUE_DEFINED | JERRY_PROP_IS_WRITABLE_DEFINED);
bool desc_is_accessor = (desc_p->flags & accessor_desc_flags) != 0;
bool desc_is_data = (desc_p->flags & data_desc_flags) != 0;
@ -681,22 +681,22 @@ ecma_op_is_compatible_property_descriptor (const ecma_property_descriptor_t *des
/* 7. */
if (current_is_data != desc_is_data)
{
return (current_p->flags & ECMA_PROP_IS_CONFIGURABLE) != 0;
return (current_p->flags & JERRY_PROP_IS_CONFIGURABLE) != 0;
}
/* 8. */
if (current_is_data)
{
if (!(current_p->flags & ECMA_PROP_IS_CONFIGURABLE))
if (!(current_p->flags & JERRY_PROP_IS_CONFIGURABLE))
{
if (!(current_p->flags & ECMA_PROP_IS_WRITABLE)
&& (desc_p->flags & ECMA_PROP_IS_WRITABLE))
if (!(current_p->flags & JERRY_PROP_IS_WRITABLE)
&& (desc_p->flags & JERRY_PROP_IS_WRITABLE))
{
return false;
}
if (!(current_p->flags & ECMA_PROP_IS_WRITABLE)
&& (desc_p->flags & ECMA_PROP_IS_VALUE_DEFINED)
if (!(current_p->flags & JERRY_PROP_IS_WRITABLE)
&& (desc_p->flags & JERRY_PROP_IS_VALUE_DEFINED)
&& !ecma_op_same_value (desc_p->value, current_p->value))
{
return false;
@ -706,19 +706,19 @@ ecma_op_is_compatible_property_descriptor (const ecma_property_descriptor_t *des
return true;
}
JERRY_ASSERT ((current_p->flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED)) != 0);
JERRY_ASSERT ((desc_p->flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED)) != 0);
JERRY_ASSERT ((current_p->flags & (JERRY_PROP_IS_GET_DEFINED | JERRY_PROP_IS_SET_DEFINED)) != 0);
JERRY_ASSERT ((desc_p->flags & (JERRY_PROP_IS_GET_DEFINED | JERRY_PROP_IS_SET_DEFINED)) != 0);
/* 9. */
if (!(current_p->flags & ECMA_PROP_IS_CONFIGURABLE))
if (!(current_p->flags & JERRY_PROP_IS_CONFIGURABLE))
{
if ((desc_p->flags & ECMA_PROP_IS_SET_DEFINED)
if ((desc_p->flags & JERRY_PROP_IS_SET_DEFINED)
&& desc_p->set_p != current_p->set_p)
{
return false;
}
if ((desc_p->flags & ECMA_PROP_IS_GET_DEFINED)
if ((desc_p->flags & JERRY_PROP_IS_GET_DEFINED)
&& desc_p->get_p != current_p->get_p)
{
return false;
@ -738,15 +738,15 @@ void
ecma_op_to_complete_property_descriptor (ecma_property_descriptor_t *desc_p) /**< target descriptor */
{
/* 4. */
if (!(desc_p->flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED)))
if (!(desc_p->flags & (JERRY_PROP_IS_GET_DEFINED | JERRY_PROP_IS_SET_DEFINED)))
{
/* a. */
desc_p->flags |= ECMA_PROP_IS_VALUE_DEFINED;
desc_p->flags |= JERRY_PROP_IS_VALUE_DEFINED;
}
/* 5. */
else
{
desc_p->flags |= (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED);
desc_p->flags |= (JERRY_PROP_IS_GET_DEFINED | JERRY_PROP_IS_SET_DEFINED);
}
} /* ecma_op_to_complete_property_descriptor */
#endif /* JERRY_ESNEXT */

View File

@ -1261,15 +1261,15 @@ ecma_op_object_put_apply_receiver (ecma_value_t receiver, /**< receiver */
ecma_value_t result;
/* 5.e.i - 5.e.ii */
if (prop_desc.flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED)
|| !(prop_desc.flags & ECMA_PROP_IS_WRITABLE))
if (prop_desc.flags & (JERRY_PROP_IS_GET_DEFINED | JERRY_PROP_IS_SET_DEFINED)
|| !(prop_desc.flags & JERRY_PROP_IS_WRITABLE))
{
result = ecma_raise_property_redefinition (property_name_p, prop_desc.flags);
}
else
{
/* 5.e.iii */
JERRY_ASSERT (prop_desc.flags & ECMA_PROP_IS_VALUE_DEFINED);
JERRY_ASSERT (prop_desc.flags & JERRY_PROP_IS_VALUE_DEFINED);
ecma_free_value (prop_desc.value);
prop_desc.value = ecma_copy_value (value);
@ -1292,13 +1292,13 @@ ecma_op_object_put_apply_receiver (ecma_value_t receiver, /**< receiver */
{
ecma_property_descriptor_t desc;
/* Based on: ES6 9.1.9 [[Set]] 4.d.i. / ES11 9.1.9.2 OrdinarySetWithOwnDescriptor 2.c.i. */
desc.flags = (ECMA_PROP_IS_CONFIGURABLE
| ECMA_PROP_IS_CONFIGURABLE_DEFINED
| ECMA_PROP_IS_ENUMERABLE
| ECMA_PROP_IS_ENUMERABLE_DEFINED
| ECMA_PROP_IS_WRITABLE
| ECMA_PROP_IS_WRITABLE_DEFINED
| ECMA_PROP_IS_VALUE_DEFINED);
desc.flags = (JERRY_PROP_IS_CONFIGURABLE
| JERRY_PROP_IS_CONFIGURABLE_DEFINED
| JERRY_PROP_IS_ENUMERABLE
| JERRY_PROP_IS_ENUMERABLE_DEFINED
| JERRY_PROP_IS_WRITABLE
| JERRY_PROP_IS_WRITABLE_DEFINED
| JERRY_PROP_IS_VALUE_DEFINED);
desc.value = value;
ecma_value_t ret_value = ecma_proxy_object_define_own_property (receiver_obj_p, property_name_p, &desc);
@ -1673,7 +1673,7 @@ ecma_op_object_put_with_receiver (ecma_object_t *object_p, /**< the object */
if (ext_object_p->u.cls.type == ECMA_OBJECT_CLASS_ARGUMENTS
&& ext_object_p->u.cls.u1.arguments_flags & ECMA_ARGUMENTS_OBJECT_MAPPED)
{
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;
return ecma_builtin_helper_def_prop (object_p, property_name_p, value, flags);
}
}
@ -1940,10 +1940,10 @@ ecma_op_object_get_own_property_descriptor (ecma_object_t *object_p, /**< the ob
return ECMA_VALUE_FALSE;
}
uint32_t flags = ecma_is_property_enumerable (property) ? ECMA_PROP_IS_ENUMERABLE : ECMA_PROP_NO_OPTS;
flags |= ecma_is_property_configurable (property) ? ECMA_PROP_IS_CONFIGURABLE: ECMA_PROP_NO_OPTS;
uint32_t flags = ecma_is_property_enumerable (property) ? JERRY_PROP_IS_ENUMERABLE : JERRY_PROP_NO_OPTS;
flags |= ecma_is_property_configurable (property) ? JERRY_PROP_IS_CONFIGURABLE: JERRY_PROP_NO_OPTS;
prop_desc_p->flags = (uint16_t) (ECMA_PROP_IS_ENUMERABLE_DEFINED | ECMA_PROP_IS_CONFIGURABLE_DEFINED | flags);
prop_desc_p->flags = (uint16_t) (JERRY_PROP_IS_ENUMERABLE_DEFINED | JERRY_PROP_IS_CONFIGURABLE_DEFINED | flags);
if (property & ECMA_PROPERTY_FLAG_DATA)
{
@ -1962,14 +1962,14 @@ ecma_op_object_get_own_property_descriptor (ecma_object_t *object_p, /**< the ob
prop_desc_p->value = property_ref.virtual_value;
}
prop_desc_p->flags |= (ECMA_PROP_IS_VALUE_DEFINED | ECMA_PROP_IS_WRITABLE_DEFINED);
prop_desc_p->flags = (uint16_t) (prop_desc_p->flags | (ecma_is_property_writable (property) ? ECMA_PROP_IS_WRITABLE
: ECMA_PROP_NO_OPTS));
prop_desc_p->flags |= (JERRY_PROP_IS_VALUE_DEFINED | JERRY_PROP_IS_WRITABLE_DEFINED);
prop_desc_p->flags = (uint16_t) (prop_desc_p->flags | (ecma_is_property_writable (property) ? JERRY_PROP_IS_WRITABLE
: JERRY_PROP_NO_OPTS));
}
else
{
ecma_getter_setter_pointers_t *get_set_pair_p = ecma_get_named_accessor_property (property_ref.value_p);
prop_desc_p->flags |= (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED);
prop_desc_p->flags |= (JERRY_PROP_IS_GET_DEFINED | JERRY_PROP_IS_SET_DEFINED);
if (get_set_pair_p->getter_cp == JMEM_CP_NULL)
{
@ -2181,7 +2181,7 @@ ecma_op_object_get_enumerable_property_names (ecma_object_t *obj_p, /**< routine
return NULL;
}
const bool is_enumerable = (prop_desc.flags & ECMA_PROP_IS_ENUMERABLE) != 0;
const bool is_enumerable = (prop_desc.flags & JERRY_PROP_IS_ENUMERABLE) != 0;
ecma_free_property_descriptor (&prop_desc);
/* 4.a.ii */
if (is_enumerable)
@ -2628,7 +2628,7 @@ ecma_op_object_enumerate (ecma_object_t *obj_p) /**< object */
if (ecma_is_value_true (get_desc))
{
bool is_enumerable = (prop_desc.flags & ECMA_PROP_IS_ENUMERABLE) != 0;
bool is_enumerable = (prop_desc.flags & JERRY_PROP_IS_ENUMERABLE) != 0;
ecma_free_property_descriptor (&prop_desc);
if (ecma_collection_has_string_value (visited_names_p, name_p)
@ -3478,7 +3478,7 @@ ecma_op_object_unref_weak (ecma_object_t *object_p, /**< this argument */
/**
* Raise property redefinition error
*
* @return ECMA_VALUE_FALSE - if ECMA_PROP_SHOULD_THROW is not set
* @return ECMA_VALUE_FALSE - if JERRY_PROP_SHOULD_THROW is not set
* raised TypeError - otherwise
*/
ecma_value_t
@ -3487,7 +3487,7 @@ ecma_raise_property_redefinition (ecma_string_t *property_name_p, /**< property
{
JERRY_UNUSED (property_name_p);
return ECMA_REJECT_WITH_FORMAT (flags & ECMA_PROP_SHOULD_THROW,
return ECMA_REJECT_WITH_FORMAT (flags & JERRY_PROP_SHOULD_THROW,
"Cannot redefine property '%'",
ecma_make_prop_name_value (property_name_p));
} /* ecma_raise_property_redefinition */

View File

@ -743,7 +743,7 @@ ecma_proxy_object_get_own_property_descriptor (ecma_object_t *obj_p, /**< proxy
return ECMA_VALUE_FALSE;
}
/* .b */
if (!(target_desc.flags & ECMA_PROP_IS_CONFIGURABLE))
if (!(target_desc.flags & JERRY_PROP_IS_CONFIGURABLE))
{
ecma_free_property_descriptor (&target_desc);
return ecma_raise_type_error (ECMA_ERR_MSG ("Given property is a non-configurable"
@ -811,12 +811,12 @@ ecma_proxy_object_get_own_property_descriptor (ecma_object_t *obj_p, /**< proxy
is_extensible);
bool target_has_desc = ecma_is_value_true (target_status);
bool target_is_writable = (target_desc.flags & ECMA_PROP_IS_WRITABLE) ;
bool target_is_writable = (target_desc.flags & JERRY_PROP_IS_WRITABLE) ;
bool target_is_configurable = false;
if (target_has_desc)
{
target_is_configurable = ((target_desc.flags & ECMA_PROP_IS_CONFIGURABLE) != 0);
target_is_configurable = ((target_desc.flags & JERRY_PROP_IS_CONFIGURABLE) != 0);
ecma_free_property_descriptor (&target_desc);
}
@ -828,13 +828,13 @@ ecma_proxy_object_get_own_property_descriptor (ecma_object_t *obj_p, /**< proxy
}
/* 22. */
else if (!(prop_desc_p->flags & ECMA_PROP_IS_CONFIGURABLE))
else if (!(prop_desc_p->flags & JERRY_PROP_IS_CONFIGURABLE))
{
const uint16_t mask = (ECMA_PROP_IS_WRITABLE_DEFINED | ECMA_PROP_IS_WRITABLE);
const uint16_t mask = (JERRY_PROP_IS_WRITABLE_DEFINED | JERRY_PROP_IS_WRITABLE);
if (!target_has_desc
|| target_is_configurable
|| ((prop_desc_p->flags & mask) == ECMA_PROP_IS_WRITABLE_DEFINED
|| ((prop_desc_p->flags & mask) == JERRY_PROP_IS_WRITABLE_DEFINED
&& target_is_writable))
{
ecma_free_property_descriptor (prop_desc_p);
@ -950,8 +950,8 @@ ecma_proxy_object_define_own_property (ecma_object_t *obj_p, /**< proxy object *
}
/* 17. */
bool setting_config_false = ((prop_desc_p->flags & ECMA_PROP_IS_CONFIGURABLE_DEFINED)
&& !(prop_desc_p->flags & ECMA_PROP_IS_CONFIGURABLE));
bool setting_config_false = ((prop_desc_p->flags & JERRY_PROP_IS_CONFIGURABLE_DEFINED)
&& !(prop_desc_p->flags & JERRY_PROP_IS_CONFIGURABLE));
/* 19. */
if (!target_prop_found)
@ -978,16 +978,16 @@ ecma_proxy_object_define_own_property (ecma_object_t *obj_p, /**< proxy object *
ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("Trap returned truish for adding property that is "
"incompatible with the existing property in the target"));
}
else if (setting_config_false && (target_desc.flags & ECMA_PROP_IS_CONFIGURABLE))
else if (setting_config_false && (target_desc.flags & JERRY_PROP_IS_CONFIGURABLE))
{
ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("Trap returned truish for defining non-configurable property "
"which is configurable in the target"));
}
/* ES11: 16.c */
else if ((target_desc.flags & (ECMA_PROP_IS_VALUE_DEFINED | ECMA_PROP_IS_WRITABLE_DEFINED)) != 0
&& (prop_desc_p->flags & (ECMA_PROP_IS_WRITABLE_DEFINED | ECMA_PROP_IS_WRITABLE))
== ECMA_PROP_IS_WRITABLE_DEFINED
&& (target_desc.flags & (ECMA_PROP_IS_WRITABLE | ECMA_PROP_IS_CONFIGURABLE)) == ECMA_PROP_IS_WRITABLE)
else if ((target_desc.flags & (JERRY_PROP_IS_VALUE_DEFINED | JERRY_PROP_IS_WRITABLE_DEFINED)) != 0
&& (prop_desc_p->flags & (JERRY_PROP_IS_WRITABLE_DEFINED | JERRY_PROP_IS_WRITABLE))
== JERRY_PROP_IS_WRITABLE_DEFINED
&& (target_desc.flags & (JERRY_PROP_IS_WRITABLE | JERRY_PROP_IS_CONFIGURABLE)) == JERRY_PROP_IS_WRITABLE)
{
ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("Trap returned truish for defining non-configurable property "
@ -1080,7 +1080,7 @@ ecma_proxy_object_has (ecma_object_t *obj_p, /**< proxy object */
if (ecma_is_value_true (status))
{
bool prop_is_configurable = target_desc.flags & ECMA_PROP_IS_CONFIGURABLE;
bool prop_is_configurable = target_desc.flags & JERRY_PROP_IS_CONFIGURABLE;
ecma_free_property_descriptor (&target_desc);
@ -1181,15 +1181,15 @@ ecma_proxy_object_get (ecma_object_t *obj_p, /**< proxy object */
{
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
if ((target_desc.flags & ECMA_PROP_IS_VALUE_DEFINED)
&& !(target_desc.flags & ECMA_PROP_IS_CONFIGURABLE)
&& !(target_desc.flags & ECMA_PROP_IS_WRITABLE)
if ((target_desc.flags & JERRY_PROP_IS_VALUE_DEFINED)
&& !(target_desc.flags & JERRY_PROP_IS_CONFIGURABLE)
&& !(target_desc.flags & JERRY_PROP_IS_WRITABLE)
&& !ecma_op_same_value (trap_result, target_desc.value))
{
ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("Incorrect value is returned by a Proxy 'get' trap"));
}
else if (!(target_desc.flags & ECMA_PROP_IS_CONFIGURABLE)
&& (target_desc.flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED))
else if (!(target_desc.flags & JERRY_PROP_IS_CONFIGURABLE)
&& (target_desc.flags & (JERRY_PROP_IS_GET_DEFINED | JERRY_PROP_IS_SET_DEFINED))
&& target_desc.get_p == NULL
&& !ecma_is_value_undefined (trap_result))
{
@ -1306,15 +1306,15 @@ ecma_proxy_object_set (ecma_object_t *obj_p, /**< proxy object */
{
ecma_value_t ret_value = ECMA_VALUE_EMPTY;
if ((target_desc.flags & ECMA_PROP_IS_VALUE_DEFINED)
&& !(target_desc.flags & ECMA_PROP_IS_CONFIGURABLE)
&& !(target_desc.flags & ECMA_PROP_IS_WRITABLE)
if ((target_desc.flags & JERRY_PROP_IS_VALUE_DEFINED)
&& !(target_desc.flags & JERRY_PROP_IS_CONFIGURABLE)
&& !(target_desc.flags & JERRY_PROP_IS_WRITABLE)
&& !ecma_op_same_value (value, target_desc.value))
{
ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("Incorrect value is returned by a Proxy 'set' trap"));
}
else if (!(target_desc.flags & ECMA_PROP_IS_CONFIGURABLE)
&& (target_desc.flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED))
else if (!(target_desc.flags & JERRY_PROP_IS_CONFIGURABLE)
&& (target_desc.flags & (JERRY_PROP_IS_GET_DEFINED | JERRY_PROP_IS_SET_DEFINED))
&& target_desc.set_p == NULL)
{
ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("The property of a Proxy target is a non "
@ -1424,7 +1424,7 @@ ecma_proxy_object_delete_property (ecma_object_t *obj_p, /**< proxy object */
ecma_value_t ret_value = ECMA_VALUE_TRUE;
/* 15. */
if (!(target_desc.flags & ECMA_PROP_IS_CONFIGURABLE))
if (!(target_desc.flags & JERRY_PROP_IS_CONFIGURABLE))
{
ret_value = ecma_raise_type_error (ECMA_ERR_MSG ("Trap returned truish for property which is "
"non-configurable in the proxy target"));
@ -1672,7 +1672,7 @@ ecma_proxy_object_own_property_keys (ecma_object_t *obj_p) /**< proxy object */
ecma_value_t prop_value = ecma_make_prop_name_value (prop_name_p);
if (ecma_is_value_true (status)
&& !(target_desc.flags & ECMA_PROP_IS_CONFIGURABLE))
&& !(target_desc.flags & JERRY_PROP_IS_CONFIGURABLE))
{
ecma_collection_push_back (target_non_configurable_keys, prop_value);
}

View File

@ -249,7 +249,7 @@ ecma_op_regexp_alloc (ecma_object_t *ctr_obj_p) /**< constructor object pointer
ecma_value_t status = ecma_builtin_helper_def_prop (new_object_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);
JERRY_ASSERT (ecma_is_value_true (status));

View File

@ -1773,7 +1773,7 @@ ecma_op_typedarray_list_lazy_property_names (ecma_object_t *obj_p, /**< a TypedA
* See also: ES2015 9.4.5.3
*
* @return ECMA_VALUE_TRUE - if the property is successfully defined
* ECMA_VALUE_FALSE - if is ECMA_PROP_SHOULD_THROW is not set
* ECMA_VALUE_FALSE - if is JERRY_PROP_SHOULD_THROW is not set
* raised TypeError - otherwise
*/
ecma_value_t
@ -1789,13 +1789,13 @@ ecma_op_typedarray_define_own_property (ecma_object_t *obj_p, /**< TypedArray ob
if (array_index != ECMA_STRING_NOT_ARRAY_INDEX)
{
if ((property_desc_p->flags & (ECMA_PROP_IS_GET_DEFINED | ECMA_PROP_IS_SET_DEFINED))
|| ((property_desc_p->flags & (ECMA_PROP_IS_CONFIGURABLE_DEFINED | ECMA_PROP_IS_CONFIGURABLE))
== (ECMA_PROP_IS_CONFIGURABLE_DEFINED | ECMA_PROP_IS_CONFIGURABLE))
|| ((property_desc_p->flags & ECMA_PROP_IS_ENUMERABLE_DEFINED)
&& !(property_desc_p->flags & ECMA_PROP_IS_ENUMERABLE))
|| ((property_desc_p->flags & ECMA_PROP_IS_WRITABLE_DEFINED)
&& !(property_desc_p->flags & ECMA_PROP_IS_WRITABLE)))
if ((property_desc_p->flags & (JERRY_PROP_IS_GET_DEFINED | JERRY_PROP_IS_SET_DEFINED))
|| ((property_desc_p->flags & (JERRY_PROP_IS_CONFIGURABLE_DEFINED | JERRY_PROP_IS_CONFIGURABLE))
== (JERRY_PROP_IS_CONFIGURABLE_DEFINED | JERRY_PROP_IS_CONFIGURABLE))
|| ((property_desc_p->flags & JERRY_PROP_IS_ENUMERABLE_DEFINED)
&& !(property_desc_p->flags & JERRY_PROP_IS_ENUMERABLE))
|| ((property_desc_p->flags & JERRY_PROP_IS_WRITABLE_DEFINED)
&& !(property_desc_p->flags & JERRY_PROP_IS_WRITABLE)))
{
return ecma_raise_property_redefinition (prop_name_p, property_desc_p->flags);
}
@ -1804,10 +1804,10 @@ ecma_op_typedarray_define_own_property (ecma_object_t *obj_p, /**< TypedArray ob
if (array_index >= info.length)
{
return ECMA_REJECT ((property_desc_p->flags & ECMA_PROP_SHOULD_THROW), "Invalid typed array index");
return ECMA_REJECT ((property_desc_p->flags & JERRY_PROP_SHOULD_THROW), "Invalid typed array index");
}
if (property_desc_p->flags & ECMA_PROP_IS_VALUE_DEFINED)
if (property_desc_p->flags & JERRY_PROP_IS_VALUE_DEFINED)
{
lit_utf8_byte_t *src_buffer = info.buffer_p + (array_index << info.shift);
ecma_value_t set_element = ecma_set_typedarray_element (src_buffer, property_desc_p->value, info.id);
@ -1828,7 +1828,7 @@ ecma_op_typedarray_define_own_property (ecma_object_t *obj_p, /**< TypedArray ob
if (is_same)
{
return ECMA_REJECT ((property_desc_p->flags & ECMA_PROP_SHOULD_THROW), "Invalid typed array index");
return ECMA_REJECT ((property_desc_p->flags & JERRY_PROP_SHOULD_THROW), "Invalid typed array index");
}
}

View File

@ -1697,13 +1697,13 @@ opfunc_copy_data_properties (ecma_value_t target_object, /**< target object */
continue;
}
if (!(descriptor.flags & ECMA_PROP_IS_ENUMERABLE))
if (!(descriptor.flags & JERRY_PROP_IS_ENUMERABLE))
{
ecma_free_property_descriptor (&descriptor);
continue;
}
if ((descriptor.flags & ECMA_PROP_IS_VALUE_DEFINED) && !ECMA_OBJECT_IS_PROXY (source_object_p))
if ((descriptor.flags & JERRY_PROP_IS_VALUE_DEFINED) && !ECMA_OBJECT_IS_PROXY (source_object_p))
{
result = descriptor.value;
}
@ -1784,7 +1784,7 @@ opfunc_lexical_scope_has_restricted_binding (vm_frame_ctx_t *frame_ctx_p, /**< f
if (ecma_is_value_true (status))
{
status = ecma_make_boolean_value ((prop_desc.flags & ECMA_PROP_IS_CONFIGURABLE) == 0);
status = ecma_make_boolean_value ((prop_desc.flags & JERRY_PROP_IS_CONFIGURABLE) == 0);
ecma_free_property_descriptor (&prop_desc);
}