Improve allocation of memory for byte-code array and literal identifiers hash table.

- literal identifiers hash table and byte-code array are now allocated in one heap block instead of four blocks;
 - memory regions with the hash tables and arrays are now linked into linked list using headers at start of the regions instead of using array_list.

JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
This commit is contained in:
Ruben Ayrapetyan
2015-06-19 00:11:22 +03:00
parent 4e563932f1
commit bd9d1d4afd
7 changed files with 158 additions and 84 deletions
@@ -28,7 +28,8 @@ typedef struct
lit_cpointer_t **buckets;
} lit_id_hash_table;
lit_id_hash_table *lit_id_hash_table_init (size_t, size_t);
lit_id_hash_table *lit_id_hash_table_init (uint8_t*, size_t, size_t, size_t);
size_t lit_id_hash_table_get_size_for_table (size_t, size_t);
void lit_id_hash_table_free (lit_id_hash_table *);
void lit_id_hash_table_insert (lit_id_hash_table *, idx_t, opcode_counter_t, lit_cpointer_t);
lit_cpointer_t lit_id_hash_table_lookup (lit_id_hash_table *, idx_t, opcode_counter_t);