Fix typo in property hashmap define (#4664)

Fixes jerryscript-project/jerryscript#4648

JerryScript-DCO-1.0-Signed-off-by: Jiawen Geng technicalcute@gmail.com
This commit is contained in:
Jiawen Geng
2021-05-26 18:26:11 +08:00
committed by GitHub
parent 800031c62b
commit 7be339ad61
14 changed files with 69 additions and 69 deletions
+1 -1
View File
@@ -184,7 +184,7 @@ This option is enabled by default.
| Options | | | Options | |
|---------|----------------------------------------------| |---------|----------------------------------------------|
| C: | `-DJERRY_PROPRETY_HASHMAP=0/1` | | C: | `-DJERRY_PROPERTY_HASHMAP=0/1` |
| CMake: | `<none>` | | CMake: | `<none>` |
| Python: | `<none>` | | Python: | `<none>` |
+6 -6
View File
@@ -348,9 +348,9 @@
* *
* Default value: 1 * Default value: 1
*/ */
#ifndef JERRY_PROPRETY_HASHMAP #ifndef JERRY_PROPERTY_HASHMAP
# define JERRY_PROPRETY_HASHMAP 1 # define JERRY_PROPERTY_HASHMAP 1
#endif /* !defined (JERRY_PROPRETY_HASHMAP) */ #endif /* !defined (JERRY_PROPERTY_HASHMAP) */
/** /**
* Enables/disables the Promise event callbacks * Enables/disables the Promise event callbacks
@@ -681,9 +681,9 @@
|| ((JERRY_PARSER_DUMP_BYTE_CODE != 0) && (JERRY_PARSER_DUMP_BYTE_CODE != 1)) || ((JERRY_PARSER_DUMP_BYTE_CODE != 0) && (JERRY_PARSER_DUMP_BYTE_CODE != 1))
# error "Invalid value for 'JERRY_PARSER_DUMP_BYTE_CODE' macro." # error "Invalid value for 'JERRY_PARSER_DUMP_BYTE_CODE' macro."
#endif #endif
#if !defined (JERRY_PROPRETY_HASHMAP) \ #if !defined (JERRY_PROPERTY_HASHMAP) \
|| ((JERRY_PROPRETY_HASHMAP != 0) && (JERRY_PROPRETY_HASHMAP != 1)) || ((JERRY_PROPERTY_HASHMAP != 0) && (JERRY_PROPERTY_HASHMAP != 1))
# error "Invalid value for 'JERRY_PROPRETY_HASHMAP' macro." # error "Invalid value for 'JERRY_PROPERTY_HASHMAP' macro."
#endif #endif
#if !defined (JERRY_PROMISE_CALLBACK) \ #if !defined (JERRY_PROMISE_CALLBACK) \
|| ((JERRY_PROMISE_CALLBACK != 0) && (JERRY_PROMISE_CALLBACK != 1)) || ((JERRY_PROMISE_CALLBACK != 0) && (JERRY_PROMISE_CALLBACK != 1))
+10 -10
View File
@@ -238,7 +238,7 @@ ecma_gc_mark_properties (ecma_object_t *object_p, /**< object */
jmem_cpointer_t prop_iter_cp = object_p->u1.property_list_cp; jmem_cpointer_t prop_iter_cp = object_p->u1.property_list_cp;
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
if (prop_iter_cp != JMEM_CP_NULL) if (prop_iter_cp != JMEM_CP_NULL)
{ {
ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, prop_iter_cp); ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, prop_iter_cp);
@@ -247,7 +247,7 @@ ecma_gc_mark_properties (ecma_object_t *object_p, /**< object */
prop_iter_cp = prop_iter_p->next_property_cp; prop_iter_cp = prop_iter_p->next_property_cp;
} }
} }
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
while (prop_iter_cp != JMEM_CP_NULL) while (prop_iter_cp != JMEM_CP_NULL)
{ {
@@ -1612,7 +1612,7 @@ ecma_gc_free_properties (ecma_object_t *object_p, /**< object */
{ {
jmem_cpointer_t prop_iter_cp = object_p->u1.property_list_cp; jmem_cpointer_t prop_iter_cp = object_p->u1.property_list_cp;
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
if (prop_iter_cp != JMEM_CP_NULL) if (prop_iter_cp != JMEM_CP_NULL)
{ {
ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t,
@@ -1623,7 +1623,7 @@ ecma_gc_free_properties (ecma_object_t *object_p, /**< object */
prop_iter_cp = object_p->u1.property_list_cp; prop_iter_cp = object_p->u1.property_list_cp;
} }
} }
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
while (prop_iter_cp != JMEM_CP_NULL) while (prop_iter_cp != JMEM_CP_NULL)
{ {
@@ -2216,13 +2216,13 @@ ecma_free_unused_memory (jmem_pressure_t pressure) /**< current pressure */
if (JERRY_LIKELY (pressure == JMEM_PRESSURE_LOW)) if (JERRY_LIKELY (pressure == JMEM_PRESSURE_LOW))
{ {
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
if (JERRY_CONTEXT (ecma_prop_hashmap_alloc_state) > ECMA_PROP_HASHMAP_ALLOC_ON) if (JERRY_CONTEXT (ecma_prop_hashmap_alloc_state) > ECMA_PROP_HASHMAP_ALLOC_ON)
{ {
--JERRY_CONTEXT (ecma_prop_hashmap_alloc_state); --JERRY_CONTEXT (ecma_prop_hashmap_alloc_state);
} }
JERRY_CONTEXT (status_flags) &= (uint32_t) ~ECMA_STATUS_HIGH_PRESSURE_GC; JERRY_CONTEXT (status_flags) &= (uint32_t) ~ECMA_STATUS_HIGH_PRESSURE_GC;
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
/* /*
* If there is enough newly allocated objects since last GC, probably it is worthwhile to start GC now. * If there is enough newly allocated objects since last GC, probably it is worthwhile to start GC now.
* Otherwise, probability to free sufficient space is considered to be low. * Otherwise, probability to free sufficient space is considered to be low.
@@ -2239,7 +2239,7 @@ ecma_free_unused_memory (jmem_pressure_t pressure) /**< current pressure */
else if (pressure == JMEM_PRESSURE_HIGH) else if (pressure == JMEM_PRESSURE_HIGH)
{ {
/* Freeing as much memory as we currently can */ /* Freeing as much memory as we currently can */
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
if (JERRY_CONTEXT (status_flags) & ECMA_STATUS_HIGH_PRESSURE_GC) if (JERRY_CONTEXT (status_flags) & ECMA_STATUS_HIGH_PRESSURE_GC)
{ {
JERRY_CONTEXT (ecma_prop_hashmap_alloc_state) = ECMA_PROP_HASHMAP_ALLOC_MAX; JERRY_CONTEXT (ecma_prop_hashmap_alloc_state) = ECMA_PROP_HASHMAP_ALLOC_MAX;
@@ -2249,11 +2249,11 @@ ecma_free_unused_memory (jmem_pressure_t pressure) /**< current pressure */
++JERRY_CONTEXT (ecma_prop_hashmap_alloc_state); ++JERRY_CONTEXT (ecma_prop_hashmap_alloc_state);
JERRY_CONTEXT (status_flags) |= ECMA_STATUS_HIGH_PRESSURE_GC; JERRY_CONTEXT (status_flags) |= ECMA_STATUS_HIGH_PRESSURE_GC;
} }
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
ecma_gc_run (); ecma_gc_run ();
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
/* Free hashmaps of remaining objects. */ /* Free hashmaps of remaining objects. */
jmem_cpointer_t obj_iter_cp = JERRY_CONTEXT (ecma_gc_objects_cp); jmem_cpointer_t obj_iter_cp = JERRY_CONTEXT (ecma_gc_objects_cp);
@@ -2287,7 +2287,7 @@ ecma_free_unused_memory (jmem_pressure_t pressure) /**< current pressure */
obj_iter_cp = obj_iter_p->gc_next_cp; obj_iter_cp = obj_iter_p->gc_next_cp;
} }
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
jmem_pools_collect_empty (); jmem_pools_collect_empty ();
return; return;
+4 -4
View File
@@ -57,9 +57,9 @@ typedef enum
{ {
ECMA_STATUS_API_AVAILABLE = (1u << 0), /**< api available */ ECMA_STATUS_API_AVAILABLE = (1u << 0), /**< api available */
ECMA_STATUS_DIRECT_EVAL = (1u << 1), /**< eval is called directly */ ECMA_STATUS_DIRECT_EVAL = (1u << 1), /**< eval is called directly */
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
ECMA_STATUS_HIGH_PRESSURE_GC = (1u << 2), /**< last gc was under high pressure */ ECMA_STATUS_HIGH_PRESSURE_GC = (1u << 2), /**< last gc was under high pressure */
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
ECMA_STATUS_EXCEPTION = (1u << 3), /**< last exception is a normal exception */ ECMA_STATUS_EXCEPTION = (1u << 3), /**< last exception is a normal exception */
ECMA_STATUS_ABORT = (1u << 4), /**< last exception is an abort */ ECMA_STATUS_ABORT = (1u << 4), /**< last exception is an abort */
ECMA_STATUS_ERROR_UPDATE = (1u << 5), /**< the error_object_created_callback_p is called */ ECMA_STATUS_ERROR_UPDATE = (1u << 5), /**< the error_object_created_callback_p is called */
@@ -1942,7 +1942,7 @@ typedef struct
*/ */
#define ECMA_EXTENDED_PRIMITIVE_MAX_REF (UINT32_MAX - (ECMA_EXTENDED_PRIMITIVE_REF_ONE - 1)) #define ECMA_EXTENDED_PRIMITIVE_MAX_REF (UINT32_MAX - (ECMA_EXTENDED_PRIMITIVE_REF_ONE - 1))
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
/** /**
* The lowest state of the ecma_prop_hashmap_alloc_state counter. * The lowest state of the ecma_prop_hashmap_alloc_state counter.
@@ -1956,7 +1956,7 @@ typedef struct
*/ */
#define ECMA_PROP_HASHMAP_ALLOC_MAX 4 #define ECMA_PROP_HASHMAP_ALLOC_MAX 4
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
/** /**
* Number of values in a literal storage item * Number of values in a literal storage item
+26 -26
View File
@@ -445,7 +445,7 @@ ecma_create_property (ecma_object_t *object_p, /**< the object */
ecma_property_header_t *first_property_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, ecma_property_header_t *first_property_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t,
*property_list_head_p); *property_list_head_p);
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
bool has_hashmap = false; bool has_hashmap = false;
if (first_property_p->types[0] == ECMA_PROPERTY_TYPE_HASHMAP) if (first_property_p->types[0] == ECMA_PROPERTY_TYPE_HASHMAP)
@@ -455,7 +455,7 @@ ecma_create_property (ecma_object_t *object_p, /**< the object */
*property_list_head_p); *property_list_head_p);
has_hashmap = true; has_hashmap = true;
} }
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
JERRY_ASSERT (ECMA_PROPERTY_IS_PROPERTY_PAIR (first_property_p)); JERRY_ASSERT (ECMA_PROPERTY_IS_PROPERTY_PAIR (first_property_p));
@@ -479,7 +479,7 @@ ecma_create_property (ecma_object_t *object_p, /**< the object */
first_property_pair_p->values[0] = value; first_property_pair_p->values[0] = value;
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
/* The property must be fully initialized before ecma_property_hashmap_insert /* The property must be fully initialized before ecma_property_hashmap_insert
* is called, because the insert operation may reallocate the hashmap, and * is called, because the insert operation may reallocate the hashmap, and
* that triggers garbage collection which scans all properties of all objects. * that triggers garbage collection which scans all properties of all objects.
@@ -492,7 +492,7 @@ ecma_create_property (ecma_object_t *object_p, /**< the object */
first_property_pair_p, first_property_pair_p,
0); 0);
} }
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
return first_property_pair_p->values + 0; return first_property_pair_p->values + 0;
} }
@@ -504,7 +504,7 @@ ecma_create_property (ecma_object_t *object_p, /**< the object */
/* Need to query property_list_head_p again and recheck the existennce /* Need to query property_list_head_p again and recheck the existennce
* of property hasmap, because ecma_alloc_property_pair may delete them. */ * of property hasmap, because ecma_alloc_property_pair may delete them. */
property_list_head_p = &object_p->u1.property_list_cp; property_list_head_p = &object_p->u1.property_list_cp;
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
bool has_hashmap = false; bool has_hashmap = false;
if (*property_list_head_p != ECMA_NULL_POINTER) if (*property_list_head_p != ECMA_NULL_POINTER)
@@ -518,7 +518,7 @@ ecma_create_property (ecma_object_t *object_p, /**< the object */
has_hashmap = true; has_hashmap = true;
} }
} }
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
/* Just copy the previous value (no need to decompress, compress). */ /* Just copy the previous value (no need to decompress, compress). */
first_property_pair_p->header.next_property_cp = *property_list_head_p; first_property_pair_p->header.next_property_cp = *property_list_head_p;
@@ -544,7 +544,7 @@ ecma_create_property (ecma_object_t *object_p, /**< the object */
first_property_pair_p->values[1] = value; first_property_pair_p->values[1] = value;
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
/* See the comment before the other ecma_property_hashmap_insert above. */ /* See the comment before the other ecma_property_hashmap_insert above. */
if (has_hashmap) if (has_hashmap)
@@ -554,7 +554,7 @@ ecma_create_property (ecma_object_t *object_p, /**< the object */
first_property_pair_p, first_property_pair_p,
1); 1);
} }
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
return first_property_pair_p->values + 1; return first_property_pair_p->values + 1;
} /* ecma_create_property */ } /* ecma_create_property */
@@ -701,7 +701,7 @@ ecma_find_named_property (ecma_object_t *obj_p, /**< object to find property in
jmem_cpointer_t prop_iter_cp = obj_p->u1.property_list_cp; jmem_cpointer_t prop_iter_cp = obj_p->u1.property_list_cp;
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
if (prop_iter_cp != JMEM_CP_NULL) if (prop_iter_cp != JMEM_CP_NULL)
{ {
ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t,
@@ -722,11 +722,11 @@ ecma_find_named_property (ecma_object_t *obj_p, /**< object to find property in
return property_p; return property_p;
} }
} }
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
uint32_t steps = 0; uint32_t steps = 0;
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
jmem_cpointer_t property_name_cp = ECMA_NULL_POINTER; jmem_cpointer_t property_name_cp = ECMA_NULL_POINTER;
if (ECMA_IS_DIRECT_STRING (name_p)) if (ECMA_IS_DIRECT_STRING (name_p))
@@ -763,9 +763,9 @@ ecma_find_named_property (ecma_object_t *obj_p, /**< object to find property in
break; break;
} }
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
steps++; steps++;
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
prop_iter_cp = prop_iter_p->next_property_cp; prop_iter_cp = prop_iter_p->next_property_cp;
} }
} }
@@ -804,19 +804,19 @@ ecma_find_named_property (ecma_object_t *obj_p, /**< object to find property in
} }
} }
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
steps++; steps++;
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
prop_iter_cp = prop_iter_p->next_property_cp; prop_iter_cp = prop_iter_p->next_property_cp;
} }
} }
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
if (steps >= (ECMA_PROPERTY_HASMAP_MINIMUM_SIZE / 2)) if (steps >= (ECMA_PROPERTY_HASMAP_MINIMUM_SIZE / 2))
{ {
ecma_property_hashmap_create (obj_p); ecma_property_hashmap_create (obj_p);
} }
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
#if JERRY_LCACHE #if JERRY_LCACHE
if (property_p != NULL if (property_p != NULL
@@ -867,7 +867,7 @@ ecma_delete_property (ecma_object_t *object_p, /**< object */
ecma_property_header_t *prev_prop_p = NULL; ecma_property_header_t *prev_prop_p = NULL;
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
ecma_property_hashmap_delete_status hashmap_status = ECMA_PROPERTY_HASHMAP_DELETE_NO_HASHMAP; ecma_property_hashmap_delete_status hashmap_status = ECMA_PROPERTY_HASHMAP_DELETE_NO_HASHMAP;
if (cur_prop_cp != JMEM_CP_NULL) if (cur_prop_cp != JMEM_CP_NULL)
@@ -882,7 +882,7 @@ ecma_delete_property (ecma_object_t *object_p, /**< object */
hashmap_status = ECMA_PROPERTY_HASHMAP_DELETE_HAS_HASHMAP; hashmap_status = ECMA_PROPERTY_HASHMAP_DELETE_HAS_HASHMAP;
} }
} }
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
while (cur_prop_cp != JMEM_CP_NULL) while (cur_prop_cp != JMEM_CP_NULL)
{ {
@@ -899,14 +899,14 @@ ecma_delete_property (ecma_object_t *object_p, /**< object */
{ {
JERRY_ASSERT (ECMA_PROPERTY_IS_NAMED_PROPERTY (cur_prop_p->types[i])); JERRY_ASSERT (ECMA_PROPERTY_IS_NAMED_PROPERTY (cur_prop_p->types[i]));
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
if (hashmap_status == ECMA_PROPERTY_HASHMAP_DELETE_HAS_HASHMAP) if (hashmap_status == ECMA_PROPERTY_HASHMAP_DELETE_HAS_HASHMAP)
{ {
hashmap_status = ecma_property_hashmap_delete (object_p, hashmap_status = ecma_property_hashmap_delete (object_p,
prop_pair_p->names_cp[i], prop_pair_p->names_cp[i],
cur_prop_p->types + i); cur_prop_p->types + i);
} }
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
ecma_gc_free_property (object_p, prop_pair_p, i); ecma_gc_free_property (object_p, prop_pair_p, i);
cur_prop_p->types[i] = ECMA_PROPERTY_TYPE_DELETED; cur_prop_p->types[i] = ECMA_PROPERTY_TYPE_DELETED;
@@ -916,14 +916,14 @@ ecma_delete_property (ecma_object_t *object_p, /**< object */
if (cur_prop_p->types[1 - i] != ECMA_PROPERTY_TYPE_DELETED) if (cur_prop_p->types[1 - i] != ECMA_PROPERTY_TYPE_DELETED)
{ {
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
/* The other property is still valid. */ /* The other property is still valid. */
if (hashmap_status == ECMA_PROPERTY_HASHMAP_DELETE_RECREATE_HASHMAP) if (hashmap_status == ECMA_PROPERTY_HASHMAP_DELETE_RECREATE_HASHMAP)
{ {
ecma_property_hashmap_free (object_p); ecma_property_hashmap_free (object_p);
ecma_property_hashmap_create (object_p); ecma_property_hashmap_create (object_p);
} }
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
return; return;
} }
@@ -940,13 +940,13 @@ ecma_delete_property (ecma_object_t *object_p, /**< object */
ecma_dealloc_property_pair ((ecma_property_pair_t *) cur_prop_p); ecma_dealloc_property_pair ((ecma_property_pair_t *) cur_prop_p);
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
if (hashmap_status == ECMA_PROPERTY_HASHMAP_DELETE_RECREATE_HASHMAP) if (hashmap_status == ECMA_PROPERTY_HASHMAP_DELETE_RECREATE_HASHMAP)
{ {
ecma_property_hashmap_free (object_p); ecma_property_hashmap_free (object_p);
ecma_property_hashmap_create (object_p); ecma_property_hashmap_create (object_p);
} }
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
return; return;
} }
} }
+2 -2
View File
@@ -46,10 +46,10 @@ ecma_init (void)
ecma_init_global_environment (); ecma_init_global_environment ();
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
JERRY_CONTEXT (ecma_prop_hashmap_alloc_state) = ECMA_PROP_HASHMAP_ALLOC_ON; JERRY_CONTEXT (ecma_prop_hashmap_alloc_state) = ECMA_PROP_HASHMAP_ALLOC_ON;
JERRY_CONTEXT (status_flags) &= (uint32_t) ~ECMA_STATUS_HIGH_PRESSURE_GC; JERRY_CONTEXT (status_flags) &= (uint32_t) ~ECMA_STATUS_HIGH_PRESSURE_GC;
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
#if (JERRY_STACK_LIMIT != 0) #if (JERRY_STACK_LIMIT != 0)
volatile int sp; volatile int sp;
+2 -2
View File
@@ -26,7 +26,7 @@
* @{ * @{
*/ */
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
/** /**
* Compute the total size of the property hashmap. * Compute the total size of the property hashmap.
@@ -528,7 +528,7 @@ ecma_property_hashmap_find (ecma_property_hashmap_t *hashmap_p, /**< hashmap */
#endif /* !JERRY_NDEBUG */ #endif /* !JERRY_NDEBUG */
} }
} /* ecma_property_hashmap_find */ } /* ecma_property_hashmap_find */
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
/** /**
* @} * @}
+2 -2
View File
@@ -53,7 +53,7 @@ typedef struct
*/ */
} ecma_property_hashmap_t; } ecma_property_hashmap_t;
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
/** /**
* Simple ecma values * Simple ecma values
@@ -74,7 +74,7 @@ ecma_property_hashmap_delete_status ecma_property_hashmap_delete (ecma_object_t
ecma_property_t *ecma_property_hashmap_find (ecma_property_hashmap_t *hashmap_p, ecma_string_t *name_p, ecma_property_t *ecma_property_hashmap_find (ecma_property_hashmap_t *hashmap_p, ecma_string_t *name_p,
jmem_cpointer_t *property_real_name_cp); jmem_cpointer_t *property_real_name_cp);
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
/** /**
* @} * @}
@@ -832,14 +832,14 @@ ecma_delete_array_properties (ecma_object_t *object_p, /**< object */
ecma_property_header_t *current_prop_p; ecma_property_header_t *current_prop_p;
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
current_prop_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, current_prop_cp); current_prop_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, current_prop_cp);
if (current_prop_p->types[0] == ECMA_PROPERTY_TYPE_HASHMAP) if (current_prop_p->types[0] == ECMA_PROPERTY_TYPE_HASHMAP)
{ {
current_prop_cp = current_prop_p->next_property_cp; current_prop_cp = current_prop_p->next_property_cp;
} }
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
while (current_prop_cp != JMEM_CP_NULL) while (current_prop_cp != JMEM_CP_NULL)
{ {
@@ -878,7 +878,7 @@ ecma_delete_array_properties (ecma_object_t *object_p, /**< object */
current_prop_cp = object_p->u1.property_list_cp; current_prop_cp = object_p->u1.property_list_cp;
ecma_property_header_t *prev_prop_p = NULL; ecma_property_header_t *prev_prop_p = NULL;
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
JERRY_ASSERT (current_prop_cp != JMEM_CP_NULL); JERRY_ASSERT (current_prop_cp != JMEM_CP_NULL);
ecma_property_hashmap_delete_status hashmap_status = ECMA_PROPERTY_HASHMAP_DELETE_NO_HASHMAP; ecma_property_hashmap_delete_status hashmap_status = ECMA_PROPERTY_HASHMAP_DELETE_NO_HASHMAP;
@@ -890,7 +890,7 @@ ecma_delete_array_properties (ecma_object_t *object_p, /**< object */
current_prop_cp = current_prop_p->next_property_cp; current_prop_cp = current_prop_p->next_property_cp;
hashmap_status = ECMA_PROPERTY_HASHMAP_DELETE_HAS_HASHMAP; hashmap_status = ECMA_PROPERTY_HASHMAP_DELETE_HAS_HASHMAP;
} }
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
while (current_prop_cp != JMEM_CP_NULL) while (current_prop_cp != JMEM_CP_NULL)
{ {
@@ -911,14 +911,14 @@ ecma_delete_array_properties (ecma_object_t *object_p, /**< object */
{ {
JERRY_ASSERT (index != ECMA_STRING_NOT_ARRAY_INDEX); JERRY_ASSERT (index != ECMA_STRING_NOT_ARRAY_INDEX);
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
if (hashmap_status == ECMA_PROPERTY_HASHMAP_DELETE_HAS_HASHMAP) if (hashmap_status == ECMA_PROPERTY_HASHMAP_DELETE_HAS_HASHMAP)
{ {
hashmap_status = ecma_property_hashmap_delete (object_p, hashmap_status = ecma_property_hashmap_delete (object_p,
prop_pair_p->names_cp[i], prop_pair_p->names_cp[i],
current_prop_p->types + i); current_prop_p->types + i);
} }
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
ecma_gc_free_property (object_p, prop_pair_p, i); ecma_gc_free_property (object_p, prop_pair_p, i);
current_prop_p->types[i] = ECMA_PROPERTY_TYPE_DELETED; current_prop_p->types[i] = ECMA_PROPERTY_TYPE_DELETED;
@@ -950,13 +950,13 @@ ecma_delete_array_properties (ecma_object_t *object_p, /**< object */
} }
} }
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
if (hashmap_status == ECMA_PROPERTY_HASHMAP_DELETE_RECREATE_HASHMAP) if (hashmap_status == ECMA_PROPERTY_HASHMAP_DELETE_RECREATE_HASHMAP)
{ {
ecma_property_hashmap_free (object_p); ecma_property_hashmap_free (object_p);
ecma_property_hashmap_create (object_p); ecma_property_hashmap_create (object_p);
} }
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
return new_length; return new_length;
} /* ecma_delete_array_properties */ } /* ecma_delete_array_properties */
+2 -2
View File
@@ -2530,7 +2530,7 @@ ecma_op_object_own_property_keys (ecma_object_t *obj_p) /**< object */
jmem_cpointer_t prop_iter_cp = obj_p->u1.property_list_cp; jmem_cpointer_t prop_iter_cp = obj_p->u1.property_list_cp;
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
if (prop_iter_cp != JMEM_CP_NULL) if (prop_iter_cp != JMEM_CP_NULL)
{ {
ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, prop_iter_cp); ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, prop_iter_cp);
@@ -2540,7 +2540,7 @@ ecma_op_object_own_property_keys (ecma_object_t *obj_p) /**< object */
prop_iter_cp = prop_iter_p->next_property_cp; prop_iter_cp = prop_iter_p->next_property_cp;
} }
} }
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
while (prop_iter_cp != JMEM_CP_NULL) while (prop_iter_cp != JMEM_CP_NULL)
{ {
+2 -2
View File
@@ -171,10 +171,10 @@ struct jerry_context_t
uint32_t ecma_gc_mark_recursion_limit; /**< GC mark recursion limit */ uint32_t ecma_gc_mark_recursion_limit; /**< GC mark recursion limit */
#endif /* (JERRY_GC_MARK_LIMIT != 0) */ #endif /* (JERRY_GC_MARK_LIMIT != 0) */
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
uint8_t ecma_prop_hashmap_alloc_state; /**< property hashmap allocation state: 0-4, uint8_t ecma_prop_hashmap_alloc_state; /**< property hashmap allocation state: 0-4,
* if !0 property hashmap allocation is disabled */ * if !0 property hashmap allocation is disabled */
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
#if JERRY_BUILTIN_REGEXP #if JERRY_BUILTIN_REGEXP
uint8_t re_cache_idx; /**< evicted item index when regex cache is full (round-robin) */ uint8_t re_cache_idx; /**< evicted item index when regex cache is full (round-robin) */
+2 -2
View File
@@ -1338,7 +1338,7 @@ opfunc_set_class_attributes (ecma_object_t *obj_p, /**< object */
{ {
jmem_cpointer_t prop_iter_cp = obj_p->u1.property_list_cp; jmem_cpointer_t prop_iter_cp = obj_p->u1.property_list_cp;
#if JERRY_PROPRETY_HASHMAP #if JERRY_PROPERTY_HASHMAP
if (prop_iter_cp != JMEM_CP_NULL) if (prop_iter_cp != JMEM_CP_NULL)
{ {
ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, prop_iter_cp); ecma_property_header_t *prop_iter_p = ECMA_GET_NON_NULL_POINTER (ecma_property_header_t, prop_iter_cp);
@@ -1347,7 +1347,7 @@ opfunc_set_class_attributes (ecma_object_t *obj_p, /**< object */
prop_iter_cp = prop_iter_p->next_property_cp; prop_iter_cp = prop_iter_p->next_property_cp;
} }
} }
#endif /* JERRY_PROPRETY_HASHMAP */ #endif /* JERRY_PROPERTY_HASHMAP */
while (prop_iter_cp != JMEM_CP_NULL) while (prop_iter_cp != JMEM_CP_NULL)
{ {
+1 -1
View File
@@ -98,7 +98,7 @@ def build_jerry_data(jerry_path):
'-DJERRY_BUILTIN_ANNEXB=0', '-DJERRY_BUILTIN_ANNEXB=0',
'-DJERRY_ESNEXT=0', '-DJERRY_ESNEXT=0',
'-DJERRY_LCACHE=0', '-DJERRY_LCACHE=0',
'-DJERRY_PROPRETY_HASHMAP=0', '-DJERRY_PROPERTY_HASHMAP=0',
] ]
return { return {
+1 -1
View File
@@ -144,7 +144,7 @@ JERRY_BUILDOPTIONS = [
Options('buildoption_test-jerry_math', Options('buildoption_test-jerry_math',
['--jerry-math=on']), ['--jerry-math=on']),
Options('buildoption_test-no_lcache_prophashmap', Options('buildoption_test-no_lcache_prophashmap',
['--compile-flag=-DJERRY_LCACHE=0', '--compile-flag=-DJERRY_PROPRETY_HASHMAP=0']), ['--compile-flag=-DJERRY_LCACHE=0', '--compile-flag=-DJERRY_PROPERTY_HASHMAP=0']),
Options('buildoption_test-external_context', Options('buildoption_test-external_context',
['--external-context=on']), ['--external-context=on']),
Options('buildoption_test-shared_libs', Options('buildoption_test-shared_libs',