Add new type which represents pointer with tag value (#3591)
jmem_cpointer_tag_t is newly added to represent pointer along with tag value. This new type is first applied to scope_cp to mark initailized function properties (length, name) later JerryScript-DCO-1.0-Signed-off-by: HyukWoo Park hyukwoo.park@samsung.com
This commit is contained in:
@@ -36,6 +36,15 @@
|
||||
*/
|
||||
#define ECMA_NULL_POINTER JMEM_CP_NULL
|
||||
|
||||
#if defined (JMEM_CAN_STORE_POINTER_VALUE_DIRECTLY)
|
||||
|
||||
/**
|
||||
* JMEM_ALIGNMENT_LOG aligned pointers can be stored directly in ecma_value_t
|
||||
*/
|
||||
#define ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY
|
||||
|
||||
#endif /* JMEM_CAN_STORE_POINTER_VALUE_DIRECTLY */
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
@@ -127,15 +136,6 @@ typedef uint32_t ecma_value_t;
|
||||
*/
|
||||
typedef int32_t ecma_integer_value_t;
|
||||
|
||||
#if UINTPTR_MAX <= UINT32_MAX
|
||||
|
||||
/**
|
||||
* JMEM_ALIGNMENT_LOG aligned pointers can be stored directly in ecma_value_t
|
||||
*/
|
||||
#define ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY
|
||||
|
||||
#endif /* UINTPTR_MAX <= UINT32_MAX */
|
||||
|
||||
/**
|
||||
* Mask for ecma types in ecma_value_t
|
||||
*/
|
||||
@@ -848,7 +848,7 @@ typedef struct
|
||||
*/
|
||||
struct
|
||||
{
|
||||
ecma_value_t scope_cp; /**< function scope */
|
||||
jmem_cpointer_tag_t scope_cp; /**< function scope */
|
||||
ecma_value_t bytecode_cp; /**< function byte code */
|
||||
} function;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user