Refactor object property chain to use property pairs. The patch

itself seems a step back, but the primary aim is opening future
optimization opportunities. The list of changes follows:

 - Property is changed to be an abstract type, which has type, flags,
   and a value. It does not have a name anymore and property pointers
   cannot be compressed.
 - Full (32 bit) ecma values can be property values. This allows
   using non-compressed pointers for ecma values in the future.
 - The property chain is not restricted to the same item anymore,
   it can contain hash maps, arrays in the future.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2016-04-13 23:25:16 -07:00
parent 9aca0086b9
commit c7dcce4fc7
34 changed files with 883 additions and 649 deletions
@@ -278,7 +278,8 @@ ecma_builtin_object_object_freeze (ecma_value_t this_arg __attr_unused___, /**<
ecma_property_descriptor_t prop_desc = ecma_get_property_descriptor_from_property (property_p);
// 2.b
if ((property_p->flags & ECMA_PROPERTY_FLAG_NAMEDDATA) && ecma_is_property_writable (property_p))
if (ECMA_PROPERTY_GET_TYPE (property_p) == ECMA_PROPERTY_TYPE_NAMEDDATA
&& ecma_is_property_writable (property_p))
{
prop_desc.is_writable = false;
}
@@ -462,10 +463,12 @@ ecma_builtin_object_object_is_frozen (ecma_value_t this_arg __attr_unused___, /*
// 2.a
ecma_property_t *property_p = ecma_op_object_get_own_property (obj_p, property_name_p);
JERRY_ASSERT (property_p->flags & (ECMA_PROPERTY_FLAG_NAMEDDATA | ECMA_PROPERTY_FLAG_NAMEDACCESSOR));
JERRY_ASSERT (ECMA_PROPERTY_GET_TYPE (property_p) == ECMA_PROPERTY_TYPE_NAMEDDATA
|| ECMA_PROPERTY_GET_TYPE (property_p) == ECMA_PROPERTY_TYPE_NAMEDACCESSOR);
// 2.b
if ((property_p->flags & ECMA_PROPERTY_FLAG_NAMEDDATA) && ecma_is_property_writable (property_p))
if (ECMA_PROPERTY_GET_TYPE (property_p) == ECMA_PROPERTY_TYPE_NAMEDDATA
&& ecma_is_property_writable (property_p))
{
is_frozen = false;
break;