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:
Zoltan Herczeg
2016-09-19 00:32:38 -07:00
parent ea96430e77
commit dcaec22c0c
32 changed files with 852 additions and 931 deletions
+4 -2
View File
@@ -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 */
/**