Check whether the aligned pointers value of the internal properties can be stored directly in ecma_value_t.
Those internal properties which have a primitive value field or where the property value type is an ecma_object_t ptr were checked earlier. JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
This commit is contained in:
@@ -290,8 +290,8 @@ ecma_gc_mark_property (ecma_property_t *property_p) /**< property */
|
||||
|
||||
case ECMA_INTERNAL_PROPERTY_BOUND_FUNCTION_BOUND_ARGS: /* a collection of ecma values */
|
||||
{
|
||||
ecma_collection_header_t *bound_arg_list_p = ECMA_GET_NON_NULL_POINTER (ecma_collection_header_t,
|
||||
property_value);
|
||||
ecma_collection_header_t *bound_arg_list_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_header_t,
|
||||
property_value);
|
||||
|
||||
ecma_collection_iterator_t bound_args_iterator;
|
||||
ecma_collection_iterator_init (&bound_args_iterator, bound_arg_list_p);
|
||||
|
||||
@@ -807,8 +807,8 @@ ecma_free_internal_property (ecma_property_t *property_p) /**< the property */
|
||||
case ECMA_INTERNAL_PROPERTY_NUMBER_INDEXED_ARRAY_VALUES: /* a collection */
|
||||
case ECMA_INTERNAL_PROPERTY_STRING_INDEXED_ARRAY_VALUES: /* a collection */
|
||||
{
|
||||
ecma_free_values_collection (ECMA_GET_NON_NULL_POINTER (ecma_collection_header_t,
|
||||
property_value),
|
||||
ecma_free_values_collection (ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_header_t,
|
||||
property_value),
|
||||
true);
|
||||
|
||||
break;
|
||||
@@ -865,7 +865,7 @@ ecma_free_internal_property (ecma_property_t *property_p) /**< the property */
|
||||
{
|
||||
if (property_value != ECMA_NULL_POINTER)
|
||||
{
|
||||
ecma_free_values_collection (ECMA_GET_NON_NULL_POINTER (ecma_collection_header_t, property_value),
|
||||
ecma_free_values_collection (ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_header_t, property_value),
|
||||
false);
|
||||
}
|
||||
|
||||
@@ -881,13 +881,13 @@ ecma_free_internal_property (ecma_property_t *property_p) /**< the property */
|
||||
|
||||
case ECMA_INTERNAL_PROPERTY_CODE_BYTECODE: /* compressed pointer to a bytecode array */
|
||||
{
|
||||
ecma_bytecode_deref (ECMA_GET_NON_NULL_POINTER (ecma_compiled_code_t, property_value));
|
||||
ecma_bytecode_deref (ECMA_GET_INTERNAL_VALUE_POINTER (ecma_compiled_code_t, property_value));
|
||||
break;
|
||||
}
|
||||
|
||||
case ECMA_INTERNAL_PROPERTY_REGEXP_BYTECODE: /* compressed pointer to a regexp bytecode array */
|
||||
{
|
||||
ecma_compiled_code_t *bytecode_p = ECMA_GET_POINTER (ecma_compiled_code_t, property_value);
|
||||
ecma_compiled_code_t *bytecode_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_compiled_code_t, property_value);
|
||||
|
||||
if (bytecode_p != NULL)
|
||||
{
|
||||
|
||||
@@ -95,10 +95,10 @@
|
||||
ECMA_SET_NON_NULL_POINTER (field, non_compressed_pointer)
|
||||
|
||||
/**
|
||||
* Get an internal property value of pointer from specified non-null compressed pointer.
|
||||
* Get an internal property value of pointer from specified compressed pointer.
|
||||
*/
|
||||
#define ECMA_GET_INTERNAL_VALUE_POINTER(type, field) \
|
||||
ECMA_GET_NON_NULL_POINTER (type, field)
|
||||
ECMA_GET_POINTER (type, field)
|
||||
|
||||
#endif /* ECMA_VALUE_CAN_STORE_UINTPTR_VALUE_DIRECTLY */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user