Remove pseudo array object type from the project (#4643)

A new class type enum is introduced to describe the class of objects.
This enum is organized to improve property resolve and GC performance.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2021-04-06 18:46:48 +02:00
committed by GitHub
parent 4377ef684d
commit d85020f709
60 changed files with 1274 additions and 1212 deletions
@@ -90,8 +90,9 @@ ecma_op_create_symbol_object (const ecma_value_t value) /**< symbol value */
ECMA_OBJECT_TYPE_CLASS);
ecma_extended_object_t *ext_object_p = (ecma_extended_object_t *) object_p;
ext_object_p->u.class_prop.class_id = LIT_MAGIC_STRING_SYMBOL_UL;
ext_object_p->u.class_prop.u.value = ecma_copy_value (value);
ext_object_p->u.cls.type = ECMA_OBJECT_CLASS_SYMBOL;
ext_object_p->u.cls.u2.id = LIT_MAGIC_STRING_SYMBOL_UL;
ext_object_p->u.cls.u3.value = ecma_copy_value (value);
return ecma_make_object_value (object_p);
} /* ecma_op_create_symbol_object */
@@ -166,9 +167,9 @@ ecma_symbol_this_value (ecma_value_t this_arg) /**< this argument value */
{
ecma_extended_object_t *ext_obj_p = (ecma_extended_object_t *) object_p;
if (ext_obj_p->u.class_prop.class_id == LIT_MAGIC_STRING_SYMBOL_UL)
if (ext_obj_p->u.cls.type == ECMA_OBJECT_CLASS_SYMBOL)
{
return ext_obj_p->u.class_prop.u.value;
return ext_obj_p->u.cls.u3.value;
}
}
}