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:
@@ -157,7 +157,7 @@ opfunc_set_accessor (bool is_getter, /**< is getter accessor */
|
||||
ecma_string_t *accessor_name_p = ecma_get_string_from_value (accessor_name);
|
||||
ecma_property_t *property_p = ecma_find_named_property (object_p, accessor_name_p);
|
||||
|
||||
if (property_p != NULL && !(property_p->flags & ECMA_PROPERTY_FLAG_NAMEDACCESSOR))
|
||||
if (property_p != NULL && ECMA_PROPERTY_GET_TYPE (property_p) != ECMA_PROPERTY_TYPE_NAMEDACCESSOR)
|
||||
{
|
||||
ecma_delete_property (object_p, property_p);
|
||||
property_p = NULL;
|
||||
|
||||
+1
-1
@@ -1013,7 +1013,7 @@ vm_loop (vm_frame_ctx_t *frame_ctx_p) /**< frame context */
|
||||
property_p = ecma_find_named_property (object_p, prop_name_p);
|
||||
}
|
||||
|
||||
if (property_p != NULL && !(property_p->flags & ECMA_PROPERTY_FLAG_NAMEDDATA))
|
||||
if (property_p != NULL && ECMA_PROPERTY_GET_TYPE (property_p) != ECMA_PROPERTY_TYPE_NAMEDDATA)
|
||||
{
|
||||
ecma_delete_property (object_p, property_p);
|
||||
property_p = NULL;
|
||||
|
||||
Reference in New Issue
Block a user