Major property rework: introducing virtual properties.
Properties are changed to a type and value pair instead of a pointer to an internal representation. Functions such as ecma_op_object_get_[own_]property do not return with property pointers anymore. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
@@ -166,11 +166,11 @@ ecma_deref_object (ecma_object_t *object_p) /**< object */
|
||||
static void
|
||||
ecma_gc_mark_property (ecma_property_t *property_p) /**< property */
|
||||
{
|
||||
switch (ECMA_PROPERTY_GET_TYPE (property_p))
|
||||
switch (ECMA_PROPERTY_GET_TYPE (*property_p))
|
||||
{
|
||||
case ECMA_PROPERTY_TYPE_NAMEDDATA:
|
||||
{
|
||||
ecma_value_t value = ecma_get_named_data_property_value (property_p);
|
||||
ecma_value_t value = ECMA_PROPERTY_VALUE_PTR (property_p)->value;
|
||||
|
||||
if (ecma_is_value_object (value))
|
||||
{
|
||||
@@ -182,8 +182,9 @@ ecma_gc_mark_property (ecma_property_t *property_p) /**< property */
|
||||
}
|
||||
case ECMA_PROPERTY_TYPE_NAMEDACCESSOR:
|
||||
{
|
||||
ecma_object_t *getter_obj_p = ecma_get_named_accessor_property_getter (property_p);
|
||||
ecma_object_t *setter_obj_p = ecma_get_named_accessor_property_setter (property_p);
|
||||
ecma_property_value_t *prop_value_p = ECMA_PROPERTY_VALUE_PTR (property_p);
|
||||
ecma_object_t *getter_obj_p = ecma_get_named_accessor_property_getter (prop_value_p);
|
||||
ecma_object_t *setter_obj_p = ecma_get_named_accessor_property_setter (prop_value_p);
|
||||
|
||||
if (getter_obj_p != NULL)
|
||||
{
|
||||
@@ -328,7 +329,7 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
ecma_property_header_t *prop_iter_p = ecma_get_property_list (object_p);
|
||||
|
||||
if (prop_iter_p != NULL
|
||||
&& ECMA_PROPERTY_GET_TYPE (prop_iter_p->types + 0) == ECMA_PROPERTY_TYPE_HASHMAP)
|
||||
&& ECMA_PROPERTY_GET_TYPE (prop_iter_p->types[0]) == ECMA_PROPERTY_TYPE_HASHMAP)
|
||||
{
|
||||
prop_iter_p = ECMA_GET_POINTER (ecma_property_header_t,
|
||||
prop_iter_p->next_property_cp);
|
||||
@@ -338,12 +339,12 @@ ecma_gc_mark (ecma_object_t *object_p) /**< object to mark from */
|
||||
{
|
||||
JERRY_ASSERT (ECMA_PROPERTY_IS_PROPERTY_PAIR (prop_iter_p));
|
||||
|
||||
if (prop_iter_p->types[0].type_and_flags != ECMA_PROPERTY_TYPE_DELETED)
|
||||
if (prop_iter_p->types[0] != ECMA_PROPERTY_TYPE_DELETED)
|
||||
{
|
||||
ecma_gc_mark_property (prop_iter_p->types + 0);
|
||||
}
|
||||
|
||||
if (prop_iter_p->types[1].type_and_flags != ECMA_PROPERTY_TYPE_DELETED)
|
||||
if (prop_iter_p->types[1] != ECMA_PROPERTY_TYPE_DELETED)
|
||||
{
|
||||
ecma_gc_mark_property (prop_iter_p->types + 1);
|
||||
}
|
||||
@@ -392,7 +393,7 @@ ecma_gc_sweep (ecma_object_t *object_p) /**< object to free */
|
||||
ecma_property_header_t *prop_iter_p = ecma_get_property_list (object_p);
|
||||
|
||||
if (prop_iter_p != NULL
|
||||
&& ECMA_PROPERTY_GET_TYPE (prop_iter_p->types + 0) == ECMA_PROPERTY_TYPE_HASHMAP)
|
||||
&& ECMA_PROPERTY_GET_TYPE (prop_iter_p->types[0]) == ECMA_PROPERTY_TYPE_HASHMAP)
|
||||
{
|
||||
ecma_property_hashmap_free (object_p);
|
||||
prop_iter_p = ecma_get_property_list (object_p);
|
||||
@@ -403,14 +404,14 @@ ecma_gc_sweep (ecma_object_t *object_p) /**< object to free */
|
||||
JERRY_ASSERT (ECMA_PROPERTY_IS_PROPERTY_PAIR (prop_iter_p));
|
||||
|
||||
/* Both cannot be deleted. */
|
||||
JERRY_ASSERT (prop_iter_p->types[0].type_and_flags != ECMA_PROPERTY_TYPE_DELETED
|
||||
|| prop_iter_p->types[1].type_and_flags != ECMA_PROPERTY_TYPE_DELETED);
|
||||
JERRY_ASSERT (prop_iter_p->types[0] != ECMA_PROPERTY_TYPE_DELETED
|
||||
|| prop_iter_p->types[1] != ECMA_PROPERTY_TYPE_DELETED);
|
||||
|
||||
ecma_property_pair_t *prop_pair_p = (ecma_property_pair_t *) prop_iter_p;
|
||||
|
||||
for (int i = 0; i < ECMA_PROPERTY_PAIR_ITEM_COUNT; i++)
|
||||
{
|
||||
if (prop_iter_p->types[i].type_and_flags != ECMA_PROPERTY_TYPE_DELETED)
|
||||
if (prop_iter_p->types[i] != ECMA_PROPERTY_TYPE_DELETED)
|
||||
{
|
||||
ecma_string_t *name_p = ECMA_GET_POINTER (ecma_string_t, prop_pair_p->names_cp[i]);
|
||||
|
||||
@@ -424,8 +425,8 @@ ecma_gc_sweep (ecma_object_t *object_p) /**< object to free */
|
||||
}
|
||||
|
||||
/* Both must be deleted. */
|
||||
JERRY_ASSERT (prop_iter_p->types[0].type_and_flags == ECMA_PROPERTY_TYPE_DELETED
|
||||
&& prop_iter_p->types[1].type_and_flags == ECMA_PROPERTY_TYPE_DELETED);
|
||||
JERRY_ASSERT (prop_iter_p->types[0] == ECMA_PROPERTY_TYPE_DELETED
|
||||
&& prop_iter_p->types[1] == ECMA_PROPERTY_TYPE_DELETED);
|
||||
|
||||
prop_iter_p = ECMA_GET_POINTER (ecma_property_header_t,
|
||||
prop_iter_p->next_property_cp);
|
||||
@@ -555,7 +556,7 @@ ecma_gc_run (jmem_free_unused_memory_severity_t severity) /**< gc severity */
|
||||
{
|
||||
ecma_property_header_t *prop_iter_p = ecma_get_property_list (obj_iter_p);
|
||||
if (prop_iter_p != NULL
|
||||
&& ECMA_PROPERTY_GET_TYPE (prop_iter_p->types + 0) == ECMA_PROPERTY_TYPE_HASHMAP)
|
||||
&& ECMA_PROPERTY_GET_TYPE (prop_iter_p->types[0]) == ECMA_PROPERTY_TYPE_HASHMAP)
|
||||
{
|
||||
ecma_property_hashmap_free (obj_iter_p);
|
||||
}
|
||||
|
||||
@@ -273,6 +273,10 @@ typedef enum
|
||||
ECMA_PROPERTY_TYPE_HASHMAP, /**< hash map for fast property access */
|
||||
|
||||
ECMA_PROPERTY_TYPE__MAX = ECMA_PROPERTY_TYPE_HASHMAP, /**< highest value for property types. */
|
||||
|
||||
/* Property type aliases. */
|
||||
ECMA_PROPERTY_TYPE_NOT_FOUND = ECMA_PROPERTY_TYPE_DELETED, /**< property is not found */
|
||||
ECMA_PROPERTY_TYPE_VIRTUAL = ECMA_PROPERTY_TYPE_HASHMAP, /**< property is virtual */
|
||||
} ecma_property_types_t;
|
||||
|
||||
/**
|
||||
@@ -347,10 +351,7 @@ typedef enum
|
||||
* from the property address. However, property pointers cannot be compressed
|
||||
* anymore.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint8_t type_and_flags; /**< ecma_property_types_t (3 bit) and ecma_property_flags_t */
|
||||
} ecma_property_t;
|
||||
typedef uint8_t ecma_property_t; /**< ecma_property_types_t (3 bit) and ecma_property_flags_t */
|
||||
|
||||
/**
|
||||
* Number of items in a property pair.
|
||||
@@ -409,20 +410,20 @@ typedef struct
|
||||
/**
|
||||
* Get property type.
|
||||
*/
|
||||
#define ECMA_PROPERTY_GET_TYPE(property_p) \
|
||||
((ecma_property_types_t) ((property_p)->type_and_flags & ECMA_PROPERTY_TYPE_MASK))
|
||||
#define ECMA_PROPERTY_GET_TYPE(property) \
|
||||
((ecma_property_types_t) ((property) & ECMA_PROPERTY_TYPE_MASK))
|
||||
|
||||
/**
|
||||
* Returns true if the property pointer is a property pair.
|
||||
*/
|
||||
#define ECMA_PROPERTY_IS_PROPERTY_PAIR(property_header_p) \
|
||||
(ECMA_PROPERTY_GET_TYPE ((property_header_p)->types + 0) <= ECMA_PROPERTY_TYPE_PROPERTY_PAIR__MAX)
|
||||
(ECMA_PROPERTY_GET_TYPE ((property_header_p)->types[0]) <= ECMA_PROPERTY_TYPE_PROPERTY_PAIR__MAX)
|
||||
|
||||
/**
|
||||
* Returns the internal property type
|
||||
*/
|
||||
#define ECMA_PROPERTY_GET_INTERNAL_PROPERTY_TYPE(property_p) \
|
||||
((ecma_internal_property_id_t) ((property_p)->type_and_flags >> ECMA_PROPERTY_FLAG_SHIFT))
|
||||
((ecma_internal_property_id_t) (*(property_p) >> ECMA_PROPERTY_FLAG_SHIFT))
|
||||
|
||||
/**
|
||||
* Computing the data offset of a property.
|
||||
@@ -442,13 +443,31 @@ typedef struct
|
||||
#define ECMA_PROPERTY_VALUE_PTR(property_p) \
|
||||
(ECMA_PROPERTY_VALUE_BASE_PTR (property_p) + ECMA_PROPERTY_VALUE_OFFSET (property_p))
|
||||
|
||||
/**
|
||||
* Property reference.
|
||||
*/
|
||||
typedef union
|
||||
{
|
||||
ecma_property_value_t *value_p; /**< direct pointer to property value */
|
||||
ecma_value_t virtual_value; /**< property value */
|
||||
} ecma_property_ref_t;
|
||||
|
||||
/**
|
||||
* Option flags for ecma_op_object_get_property
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
ECMA_PROPERTY_GET_NO_OPTIONS = 0, /**< no option flags for ecma_op_object_get_property */
|
||||
ECMA_PROPERTY_GET_VALUE = 1u << 0, /**< fill virtual_value field for virtual properties */
|
||||
} ecma_property_get_option_bits_t;
|
||||
|
||||
/**
|
||||
* Internal object types
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
ECMA_OBJECT_TYPE_GENERAL = 0, /**< all objects that are not String (15.5), Function (15.3),
|
||||
Arguments (10.6), Array (15.4) specification-defined objects */
|
||||
ECMA_OBJECT_TYPE_GENERAL = 0, /**< all objects that are not String (15.5),
|
||||
* Function (15.3), Arguments (10.6), Array (15.4) objects */
|
||||
ECMA_OBJECT_TYPE_FUNCTION = 1, /**< Function objects (15.3), created through 13.2 routine */
|
||||
ECMA_OBJECT_TYPE_EXTERNAL_FUNCTION = 2, /**< External (host) function object */
|
||||
ECMA_OBJECT_TYPE_ARRAY = 3, /**< Array object (15.4) */
|
||||
|
||||
@@ -913,6 +913,8 @@ ecma_string_is_empty (const ecma_string_t *str_p) /**< ecma-string */
|
||||
inline bool __attr_always_inline___
|
||||
ecma_string_is_length (const ecma_string_t *string_p) /**< property name */
|
||||
{
|
||||
static const char length_str_p[] = "length";
|
||||
|
||||
ecma_string_container_t container = ECMA_STRING_GET_CONTAINER (string_p);
|
||||
|
||||
if (container == ECMA_STRING_CONTAINER_MAGIC_STRING)
|
||||
@@ -921,13 +923,13 @@ ecma_string_is_length (const ecma_string_t *string_p) /**< property name */
|
||||
}
|
||||
|
||||
if (container != ECMA_STRING_CONTAINER_HEAP_UTF8_STRING
|
||||
|| string_p->u.utf8_string.size != 6
|
||||
|| string_p->u.utf8_string.size != (sizeof (length_str_p) - 1)
|
||||
|| string_p->hash != LIT_STRING_LENGTH_HASH)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return !strncmp ((char *) (string_p + 1), "length", 6);
|
||||
return !strncmp ((char *) (string_p + 1), length_str_p, (sizeof (length_str_p) - 1));
|
||||
} /* ecma_string_is_length */
|
||||
|
||||
/**
|
||||
|
||||
+120
-207
@@ -373,13 +373,15 @@ ecma_get_lex_env_binding_object (const ecma_object_t *object_p) /**< object-boun
|
||||
* Create a property in an object and link it into
|
||||
* the object's properties' linked-list (at start of the list).
|
||||
*
|
||||
* @return pointer to newly created property
|
||||
* @return pointer to the newly created property value
|
||||
*/
|
||||
static ecma_property_t *
|
||||
static ecma_property_value_t *
|
||||
ecma_create_property (ecma_object_t *object_p, /**< the object */
|
||||
ecma_string_t *name_p, /**< property name */
|
||||
uint8_t type_and_flags, /**< type and flags, see ecma_property_info_t */
|
||||
ecma_property_value_t value) /**< property value */
|
||||
ecma_property_value_t value, /**< property value */
|
||||
ecma_property_t **out_prop_p) /**< [out] the property is also returned
|
||||
* if this field is non-NULL */
|
||||
{
|
||||
JERRY_ASSERT (ECMA_PROPERTY_PAIR_ITEM_COUNT == 2);
|
||||
|
||||
@@ -392,7 +394,7 @@ ecma_create_property (ecma_object_t *object_p, /**< the object */
|
||||
*property_list_head_p);
|
||||
bool has_hashmap = false;
|
||||
|
||||
if (ECMA_PROPERTY_GET_TYPE (first_property_p->types + 0) == ECMA_PROPERTY_TYPE_HASHMAP)
|
||||
if (ECMA_PROPERTY_GET_TYPE (first_property_p->types[0]) == ECMA_PROPERTY_TYPE_HASHMAP)
|
||||
{
|
||||
property_list_head_p = &first_property_p->next_property_cp;
|
||||
first_property_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t,
|
||||
@@ -402,9 +404,9 @@ ecma_create_property (ecma_object_t *object_p, /**< the object */
|
||||
|
||||
JERRY_ASSERT (ECMA_PROPERTY_IS_PROPERTY_PAIR (first_property_p));
|
||||
|
||||
if (first_property_p->types[0].type_and_flags == ECMA_PROPERTY_TYPE_DELETED)
|
||||
if (first_property_p->types[0] == ECMA_PROPERTY_TYPE_DELETED)
|
||||
{
|
||||
first_property_p->types[0].type_and_flags = type_and_flags;
|
||||
first_property_p->types[0] = type_and_flags;
|
||||
|
||||
ecma_property_pair_t *first_property_pair_p = (ecma_property_pair_t *) first_property_p;
|
||||
ECMA_SET_POINTER (first_property_pair_p->names_cp[0], name_p);
|
||||
@@ -413,6 +415,11 @@ ecma_create_property (ecma_object_t *object_p, /**< the object */
|
||||
|
||||
JERRY_ASSERT (ECMA_PROPERTY_VALUE_PTR (property_p) == first_property_pair_p->values + 0);
|
||||
|
||||
if (out_prop_p != NULL)
|
||||
{
|
||||
*out_prop_p = property_p;
|
||||
}
|
||||
|
||||
first_property_pair_p->values[0] = value;
|
||||
|
||||
/* The property must be fully initialized before ecma_property_hashmap_insert
|
||||
@@ -428,7 +435,7 @@ ecma_create_property (ecma_object_t *object_p, /**< the object */
|
||||
0);
|
||||
}
|
||||
|
||||
return property_p;
|
||||
return first_property_pair_p->values + 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -445,7 +452,7 @@ ecma_create_property (ecma_object_t *object_p, /**< the object */
|
||||
ecma_property_header_t *first_property_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t,
|
||||
*property_list_head_p);
|
||||
|
||||
if (ECMA_PROPERTY_GET_TYPE (first_property_p->types + 0) == ECMA_PROPERTY_TYPE_HASHMAP)
|
||||
if (ECMA_PROPERTY_GET_TYPE (first_property_p->types[0]) == ECMA_PROPERTY_TYPE_HASHMAP)
|
||||
{
|
||||
property_list_head_p = &first_property_p->next_property_cp;
|
||||
has_hashmap = true;
|
||||
@@ -454,8 +461,8 @@ ecma_create_property (ecma_object_t *object_p, /**< the object */
|
||||
|
||||
/* Just copy the previous value (no need to decompress, compress). */
|
||||
first_property_pair_p->header.next_property_cp = *property_list_head_p;
|
||||
first_property_pair_p->header.types[0].type_and_flags = ECMA_PROPERTY_TYPE_DELETED;
|
||||
first_property_pair_p->header.types[1].type_and_flags = type_and_flags;
|
||||
first_property_pair_p->header.types[0] = ECMA_PROPERTY_TYPE_DELETED;
|
||||
first_property_pair_p->header.types[1] = type_and_flags;
|
||||
first_property_pair_p->names_cp[0] = ECMA_NULL_POINTER;
|
||||
ECMA_SET_POINTER (first_property_pair_p->names_cp[1], name_p);
|
||||
|
||||
@@ -465,6 +472,11 @@ ecma_create_property (ecma_object_t *object_p, /**< the object */
|
||||
|
||||
JERRY_ASSERT (ECMA_PROPERTY_VALUE_PTR (property_p) == first_property_pair_p->values + 1);
|
||||
|
||||
if (out_prop_p != NULL)
|
||||
{
|
||||
*out_prop_p = property_p;
|
||||
}
|
||||
|
||||
first_property_pair_p->values[1] = value;
|
||||
|
||||
/* See the comment before the other ecma_property_hashmap_insert above. */
|
||||
@@ -477,14 +489,14 @@ ecma_create_property (ecma_object_t *object_p, /**< the object */
|
||||
1);
|
||||
}
|
||||
|
||||
return property_p;
|
||||
return first_property_pair_p->values + 1;
|
||||
} /* ecma_create_property */
|
||||
|
||||
/**
|
||||
* Create internal property in an object and link it into
|
||||
* the object's properties' linked-list (at start of the list).
|
||||
*
|
||||
* @return pointer to newly created property
|
||||
* @return pointer to the newly created property value
|
||||
*/
|
||||
ecma_value_t *
|
||||
ecma_create_internal_property (ecma_object_t *object_p, /**< the object */
|
||||
@@ -498,8 +510,8 @@ ecma_create_internal_property (ecma_object_t *object_p, /**< the object */
|
||||
ecma_property_value_t value;
|
||||
value.value = ECMA_NULL_POINTER;
|
||||
|
||||
ecma_property_t *property_p = ecma_create_property (object_p, NULL, type_and_flags, value);
|
||||
return &ECMA_PROPERTY_VALUE_PTR (property_p)->value;
|
||||
ecma_property_value_t *prop_value_p = ecma_create_property (object_p, NULL, type_and_flags, value, NULL);
|
||||
return &prop_value_p->value;
|
||||
} /* ecma_create_internal_property */
|
||||
|
||||
/**
|
||||
@@ -517,7 +529,7 @@ ecma_find_internal_property (ecma_object_t *object_p, /**< object descriptor */
|
||||
ecma_property_header_t *prop_iter_p = ecma_get_property_list (object_p);
|
||||
|
||||
if (prop_iter_p != NULL
|
||||
&& ECMA_PROPERTY_GET_TYPE (prop_iter_p->types + 0) == ECMA_PROPERTY_TYPE_HASHMAP)
|
||||
&& ECMA_PROPERTY_GET_TYPE (prop_iter_p->types[0]) == ECMA_PROPERTY_TYPE_HASHMAP)
|
||||
{
|
||||
prop_iter_p = ECMA_GET_POINTER (ecma_property_header_t,
|
||||
prop_iter_p->next_property_cp);
|
||||
@@ -527,14 +539,14 @@ ecma_find_internal_property (ecma_object_t *object_p, /**< object descriptor */
|
||||
{
|
||||
JERRY_ASSERT (ECMA_PROPERTY_IS_PROPERTY_PAIR (prop_iter_p));
|
||||
|
||||
if (ECMA_PROPERTY_GET_TYPE (&prop_iter_p->types[0]) == ECMA_PROPERTY_TYPE_INTERNAL
|
||||
if (ECMA_PROPERTY_GET_TYPE (prop_iter_p->types[0]) == ECMA_PROPERTY_TYPE_INTERNAL
|
||||
&& ECMA_PROPERTY_GET_INTERNAL_PROPERTY_TYPE (prop_iter_p->types + 0) == property_id)
|
||||
{
|
||||
ecma_property_pair_t *prop_pair_p = (ecma_property_pair_t *) prop_iter_p;
|
||||
return &prop_pair_p->values[0].value;
|
||||
}
|
||||
|
||||
if (ECMA_PROPERTY_GET_TYPE (&prop_iter_p->types[1]) == ECMA_PROPERTY_TYPE_INTERNAL
|
||||
if (ECMA_PROPERTY_GET_TYPE (prop_iter_p->types[1]) == ECMA_PROPERTY_TYPE_INTERNAL
|
||||
&& ECMA_PROPERTY_GET_INTERNAL_PROPERTY_TYPE (prop_iter_p->types + 1) == property_id)
|
||||
{
|
||||
ecma_property_pair_t *prop_pair_p = (ecma_property_pair_t *) prop_iter_p;
|
||||
@@ -571,12 +583,14 @@ ecma_get_internal_property (ecma_object_t *object_p, /**< object descriptor */
|
||||
* Create named data property with given name, attributes and undefined value
|
||||
* in the specified object.
|
||||
*
|
||||
* @return pointer to newly created property
|
||||
* @return pointer to the newly created property value
|
||||
*/
|
||||
ecma_property_t *
|
||||
ecma_property_value_t *
|
||||
ecma_create_named_data_property (ecma_object_t *object_p, /**< object */
|
||||
ecma_string_t *name_p, /**< property name */
|
||||
uint8_t prop_attributes) /**< property attributes (See: ecma_property_flags_t) */
|
||||
uint8_t prop_attributes, /**< property attributes (See: ecma_property_flags_t) */
|
||||
ecma_property_t **out_prop_p) /**< [out] the property is also returned
|
||||
* if this field is non-NULL */
|
||||
{
|
||||
JERRY_ASSERT (object_p != NULL && name_p != NULL);
|
||||
JERRY_ASSERT (ecma_find_named_property (object_p, name_p) == NULL);
|
||||
@@ -589,15 +603,15 @@ ecma_create_named_data_property (ecma_object_t *object_p, /**< object */
|
||||
ecma_property_value_t value;
|
||||
value.value = ecma_make_simple_value (ECMA_SIMPLE_VALUE_UNDEFINED);
|
||||
|
||||
return ecma_create_property (object_p, name_p, type_and_flags, value);
|
||||
return ecma_create_property (object_p, name_p, type_and_flags, value, out_prop_p);
|
||||
} /* ecma_create_named_data_property */
|
||||
|
||||
/**
|
||||
* Create named accessor property with given name, attributes, getter and setter.
|
||||
*
|
||||
* @return pointer to newly created property
|
||||
* @return pointer to the newly created property value
|
||||
*/
|
||||
ecma_property_t *
|
||||
ecma_property_value_t *
|
||||
ecma_create_named_accessor_property (ecma_object_t *object_p, /**< object */
|
||||
ecma_string_t *name_p, /**< property name */
|
||||
ecma_object_t *get_p, /**< getter */
|
||||
@@ -624,7 +638,7 @@ ecma_create_named_accessor_property (ecma_object_t *object_p, /**< object */
|
||||
ECMA_SET_POINTER (value.getter_setter_pair.setter_p, set_p);
|
||||
#endif /* JERRY_CPOINTER_32_BIT */
|
||||
|
||||
return ecma_create_property (object_p, name_p, type_and_flags, value);
|
||||
return ecma_create_property (object_p, name_p, type_and_flags, value, NULL);
|
||||
} /* ecma_create_named_accessor_property */
|
||||
|
||||
/**
|
||||
@@ -651,7 +665,7 @@ ecma_find_named_property (ecma_object_t *obj_p, /**< object to find property in
|
||||
|
||||
#ifndef CONFIG_ECMA_PROPERTY_HASHMAP_DISABLE
|
||||
if (prop_iter_p != NULL
|
||||
&& ECMA_PROPERTY_GET_TYPE (prop_iter_p->types + 0) == ECMA_PROPERTY_TYPE_HASHMAP)
|
||||
&& ECMA_PROPERTY_GET_TYPE (prop_iter_p->types[0]) == ECMA_PROPERTY_TYPE_HASHMAP)
|
||||
{
|
||||
ecma_string_t *property_real_name_p;
|
||||
property_p = ecma_property_hashmap_find ((ecma_property_hashmap_t *) prop_iter_p,
|
||||
@@ -734,30 +748,7 @@ ecma_find_named_property (ecma_object_t *obj_p, /**< object to find property in
|
||||
* @return pointer to the property, if it is found,
|
||||
* NULL - otherwise.
|
||||
*/
|
||||
ecma_property_t *
|
||||
ecma_get_named_property (ecma_object_t *obj_p, /**< object to find property in */
|
||||
ecma_string_t *name_p) /**< property's name */
|
||||
{
|
||||
JERRY_ASSERT (obj_p != NULL);
|
||||
JERRY_ASSERT (name_p != NULL);
|
||||
|
||||
ecma_property_t *property_p = ecma_find_named_property (obj_p, name_p);
|
||||
|
||||
JERRY_ASSERT (property_p != NULL);
|
||||
|
||||
return property_p;
|
||||
} /* ecma_get_named_property */
|
||||
|
||||
/**
|
||||
* Get named data property in specified object.
|
||||
*
|
||||
* Warning:
|
||||
* the property must exist and be named data property
|
||||
*
|
||||
* @return pointer to the property, if it is found,
|
||||
* NULL - otherwise.
|
||||
*/
|
||||
ecma_property_t *
|
||||
ecma_property_value_t *
|
||||
ecma_get_named_data_property (ecma_object_t *obj_p, /**< object to find property in */
|
||||
ecma_string_t *name_p) /**< property's name */
|
||||
{
|
||||
@@ -766,9 +757,10 @@ ecma_get_named_data_property (ecma_object_t *obj_p, /**< object to find property
|
||||
|
||||
ecma_property_t *property_p = ecma_find_named_property (obj_p, name_p);
|
||||
|
||||
JERRY_ASSERT (property_p != NULL && ECMA_PROPERTY_GET_TYPE (property_p) == ECMA_PROPERTY_TYPE_NAMEDDATA);
|
||||
JERRY_ASSERT (property_p != NULL
|
||||
&& ECMA_PROPERTY_GET_TYPE (*property_p) == ECMA_PROPERTY_TYPE_NAMEDDATA);
|
||||
|
||||
return property_p;
|
||||
return ECMA_PROPERTY_VALUE_PTR (property_p);
|
||||
} /* ecma_get_named_data_property */
|
||||
|
||||
/**
|
||||
@@ -777,7 +769,7 @@ ecma_get_named_data_property (ecma_object_t *obj_p, /**< object to find property
|
||||
static void
|
||||
ecma_free_internal_property (ecma_property_t *property_p) /**< the property */
|
||||
{
|
||||
JERRY_ASSERT (property_p != NULL && ECMA_PROPERTY_GET_TYPE (property_p) == ECMA_PROPERTY_TYPE_INTERNAL);
|
||||
JERRY_ASSERT (property_p != NULL && ECMA_PROPERTY_GET_TYPE (*property_p) == ECMA_PROPERTY_TYPE_INTERNAL);
|
||||
|
||||
uint32_t property_value = ECMA_PROPERTY_VALUE_PTR (property_p)->value;
|
||||
|
||||
@@ -863,11 +855,11 @@ ecma_free_property (ecma_object_t *object_p, /**< object the property belongs to
|
||||
{
|
||||
JERRY_ASSERT (object_p != NULL && property_p != NULL);
|
||||
|
||||
switch (ECMA_PROPERTY_GET_TYPE (property_p))
|
||||
switch (ECMA_PROPERTY_GET_TYPE (*property_p))
|
||||
{
|
||||
case ECMA_PROPERTY_TYPE_NAMEDDATA:
|
||||
{
|
||||
ecma_free_value_if_not_object (ecma_get_named_data_property_value (property_p));
|
||||
ecma_free_value_if_not_object (ECMA_PROPERTY_VALUE_PTR (property_p)->value);
|
||||
|
||||
if (ecma_is_property_lcached (property_p))
|
||||
{
|
||||
@@ -903,24 +895,24 @@ ecma_free_property (ecma_object_t *object_p, /**< object the property belongs to
|
||||
}
|
||||
}
|
||||
|
||||
property_p->type_and_flags = ECMA_PROPERTY_TYPE_DELETED;
|
||||
*property_p = ECMA_PROPERTY_TYPE_DELETED;
|
||||
} /* ecma_free_property */
|
||||
|
||||
/**
|
||||
* Delete the object's property.
|
||||
* Delete the object's property referenced by its value pointer.
|
||||
*
|
||||
* Warning: specified property must be owned by specified object.
|
||||
* Note: specified property must be owned by specified object.
|
||||
*/
|
||||
void
|
||||
ecma_delete_property (ecma_object_t *object_p, /**< object */
|
||||
ecma_property_t *prop_p) /**< property */
|
||||
ecma_property_value_t *prop_value_p) /**< property value reference */
|
||||
{
|
||||
ecma_property_header_t *cur_prop_p = ecma_get_property_list (object_p);
|
||||
ecma_property_header_t *prev_prop_p = NULL;
|
||||
bool has_hashmap = false;
|
||||
|
||||
if (cur_prop_p != NULL
|
||||
&& ECMA_PROPERTY_GET_TYPE (cur_prop_p->types + 0) == ECMA_PROPERTY_TYPE_HASHMAP)
|
||||
&& ECMA_PROPERTY_GET_TYPE (cur_prop_p->types[0]) == ECMA_PROPERTY_TYPE_HASHMAP)
|
||||
{
|
||||
prev_prop_p = cur_prop_p;
|
||||
cur_prop_p = ECMA_GET_POINTER (ecma_property_header_t,
|
||||
@@ -937,7 +929,7 @@ ecma_delete_property (ecma_object_t *object_p, /**< object */
|
||||
|
||||
for (int i = 0; i < ECMA_PROPERTY_PAIR_ITEM_COUNT; i++)
|
||||
{
|
||||
if ((cur_prop_p->types + i) == prop_p)
|
||||
if ((prop_pair_p->values + i) == prop_value_p)
|
||||
{
|
||||
ecma_string_t *name_p = ECMA_GET_POINTER (ecma_string_t, prop_pair_p->names_cp[i]);
|
||||
|
||||
@@ -949,7 +941,7 @@ ecma_delete_property (ecma_object_t *object_p, /**< object */
|
||||
{
|
||||
ecma_property_hashmap_delete (object_p,
|
||||
name_p,
|
||||
prop_p);
|
||||
cur_prop_p->types + i);
|
||||
}
|
||||
|
||||
ecma_deref_ecma_string (name_p);
|
||||
@@ -959,13 +951,13 @@ ecma_delete_property (ecma_object_t *object_p, /**< object */
|
||||
|
||||
JERRY_ASSERT (ECMA_PROPERTY_PAIR_ITEM_COUNT == 2);
|
||||
|
||||
if (cur_prop_p->types[1 - i].type_and_flags != ECMA_PROPERTY_TYPE_DELETED)
|
||||
if (cur_prop_p->types[1 - i] != ECMA_PROPERTY_TYPE_DELETED)
|
||||
{
|
||||
/* The other property is still valid. */
|
||||
return;
|
||||
}
|
||||
|
||||
JERRY_ASSERT (cur_prop_p->types[i].type_and_flags == ECMA_PROPERTY_TYPE_DELETED);
|
||||
JERRY_ASSERT (cur_prop_p->types[i] == ECMA_PROPERTY_TYPE_DELETED);
|
||||
|
||||
if (prev_prop_p == NULL)
|
||||
{
|
||||
@@ -992,14 +984,15 @@ ecma_delete_property (ecma_object_t *object_p, /**< object */
|
||||
*/
|
||||
static void
|
||||
ecma_assert_object_contains_the_property (const ecma_object_t *object_p, /**< ecma-object */
|
||||
const ecma_property_t *prop_p) /**< ecma-property */
|
||||
const ecma_property_value_t *prop_value_p, /**< property value */
|
||||
ecma_property_types_t type) /**< expected property type */
|
||||
{
|
||||
#ifndef JERRY_NDEBUG
|
||||
ecma_property_header_t *prop_iter_p = ecma_get_property_list (object_p);
|
||||
|
||||
JERRY_ASSERT (prop_iter_p != NULL);
|
||||
|
||||
if (ECMA_PROPERTY_GET_TYPE (prop_iter_p->types + 0) == ECMA_PROPERTY_TYPE_HASHMAP)
|
||||
if (ECMA_PROPERTY_GET_TYPE (prop_iter_p->types[0]) == ECMA_PROPERTY_TYPE_HASHMAP)
|
||||
{
|
||||
prop_iter_p = ECMA_GET_POINTER (ecma_property_header_t,
|
||||
prop_iter_p->next_property_cp);
|
||||
@@ -1013,8 +1006,9 @@ ecma_assert_object_contains_the_property (const ecma_object_t *object_p, /**< ec
|
||||
|
||||
for (int i = 0; i < ECMA_PROPERTY_PAIR_ITEM_COUNT; i++)
|
||||
{
|
||||
if ((prop_pair_p->header.types + i) == prop_p)
|
||||
if ((prop_pair_p->values + i) == prop_value_p)
|
||||
{
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (prop_pair_p->header.types[i]) == type);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1027,50 +1021,23 @@ ecma_assert_object_contains_the_property (const ecma_object_t *object_p, /**< ec
|
||||
|
||||
#else /* JERRY_NDEBUG */
|
||||
JERRY_UNUSED (object_p);
|
||||
JERRY_UNUSED (prop_p);
|
||||
JERRY_UNUSED (prop_value_p);
|
||||
JERRY_UNUSED (type);
|
||||
#endif /* !JERRY_NDEBUG */
|
||||
} /* ecma_assert_object_contains_the_property */
|
||||
|
||||
/**
|
||||
* Get value field of named data property
|
||||
*
|
||||
* @return ecma value
|
||||
*/
|
||||
inline ecma_value_t __attr_always_inline___
|
||||
ecma_get_named_data_property_value (const ecma_property_t *prop_p) /**< property */
|
||||
{
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDDATA);
|
||||
|
||||
return ECMA_PROPERTY_VALUE_PTR (prop_p)->value;
|
||||
} /* ecma_get_named_data_property_value */
|
||||
|
||||
/**
|
||||
* Set value field of named data property
|
||||
*/
|
||||
inline void __attr_always_inline___
|
||||
ecma_set_named_data_property_value (ecma_property_t *prop_p, /**< property */
|
||||
ecma_value_t value) /**< value to set */
|
||||
{
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDDATA);
|
||||
|
||||
ECMA_PROPERTY_VALUE_PTR (prop_p)->value = value;
|
||||
} /* ecma_set_named_data_property_value */
|
||||
|
||||
/**
|
||||
* Assign value to named data property
|
||||
*
|
||||
* Note:
|
||||
* value previously stored in the property is freed
|
||||
*/
|
||||
void
|
||||
inline void __attr_always_inline___
|
||||
ecma_named_data_property_assign_value (ecma_object_t *obj_p, /**< object */
|
||||
ecma_property_t *prop_p, /**< property */
|
||||
ecma_property_value_t *prop_value_p, /**< property value reference */
|
||||
ecma_value_t value) /**< value to assign */
|
||||
{
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDDATA);
|
||||
ecma_assert_object_contains_the_property (obj_p, prop_p);
|
||||
|
||||
ecma_property_value_t *prop_value_p = ECMA_PROPERTY_VALUE_PTR (prop_p);
|
||||
ecma_assert_object_contains_the_property (obj_p, prop_value_p, ECMA_PROPERTY_TYPE_NAMEDDATA);
|
||||
|
||||
ecma_value_assign_value (&prop_value_p->value, value);
|
||||
} /* ecma_named_data_property_assign_value */
|
||||
@@ -1081,17 +1048,15 @@ ecma_named_data_property_assign_value (ecma_object_t *obj_p, /**< object */
|
||||
* @return pointer to object - getter of the property
|
||||
*/
|
||||
ecma_object_t *
|
||||
ecma_get_named_accessor_property_getter (const ecma_property_t *prop_p) /**< named accessor property */
|
||||
ecma_get_named_accessor_property_getter (const ecma_property_value_t *prop_value_p) /**< property value reference */
|
||||
{
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR);
|
||||
|
||||
#ifdef JERRY_CPOINTER_32_BIT
|
||||
ecma_getter_setter_pointers_t *getter_setter_pair_p;
|
||||
getter_setter_pair_p = ECMA_GET_POINTER (ecma_getter_setter_pointers_t,
|
||||
ECMA_PROPERTY_VALUE_PTR (prop_p)->getter_setter_pair_cp);
|
||||
prop_value_p->getter_setter_pair_cp);
|
||||
return ECMA_GET_POINTER (ecma_object_t, getter_setter_pair_p->getter_p);
|
||||
#else /* !JERRY_CPOINTER_32_BIT */
|
||||
return ECMA_GET_POINTER (ecma_object_t, ECMA_PROPERTY_VALUE_PTR (prop_p)->getter_setter_pair.getter_p);
|
||||
return ECMA_GET_POINTER (ecma_object_t, prop_value_p->getter_setter_pair.getter_p);
|
||||
#endif /* JERRY_CPOINTER_32_BIT */
|
||||
} /* ecma_get_named_accessor_property_getter */
|
||||
|
||||
@@ -1101,17 +1066,15 @@ ecma_get_named_accessor_property_getter (const ecma_property_t *prop_p) /**< nam
|
||||
* @return pointer to object - setter of the property
|
||||
*/
|
||||
ecma_object_t *
|
||||
ecma_get_named_accessor_property_setter (const ecma_property_t *prop_p) /**< named accessor property */
|
||||
ecma_get_named_accessor_property_setter (const ecma_property_value_t *prop_value_p) /**< property value reference */
|
||||
{
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR);
|
||||
|
||||
#ifdef JERRY_CPOINTER_32_BIT
|
||||
ecma_getter_setter_pointers_t *getter_setter_pair_p;
|
||||
getter_setter_pair_p = ECMA_GET_POINTER (ecma_getter_setter_pointers_t,
|
||||
ECMA_PROPERTY_VALUE_PTR (prop_p)->getter_setter_pair_cp);
|
||||
prop_value_p->getter_setter_pair_cp);
|
||||
return ECMA_GET_POINTER (ecma_object_t, getter_setter_pair_p->setter_p);
|
||||
#else /* !JERRY_CPOINTER_32_BIT */
|
||||
return ECMA_GET_POINTER (ecma_object_t, ECMA_PROPERTY_VALUE_PTR (prop_p)->getter_setter_pair.setter_p);
|
||||
return ECMA_GET_POINTER (ecma_object_t, prop_value_p->getter_setter_pair.setter_p);
|
||||
#endif /* JERRY_CPOINTER_32_BIT */
|
||||
} /* ecma_get_named_accessor_property_setter */
|
||||
|
||||
@@ -1120,19 +1083,18 @@ ecma_get_named_accessor_property_setter (const ecma_property_t *prop_p) /**< nam
|
||||
*/
|
||||
void
|
||||
ecma_set_named_accessor_property_getter (ecma_object_t *object_p, /**< the property's container */
|
||||
ecma_property_t *prop_p, /**< named accessor property */
|
||||
ecma_property_value_t *prop_value_p, /**< property value reference */
|
||||
ecma_object_t *getter_p) /**< getter object */
|
||||
{
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR);
|
||||
ecma_assert_object_contains_the_property (object_p, prop_p);
|
||||
ecma_assert_object_contains_the_property (object_p, prop_value_p, ECMA_PROPERTY_TYPE_NAMEDACCESSOR);
|
||||
|
||||
#ifdef JERRY_CPOINTER_32_BIT
|
||||
ecma_getter_setter_pointers_t *getter_setter_pair_p;
|
||||
getter_setter_pair_p = ECMA_GET_POINTER (ecma_getter_setter_pointers_t,
|
||||
ECMA_PROPERTY_VALUE_PTR (prop_p)->getter_setter_pair_cp);
|
||||
prop_value_p->getter_setter_pair_cp);
|
||||
ECMA_SET_POINTER (getter_setter_pair_p->getter_p, getter_p);
|
||||
#else /* !JERRY_CPOINTER_32_BIT */
|
||||
ECMA_SET_POINTER (ECMA_PROPERTY_VALUE_PTR (prop_p)->getter_setter_pair.getter_p, getter_p);
|
||||
ECMA_SET_POINTER (prop_value_p->getter_setter_pair.getter_p, getter_p);
|
||||
#endif /* JERRY_CPOINTER_32_BIT */
|
||||
} /* ecma_set_named_accessor_property_getter */
|
||||
|
||||
@@ -1141,19 +1103,18 @@ ecma_set_named_accessor_property_getter (ecma_object_t *object_p, /**< the prope
|
||||
*/
|
||||
void
|
||||
ecma_set_named_accessor_property_setter (ecma_object_t *object_p, /**< the property's container */
|
||||
ecma_property_t *prop_p, /**< named accessor property */
|
||||
ecma_property_value_t *prop_value_p, /**< property value reference */
|
||||
ecma_object_t *setter_p) /**< setter object */
|
||||
{
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR);
|
||||
ecma_assert_object_contains_the_property (object_p, prop_p);
|
||||
ecma_assert_object_contains_the_property (object_p, prop_value_p, ECMA_PROPERTY_TYPE_NAMEDACCESSOR);
|
||||
|
||||
#ifdef JERRY_CPOINTER_32_BIT
|
||||
ecma_getter_setter_pointers_t *getter_setter_pair_p;
|
||||
getter_setter_pair_p = ECMA_GET_POINTER (ecma_getter_setter_pointers_t,
|
||||
ECMA_PROPERTY_VALUE_PTR (prop_p)->getter_setter_pair_cp);
|
||||
prop_value_p->getter_setter_pair_cp);
|
||||
ECMA_SET_POINTER (getter_setter_pair_p->setter_p, setter_p);
|
||||
#else /* !JERRY_CPOINTER_32_BIT */
|
||||
ECMA_SET_POINTER (ECMA_PROPERTY_VALUE_PTR (prop_p)->getter_setter_pair.setter_p, setter_p);
|
||||
ECMA_SET_POINTER (prop_value_p->getter_setter_pair.setter_p, setter_p);
|
||||
#endif /* JERRY_CPOINTER_32_BIT */
|
||||
} /* ecma_set_named_accessor_property_setter */
|
||||
|
||||
@@ -1164,30 +1125,30 @@ ecma_set_named_accessor_property_setter (ecma_object_t *object_p, /**< the prope
|
||||
* false - otherwise.
|
||||
*/
|
||||
inline bool __attr_always_inline___
|
||||
ecma_is_property_writable (ecma_property_t *prop_p) /**< property */
|
||||
ecma_is_property_writable (ecma_property_t property) /**< property */
|
||||
{
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDDATA);
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (property) == ECMA_PROPERTY_TYPE_NAMEDDATA
|
||||
|| ECMA_PROPERTY_GET_TYPE (property) == ECMA_PROPERTY_TYPE_VIRTUAL);
|
||||
|
||||
return (prop_p->type_and_flags & ECMA_PROPERTY_FLAG_WRITABLE) != 0;
|
||||
return (property & ECMA_PROPERTY_FLAG_WRITABLE) != 0;
|
||||
} /* ecma_is_property_writable */
|
||||
|
||||
/**
|
||||
* Set property's 'Writable' attribute value
|
||||
*/
|
||||
void
|
||||
ecma_set_property_writable_attr (ecma_property_t *prop_p, /**< property */
|
||||
bool is_writable) /**< should the property
|
||||
* be writable? */
|
||||
ecma_set_property_writable_attr (ecma_property_t *property_p, /**< [in,out] property */
|
||||
bool is_writable) /**< new value for writable flag */
|
||||
{
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDDATA);
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (*property_p) == ECMA_PROPERTY_TYPE_NAMEDDATA);
|
||||
|
||||
if (is_writable)
|
||||
{
|
||||
prop_p->type_and_flags = (uint8_t) (prop_p->type_and_flags | ECMA_PROPERTY_FLAG_WRITABLE);
|
||||
*property_p = (uint8_t) (*property_p | ECMA_PROPERTY_FLAG_WRITABLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
prop_p->type_and_flags = (uint8_t) (prop_p->type_and_flags & ~ECMA_PROPERTY_FLAG_WRITABLE);
|
||||
*property_p = (uint8_t) (*property_p & ~ECMA_PROPERTY_FLAG_WRITABLE);
|
||||
}
|
||||
} /* ecma_set_property_writable_attr */
|
||||
|
||||
@@ -1198,32 +1159,32 @@ ecma_set_property_writable_attr (ecma_property_t *prop_p, /**< property */
|
||||
* false - otherwise.
|
||||
*/
|
||||
inline bool __attr_always_inline___
|
||||
ecma_is_property_enumerable (ecma_property_t *prop_p) /**< property */
|
||||
ecma_is_property_enumerable (ecma_property_t property) /**< property */
|
||||
{
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDDATA
|
||||
|| ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR);
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (property) == ECMA_PROPERTY_TYPE_NAMEDDATA
|
||||
|| ECMA_PROPERTY_GET_TYPE (property) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR
|
||||
|| ECMA_PROPERTY_GET_TYPE (property) == ECMA_PROPERTY_TYPE_VIRTUAL);
|
||||
|
||||
return (prop_p->type_and_flags & ECMA_PROPERTY_FLAG_ENUMERABLE) != 0;
|
||||
return (property & ECMA_PROPERTY_FLAG_ENUMERABLE) != 0;
|
||||
} /* ecma_is_property_enumerable */
|
||||
|
||||
/**
|
||||
* Set property's 'Enumerable' attribute value
|
||||
*/
|
||||
void
|
||||
ecma_set_property_enumerable_attr (ecma_property_t *prop_p, /**< property */
|
||||
bool is_enumerable) /**< should the property
|
||||
* be enumerable? */
|
||||
ecma_set_property_enumerable_attr (ecma_property_t *property_p, /**< [in,out] property */
|
||||
bool is_enumerable) /**< new value for enumerable flag */
|
||||
{
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDDATA
|
||||
|| ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR);
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (*property_p) == ECMA_PROPERTY_TYPE_NAMEDDATA
|
||||
|| ECMA_PROPERTY_GET_TYPE (*property_p) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR);
|
||||
|
||||
if (is_enumerable)
|
||||
{
|
||||
prop_p->type_and_flags = (uint8_t) (prop_p->type_and_flags | ECMA_PROPERTY_FLAG_ENUMERABLE);
|
||||
*property_p = (uint8_t) (*property_p | ECMA_PROPERTY_FLAG_ENUMERABLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
prop_p->type_and_flags = (uint8_t) (prop_p->type_and_flags & ~ECMA_PROPERTY_FLAG_ENUMERABLE);
|
||||
*property_p = (uint8_t) (*property_p & ~ECMA_PROPERTY_FLAG_ENUMERABLE);
|
||||
}
|
||||
} /* ecma_set_property_enumerable_attr */
|
||||
|
||||
@@ -1234,32 +1195,32 @@ ecma_set_property_enumerable_attr (ecma_property_t *prop_p, /**< property */
|
||||
* false - otherwise.
|
||||
*/
|
||||
inline bool __attr_always_inline___
|
||||
ecma_is_property_configurable (ecma_property_t *prop_p) /**< property */
|
||||
ecma_is_property_configurable (ecma_property_t property) /**< property */
|
||||
{
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDDATA
|
||||
|| ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR);
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (property) == ECMA_PROPERTY_TYPE_NAMEDDATA
|
||||
|| ECMA_PROPERTY_GET_TYPE (property) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR
|
||||
|| ECMA_PROPERTY_GET_TYPE (property) == ECMA_PROPERTY_TYPE_VIRTUAL);
|
||||
|
||||
return (prop_p->type_and_flags & ECMA_PROPERTY_FLAG_CONFIGURABLE) != 0;
|
||||
return (property & ECMA_PROPERTY_FLAG_CONFIGURABLE) != 0;
|
||||
} /* ecma_is_property_configurable */
|
||||
|
||||
/**
|
||||
* Set property's 'Configurable' attribute value
|
||||
*/
|
||||
void
|
||||
ecma_set_property_configurable_attr (ecma_property_t *prop_p, /**< property */
|
||||
bool is_configurable) /**< should the property
|
||||
* be configurable? */
|
||||
ecma_set_property_configurable_attr (ecma_property_t *property_p, /**< [in,out] property */
|
||||
bool is_configurable) /**< new value for configurable flag */
|
||||
{
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDDATA
|
||||
|| ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR);
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (*property_p) == ECMA_PROPERTY_TYPE_NAMEDDATA
|
||||
|| ECMA_PROPERTY_GET_TYPE (*property_p) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR);
|
||||
|
||||
if (is_configurable)
|
||||
{
|
||||
prop_p->type_and_flags = (uint8_t) (prop_p->type_and_flags | ECMA_PROPERTY_FLAG_CONFIGURABLE);
|
||||
*property_p = (uint8_t) (*property_p | ECMA_PROPERTY_FLAG_CONFIGURABLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
prop_p->type_and_flags = (uint8_t) (prop_p->type_and_flags & ~ECMA_PROPERTY_FLAG_CONFIGURABLE);
|
||||
*property_p = (uint8_t) (*property_p & ~ECMA_PROPERTY_FLAG_CONFIGURABLE);
|
||||
}
|
||||
} /* ecma_set_property_configurable_attr */
|
||||
|
||||
@@ -1269,31 +1230,31 @@ ecma_set_property_configurable_attr (ecma_property_t *prop_p, /**< property */
|
||||
* @return true / false
|
||||
*/
|
||||
inline bool __attr_always_inline___
|
||||
ecma_is_property_lcached (ecma_property_t *prop_p) /**< property */
|
||||
ecma_is_property_lcached (ecma_property_t *property_p) /**< property */
|
||||
{
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDDATA
|
||||
|| ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR);
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (*property_p) == ECMA_PROPERTY_TYPE_NAMEDDATA
|
||||
|| ECMA_PROPERTY_GET_TYPE (*property_p) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR);
|
||||
|
||||
return (prop_p->type_and_flags & ECMA_PROPERTY_FLAG_LCACHED) != 0;
|
||||
return (*property_p & ECMA_PROPERTY_FLAG_LCACHED) != 0;
|
||||
} /* ecma_is_property_lcached */
|
||||
|
||||
/**
|
||||
* Set value of flag indicating whether the property is registered in LCache
|
||||
*/
|
||||
inline void __attr_always_inline___
|
||||
ecma_set_property_lcached (ecma_property_t *prop_p, /**< property */
|
||||
bool is_lcached) /**< contained (true) or not (false) */
|
||||
ecma_set_property_lcached (ecma_property_t *property_p, /**< property */
|
||||
bool is_lcached) /**< new value for lcached flag */
|
||||
{
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDDATA
|
||||
|| ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR);
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (*property_p) == ECMA_PROPERTY_TYPE_NAMEDDATA
|
||||
|| ECMA_PROPERTY_GET_TYPE (*property_p) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR);
|
||||
|
||||
if (is_lcached)
|
||||
{
|
||||
prop_p->type_and_flags = (uint8_t) (prop_p->type_and_flags | ECMA_PROPERTY_FLAG_LCACHED);
|
||||
*property_p = (uint8_t) (*property_p | ECMA_PROPERTY_FLAG_LCACHED);
|
||||
}
|
||||
else
|
||||
{
|
||||
prop_p->type_and_flags = (uint8_t) (prop_p->type_and_flags & ~ECMA_PROPERTY_FLAG_LCACHED);
|
||||
*property_p = (uint8_t) (*property_p & ~ECMA_PROPERTY_FLAG_LCACHED);
|
||||
}
|
||||
} /* ecma_set_property_lcached */
|
||||
|
||||
@@ -1349,54 +1310,6 @@ ecma_free_property_descriptor (ecma_property_descriptor_t *prop_desc_p) /**< pro
|
||||
*prop_desc_p = ecma_make_empty_property_descriptor ();
|
||||
} /* ecma_free_property_descriptor */
|
||||
|
||||
/**
|
||||
* Construct property descriptor from specified property
|
||||
*
|
||||
* @return property descriptor, corresponding to type and content of the specified property, i.e.:
|
||||
* - for named data properties: { [Value], [Writable], [Enumerable], [Configurable] };
|
||||
* - for named accessor properties: { [Get] - if defined,
|
||||
* [Set] - if defined,
|
||||
* [Enumerable], [Configurable]
|
||||
* }.
|
||||
*/
|
||||
ecma_property_descriptor_t
|
||||
ecma_get_property_descriptor_from_property (ecma_property_t *prop_p) /**< property */
|
||||
{
|
||||
ecma_property_descriptor_t prop_desc = ecma_make_empty_property_descriptor ();
|
||||
|
||||
prop_desc.is_enumerable = ecma_is_property_enumerable (prop_p);
|
||||
prop_desc.is_enumerable_defined = true;
|
||||
prop_desc.is_configurable = ecma_is_property_configurable (prop_p);
|
||||
prop_desc.is_configurable_defined = true;
|
||||
|
||||
if (ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDDATA)
|
||||
{
|
||||
prop_desc.value = ecma_copy_value (ecma_get_named_data_property_value (prop_p));
|
||||
prop_desc.is_value_defined = true;
|
||||
prop_desc.is_writable = ecma_is_property_writable (prop_p);
|
||||
prop_desc.is_writable_defined = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR);
|
||||
prop_desc.get_p = ecma_get_named_accessor_property_getter (prop_p);
|
||||
prop_desc.is_get_defined = true;
|
||||
if (prop_desc.get_p != NULL)
|
||||
{
|
||||
ecma_ref_object (prop_desc.get_p);
|
||||
}
|
||||
|
||||
prop_desc.set_p = ecma_get_named_accessor_property_setter (prop_p);
|
||||
prop_desc.is_set_defined = true;
|
||||
if (prop_desc.set_p != NULL)
|
||||
{
|
||||
ecma_ref_object (prop_desc.set_p);
|
||||
}
|
||||
}
|
||||
|
||||
return prop_desc;
|
||||
} /* ecma_get_property_descriptor_from_property */
|
||||
|
||||
/**
|
||||
* Increase reference counter of Compact
|
||||
* Byte Code or regexp byte code.
|
||||
|
||||
@@ -271,34 +271,30 @@ extern ecma_value_t *ecma_create_internal_property (ecma_object_t *, ecma_intern
|
||||
extern ecma_value_t *ecma_find_internal_property (ecma_object_t *, ecma_internal_property_id_t);
|
||||
extern ecma_value_t *ecma_get_internal_property (ecma_object_t *, ecma_internal_property_id_t);
|
||||
|
||||
extern ecma_property_t *
|
||||
ecma_create_named_data_property (ecma_object_t *, ecma_string_t *, uint8_t);
|
||||
extern ecma_property_t *
|
||||
extern ecma_property_value_t *
|
||||
ecma_create_named_data_property (ecma_object_t *, ecma_string_t *, uint8_t, ecma_property_t **);
|
||||
extern ecma_property_value_t *
|
||||
ecma_create_named_accessor_property (ecma_object_t *, ecma_string_t *, ecma_object_t *, ecma_object_t *, uint8_t);
|
||||
extern ecma_property_t *
|
||||
ecma_find_named_property (ecma_object_t *, ecma_string_t *);
|
||||
extern ecma_property_t *
|
||||
ecma_get_named_property (ecma_object_t *, ecma_string_t *);
|
||||
extern ecma_property_t *
|
||||
extern ecma_property_value_t *
|
||||
ecma_get_named_data_property (ecma_object_t *, ecma_string_t *);
|
||||
|
||||
extern void ecma_free_property (ecma_object_t *, ecma_string_t *, ecma_property_t *);
|
||||
|
||||
extern void ecma_delete_property (ecma_object_t *, ecma_property_t *);
|
||||
extern void ecma_delete_property (ecma_object_t *, ecma_property_value_t *);
|
||||
|
||||
extern ecma_value_t ecma_get_named_data_property_value (const ecma_property_t *);
|
||||
extern void ecma_set_named_data_property_value (ecma_property_t *, ecma_value_t);
|
||||
extern void ecma_named_data_property_assign_value (ecma_object_t *, ecma_property_t *, ecma_value_t);
|
||||
extern void ecma_named_data_property_assign_value (ecma_object_t *, ecma_property_value_t *, ecma_value_t);
|
||||
|
||||
extern ecma_object_t *ecma_get_named_accessor_property_getter (const ecma_property_t *);
|
||||
extern ecma_object_t *ecma_get_named_accessor_property_setter (const ecma_property_t *);
|
||||
extern void ecma_set_named_accessor_property_getter (ecma_object_t *, ecma_property_t *, ecma_object_t *);
|
||||
extern void ecma_set_named_accessor_property_setter (ecma_object_t *, ecma_property_t *, ecma_object_t *);
|
||||
extern bool ecma_is_property_writable (ecma_property_t *);
|
||||
extern ecma_object_t *ecma_get_named_accessor_property_getter (const ecma_property_value_t *);
|
||||
extern ecma_object_t *ecma_get_named_accessor_property_setter (const ecma_property_value_t *);
|
||||
extern void ecma_set_named_accessor_property_getter (ecma_object_t *, ecma_property_value_t *, ecma_object_t *);
|
||||
extern void ecma_set_named_accessor_property_setter (ecma_object_t *, ecma_property_value_t *, ecma_object_t *);
|
||||
extern bool ecma_is_property_writable (ecma_property_t);
|
||||
extern void ecma_set_property_writable_attr (ecma_property_t *, bool);
|
||||
extern bool ecma_is_property_enumerable (ecma_property_t *);
|
||||
extern bool ecma_is_property_enumerable (ecma_property_t);
|
||||
extern void ecma_set_property_enumerable_attr (ecma_property_t *, bool);
|
||||
extern bool ecma_is_property_configurable (ecma_property_t *);
|
||||
extern bool ecma_is_property_configurable (ecma_property_t);
|
||||
extern void ecma_set_property_configurable_attr (ecma_property_t *, bool);
|
||||
|
||||
extern bool ecma_is_property_lcached (ecma_property_t *);
|
||||
@@ -306,7 +302,6 @@ extern void ecma_set_property_lcached (ecma_property_t *, bool);
|
||||
|
||||
extern ecma_property_descriptor_t ecma_make_empty_property_descriptor (void);
|
||||
extern void ecma_free_property_descriptor (ecma_property_descriptor_t *);
|
||||
extern ecma_property_descriptor_t ecma_get_property_descriptor_from_property (ecma_property_t *);
|
||||
|
||||
extern ecma_property_t *ecma_get_next_property_pair (ecma_property_pair_t *);
|
||||
|
||||
|
||||
@@ -89,8 +89,8 @@ ecma_lcache_insert (ecma_object_t *object_p, /**< object */
|
||||
JERRY_ASSERT (object_p != NULL);
|
||||
JERRY_ASSERT (prop_name_p != NULL);
|
||||
JERRY_ASSERT (prop_p != NULL && !ecma_is_property_lcached (prop_p));
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDDATA
|
||||
|| ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR);
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (*prop_p) == ECMA_PROPERTY_TYPE_NAMEDDATA
|
||||
|| ECMA_PROPERTY_GET_TYPE (*prop_p) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR);
|
||||
|
||||
#ifndef CONFIG_ECMA_LCACHE_DISABLE
|
||||
jmem_cpointer_t object_cp;
|
||||
@@ -196,8 +196,8 @@ ecma_lcache_invalidate (ecma_object_t *object_p, /**< object */
|
||||
JERRY_ASSERT (object_p != NULL);
|
||||
JERRY_ASSERT (prop_name_p != NULL);
|
||||
JERRY_ASSERT (prop_p != NULL && ecma_is_property_lcached (prop_p));
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDDATA
|
||||
|| ECMA_PROPERTY_GET_TYPE (prop_p) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR);
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (*prop_p) == ECMA_PROPERTY_TYPE_NAMEDDATA
|
||||
|| ECMA_PROPERTY_GET_TYPE (*prop_p) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR);
|
||||
|
||||
#ifndef CONFIG_ECMA_LCACHE_DISABLE
|
||||
jmem_cpointer_t object_cp;
|
||||
|
||||
@@ -88,7 +88,7 @@ ecma_property_hashmap_create (ecma_object_t *object_p) /**< object */
|
||||
|
||||
for (int i = 0; i < ECMA_PROPERTY_PAIR_ITEM_COUNT; i++)
|
||||
{
|
||||
ecma_property_types_t type = ECMA_PROPERTY_GET_TYPE (prop_iter_p->types + i);
|
||||
ecma_property_types_t type = ECMA_PROPERTY_GET_TYPE (prop_iter_p->types[i]);
|
||||
|
||||
if (type == ECMA_PROPERTY_TYPE_NAMEDDATA || type == ECMA_PROPERTY_TYPE_NAMEDACCESSOR)
|
||||
{
|
||||
@@ -119,7 +119,7 @@ ecma_property_hashmap_create (ecma_object_t *object_p) /**< object */
|
||||
|
||||
memset (hashmap_p, 0, total_size);
|
||||
|
||||
hashmap_p->header.types[0].type_and_flags = ECMA_PROPERTY_TYPE_HASHMAP;
|
||||
hashmap_p->header.types[0] = ECMA_PROPERTY_TYPE_HASHMAP;
|
||||
hashmap_p->header.next_property_cp = object_p->property_list_or_bound_object_cp;
|
||||
hashmap_p->max_property_count = max_property_count;
|
||||
hashmap_p->null_count = max_property_count - named_property_count;
|
||||
@@ -132,7 +132,7 @@ ecma_property_hashmap_create (ecma_object_t *object_p) /**< object */
|
||||
|
||||
if (max_property_count <= LIT_STRING_HASH_LIMIT)
|
||||
{
|
||||
hashmap_p->header.types[1].type_and_flags = 0;
|
||||
hashmap_p->header.types[1] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -143,7 +143,7 @@ ecma_property_hashmap_create (ecma_object_t *object_p) /**< object */
|
||||
}
|
||||
}
|
||||
|
||||
hashmap_p->header.types[1].type_and_flags = shift_counter;
|
||||
hashmap_p->header.types[1] = shift_counter;
|
||||
|
||||
prop_iter_p = ecma_get_property_list (object_p);
|
||||
ECMA_SET_POINTER (object_p->property_list_or_bound_object_cp, hashmap_p);
|
||||
@@ -154,7 +154,7 @@ ecma_property_hashmap_create (ecma_object_t *object_p) /**< object */
|
||||
|
||||
for (int i = 0; i < ECMA_PROPERTY_PAIR_ITEM_COUNT; i++)
|
||||
{
|
||||
ecma_property_types_t type = ECMA_PROPERTY_GET_TYPE (prop_iter_p->types + i);
|
||||
ecma_property_types_t type = ECMA_PROPERTY_GET_TYPE (prop_iter_p->types[i]);
|
||||
|
||||
if (!(type == ECMA_PROPERTY_TYPE_NAMEDDATA || type == ECMA_PROPERTY_TYPE_NAMEDACCESSOR))
|
||||
{
|
||||
@@ -225,7 +225,7 @@ ecma_property_hashmap_free (ecma_object_t *object_p) /**< object */
|
||||
ecma_property_header_t *property_p = ecma_get_property_list (object_p);
|
||||
|
||||
JERRY_ASSERT (property_p != NULL
|
||||
&& ECMA_PROPERTY_GET_TYPE (property_p->types + 0) == ECMA_PROPERTY_TYPE_HASHMAP);
|
||||
&& ECMA_PROPERTY_GET_TYPE (property_p->types[0]) == ECMA_PROPERTY_TYPE_HASHMAP);
|
||||
|
||||
ecma_property_hashmap_t *hashmap_p = (ecma_property_hashmap_t *) property_p;
|
||||
|
||||
@@ -251,7 +251,7 @@ ecma_property_hashmap_insert (ecma_object_t *object_p, /**< object */
|
||||
ecma_property_hashmap_t *hashmap_p = ECMA_GET_NON_NULL_POINTER (ecma_property_hashmap_t,
|
||||
object_p->property_list_or_bound_object_cp);
|
||||
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (hashmap_p->header.types + 0) == ECMA_PROPERTY_TYPE_HASHMAP);
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (hashmap_p->header.types[0]) == ECMA_PROPERTY_TYPE_HASHMAP);
|
||||
|
||||
/* The NULLs are reduced below 1/8 of the hashmap. */
|
||||
if (hashmap_p->null_count < (hashmap_p->max_property_count >> 3))
|
||||
@@ -273,7 +273,7 @@ ecma_property_hashmap_insert (ecma_object_t *object_p, /**< object */
|
||||
}
|
||||
else
|
||||
{
|
||||
entry_index <<= hashmap_p->header.types[1].type_and_flags;
|
||||
entry_index <<= hashmap_p->header.types[1];
|
||||
}
|
||||
|
||||
#ifndef JERRY_NDEBUG
|
||||
@@ -334,7 +334,7 @@ ecma_property_hashmap_delete (ecma_object_t *object_p, /**< object */
|
||||
ecma_property_hashmap_t *hashmap_p = ECMA_GET_NON_NULL_POINTER (ecma_property_hashmap_t,
|
||||
object_p->property_list_or_bound_object_cp);
|
||||
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (hashmap_p->header.types + 0) == ECMA_PROPERTY_TYPE_HASHMAP);
|
||||
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (hashmap_p->header.types[0]) == ECMA_PROPERTY_TYPE_HASHMAP);
|
||||
|
||||
uint32_t entry_index = name_p->hash;
|
||||
uint32_t step = ecma_property_hashmap_steps[entry_index & (ECMA_PROPERTY_HASHMAP_NUMBER_OF_STEPS - 1)];
|
||||
@@ -348,7 +348,7 @@ ecma_property_hashmap_delete (ecma_object_t *object_p, /**< object */
|
||||
}
|
||||
else
|
||||
{
|
||||
entry_index <<= hashmap_p->header.types[1].type_and_flags;
|
||||
entry_index <<= hashmap_p->header.types[1];
|
||||
JERRY_ASSERT (entry_index <= mask);
|
||||
}
|
||||
|
||||
@@ -458,7 +458,7 @@ ecma_property_hashmap_find (ecma_property_hashmap_t *hashmap_p, /**< hashmap */
|
||||
}
|
||||
else
|
||||
{
|
||||
entry_index <<= hashmap_p->header.types[1].type_and_flags;
|
||||
entry_index <<= hashmap_p->header.types[1];
|
||||
JERRY_ASSERT (entry_index <= mask);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user