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:
Hyukwoo Park
2020-03-02 23:59:55 +09:00
committed by GitHub
parent 19c61e14c0
commit 34edf53753
8 changed files with 135 additions and 24 deletions
+10 -10
View File
@@ -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;