wip: Implementing external function api

This commit is contained in:
Ilyong Cho
2015-04-03 18:11:21 +09:00
parent 7b5764c445
commit 23ade8f4ff
10 changed files with 183 additions and 22 deletions
+1
View File
@@ -89,6 +89,7 @@ DECLARE_ROUTINES_FOR (collection_chunk)
DECLARE_ROUTINES_FOR (string)
DECLARE_ROUTINES_FOR (label_descriptor)
DECLARE_ROUTINES_FOR (getter_setter_pointers)
DECLARE_ROUTINES_FOR (external_pointer)
/**
* @}
+12
View File
@@ -121,6 +121,18 @@ extern ecma_getter_setter_pointers_t *ecma_alloc_getter_setter_pointers (void);
*/
extern void ecma_dealloc_getter_setter_pointers (ecma_getter_setter_pointers_t *pointer_pair_p);
/**
* Allocate memory for external pointer
*
* @return pointer to allocated memory
*/
extern ecma_external_pointer_t *ecma_alloc_external_pointer (void);
/**
* Dealloc memory from external pointer
*/
extern void ecma_dealloc_external_pointer (ecma_external_pointer_t *ptr_p);
#endif /* JERRY_ECMA_ALLOC_H */
+5
View File
@@ -372,6 +372,8 @@ typedef enum
and not host objects */
ECMA_OBJECT_TYPE_STRING, /**< String objects (15.5) */
ECMA_OBJECT_TYPE_FUNCTION, /**< Function objects (15.3), created through 13.2 routine */
ECMA_OBJECT_TYPE_EXTERNAL_FUNCTION, /**< Function object (15.3), created through 13.2 routine
but [[Code]] is in external handler. */
ECMA_OBJECT_TYPE_BOUND_FUNCTION, /**< Function objects (15.3), created through 15.3.4.5 routine */
ECMA_OBJECT_TYPE_BUILT_IN_FUNCTION, /** One of built-in functions described in section 15
of ECMA-262 v5 specification */
@@ -810,6 +812,9 @@ typedef struct ecma_string_t
} u;
} ecma_string_t;
typedef uintptr_t ecma_external_pointer_t;
/**
* @}
*/