Reduce the argument count of ecma_op_object_get_property_names (#2598)

Introduce ECMA_LIST_ARRAY_INDICES[_ENUMBERABLE[_PROTOTYPE]] flags instead of passing 3 boolean arguments.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2018-11-15 13:40:44 +01:00
committed by László Langó
parent ba8e144f7b
commit 9535a230ba
9 changed files with 36 additions and 20 deletions
+18
View File
@@ -343,6 +343,24 @@ typedef enum
ECMA_PROPERTY_TYPE__MAX = ECMA_PROPERTY_TYPE_VIRTUAL, /**< highest value for property types. */
} ecma_property_types_t;
/**
* Property name listing options.
*/
typedef enum
{
ECMA_LIST_NO_OPTS = (0), /**< no options are provided */
ECMA_LIST_ARRAY_INDICES = (1 << 0), /**< exclude properties with names
* that are not indices */
ECMA_LIST_ENUMERABLE = (1 << 1), /**< exclude non-enumerable properties */
ECMA_LIST_PROTOTYPE = (1 << 2), /**< list properties from prototype chain */
} ecma_list_properties_options_t;
/**
* List enumerable properties and include the prototype chain.
*/
#define ECMA_LIST_ENUMERABLE_PROTOTYPE (ECMA_LIST_ENUMERABLE | ECMA_LIST_PROTOTYPE)
/**
* Property type mask.
*/