3333 */
3434#define ECMA_LCACHE_HASH_MASK (ECMA_LCACHE_HASH_ROWS_COUNT - 1)
3535
36- #endif /* !CONFIG_ECMA_LCACHE_DISABLE */
37-
38- /**
39- * Initialize LCache
40- */
41- void
42- ecma_lcache_init (void )
43- {
44- #ifndef CONFIG_ECMA_LCACHE_DISABLE
45- memset (JERRY_HASH_TABLE_CONTEXT (table ), 0 , sizeof (jerry_hash_table_t ));
46- #endif /* !CONFIG_ECMA_LCACHE_DISABLE */
47- } /* ecma_lcache_init */
48-
49- #ifndef CONFIG_ECMA_LCACHE_DISABLE
5036/**
5137 * Invalidate specified LCache entry
5238 */
@@ -74,6 +60,7 @@ ecma_lcache_row_index (jmem_cpointer_t object_cp, /**< compressed pointer to obj
7460 * so properties of different objects with the same name can be cached effectively. */
7561 return (size_t ) ((name_hash ^ object_cp ) & ECMA_LCACHE_HASH_MASK );
7662} /* ecma_lcache_row_index */
63+
7764#endif /* !CONFIG_ECMA_LCACHE_DISABLE */
7865
7966/**
@@ -96,7 +83,7 @@ ecma_lcache_insert (ecma_object_t *object_p, /**< object */
9683
9784 lit_string_hash_t name_hash = ecma_string_get_property_name_hash (* prop_p , name_cp );
9885 size_t row_index = ecma_lcache_row_index (object_cp , name_hash );
99- ecma_lcache_hash_entry_t * entries_p = JERRY_HASH_TABLE_CONTEXT ( table ) [row_index ];
86+ ecma_lcache_hash_entry_t * entries_p = JERRY_CONTEXT ( lcache ) [row_index ];
10087
10188 uint32_t entry_index ;
10289 for (entry_index = 0 ; entry_index < ECMA_LCACHE_HASH_ROW_LENGTH ; entry_index ++ )
@@ -132,12 +119,6 @@ ecma_lcache_insert (ecma_object_t *object_p, /**< object */
132119#endif /* !CONFIG_ECMA_LCACHE_DISABLE */
133120} /* ecma_lcache_insert */
134121
135- #ifndef CONFIG_ECMA_LCACHE_DISABLE
136-
137-
138-
139- #endif /* !CONFIG_ECMA_LCACHE_DISABLE */
140-
141122/**
142123 * Lookup property in the LCache
143124 *
@@ -182,7 +163,7 @@ ecma_lcache_lookup (ecma_object_t *object_p, /**< object */
182163
183164 size_t row_index = ecma_lcache_row_index (object_cp , name_hash );
184165
185- ecma_lcache_hash_entry_t * entry_p = JERRY_HASH_TABLE_CONTEXT ( table ) [row_index ];
166+ ecma_lcache_hash_entry_t * entry_p = JERRY_CONTEXT ( lcache ) [row_index ];
186167 ecma_lcache_hash_entry_t * entry_end_p = entry_p + ECMA_LCACHE_HASH_ROW_LENGTH ;
187168
188169 while (entry_p < entry_end_p )
@@ -230,12 +211,12 @@ ecma_lcache_invalidate (ecma_object_t *object_p, /**< object */
230211
231212 lit_string_hash_t name_hash = ecma_string_get_property_name_hash (* prop_p , name_cp );
232213 size_t row_index = ecma_lcache_row_index (object_cp , name_hash );
233- ecma_lcache_hash_entry_t * entry_p = JERRY_HASH_TABLE_CONTEXT ( table ) [row_index ];
214+ ecma_lcache_hash_entry_t * entry_p = JERRY_CONTEXT ( lcache ) [row_index ];
234215
235216 while (true)
236217 {
237218 /* The property must be present. */
238- JERRY_ASSERT (entry_p - JERRY_HASH_TABLE_CONTEXT ( table ) [row_index ] < ECMA_LCACHE_HASH_ROW_LENGTH );
219+ JERRY_ASSERT (entry_p - JERRY_CONTEXT ( lcache ) [row_index ] < ECMA_LCACHE_HASH_ROW_LENGTH );
239220
240221 if (entry_p -> object_cp != ECMA_NULL_POINTER && entry_p -> prop_p == prop_p )
241222 {
0 commit comments