Introduce ecma_op_object_get_length and ecma_op_object_get_by_index operations (#3245)
These two functions helps to reduce code duplication, also invokes the elimination of several ECMA_TRY_CATCH macros. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
@@ -602,15 +602,15 @@ typedef enum
|
||||
{
|
||||
ECMA_OBJECT_TYPE_GENERAL = 0, /**< all objects that are not belongs to the sub-types below. */
|
||||
ECMA_OBJECT_TYPE_CLASS = 1, /**< Objects with class property */
|
||||
ECMA_OBJECT_TYPE_FUNCTION = 2, /**< Function objects (15.3), created through 13.2 routine */
|
||||
ECMA_OBJECT_TYPE_EXTERNAL_FUNCTION = 3, /**< External (host) function object */
|
||||
ECMA_OBJECT_TYPE_ARRAY = 4, /**< Array object (15.4) */
|
||||
ECMA_OBJECT_TYPE_BOUND_FUNCTION = 5, /**< Function objects (15.3), created through 15.3.4.5 routine */
|
||||
ECMA_OBJECT_TYPE_PSEUDO_ARRAY = 6, /**< Array-like object, such as Arguments object (10.6) */
|
||||
ECMA_OBJECT_TYPE_ARRAY = 2, /**< Array object (15.4) */
|
||||
ECMA_OBJECT_TYPE_PSEUDO_ARRAY = 3, /**< Array-like object, such as Arguments object (10.6) */
|
||||
/* Note: these 4 types must be in this order. See IsCallable operation. */
|
||||
ECMA_OBJECT_TYPE_FUNCTION = 4, /**< Function objects (15.3), created through 13.2 routine */
|
||||
#if ENABLED (JERRY_ES2015)
|
||||
ECMA_OBJECT_TYPE_ARROW_FUNCTION = 7, /**< arrow function objects */
|
||||
ECMA_OBJECT_TYPE_ARROW_FUNCTION = 5, /**< arrow function objects */
|
||||
#endif /* ENABLED (JERRY_ES2015) */
|
||||
|
||||
ECMA_OBJECT_TYPE_BOUND_FUNCTION = 6, /**< Function objects (15.3), created through 15.3.4.5 routine */
|
||||
ECMA_OBJECT_TYPE_EXTERNAL_FUNCTION = 7, /**< External (host) function object */
|
||||
/* Types between 13-15 cannot have a built-in flag. See ecma_lexical_environment_type_t. */
|
||||
|
||||
ECMA_OBJECT_TYPE__MAX /**< maximum value */
|
||||
|
||||
Reference in New Issue
Block a user