Remove ECMA_OBJECT_TYPE_BUILT_IN_FUNCTION to free an object type.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2016-06-24 01:54:33 -07:00
parent cfa0c94697
commit ea0176764e
6 changed files with 108 additions and 91 deletions
@@ -34,6 +34,21 @@ typedef enum
ECMA_BUILTIN_ID__COUNT /**< number of built-in objects */
} ecma_builtin_id_t;
/**
* Construct a routine value
*/
#define ECMA_ROUTINE_VALUE(id, length) (((id) << 4) | length)
/**
* Get routine length
*/
#define ECMA_GET_ROUTINE_LENGTH(value) ((uint8_t) ((value) & 0xf))
/**
* Get routine ID
*/
#define ECMA_GET_ROUTINE_ID(value) ((uint16_t) ((value) >> 4))
/* ecma-builtins.c */
extern void ecma_init_builtins (void);
extern void ecma_finalize_builtins (void);
@@ -55,4 +70,7 @@ extern bool
ecma_builtin_is (ecma_object_t *, ecma_builtin_id_t);
extern ecma_object_t *
ecma_builtin_get (ecma_builtin_id_t);
extern bool
ecma_builtin_function_is_routine (ecma_object_t *);
#endif /* !ECMA_BUILTINS_H */