Improve ecma_string_t descriptor (#3016)
This patch introduces several changes conntect to ecma-strings: - Extend the size of the reference counter to 28 bytes from 13 - Extend the size of the string hash to 32 bytes from 16 to use the extact FNV-1a hash - Introduce ECMA_STATIC_STRING_FLAG to reduce the number of string ref/derefs for static strings. - Introduce ECMA_STRING_CONTAINER_ASCII_STRING to store run-time allocated ASCII strings more efficiently - Remove ECMA_STRING_CONTAINER_LIT_NUMBER to half the storage size of the parsing time allocated floating point numbers - Rework the global number storage, to store only the floating point numbers - Optimize the lookup in the global number/string/symbol tables via reduce the number of NULL checks during decompressing the next element pointers - Reduce the code duplication in ecma_concat_ecma_strings and ecma_append_chars_to_string - Improve ecma_string_get_char with optional arguments to make it more reusable. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
@@ -136,11 +136,11 @@ struct jerry_context_t
|
||||
#endif /* ENABLED (JERRY_CPOINTER_32_BIT) */
|
||||
const lit_utf8_byte_t * const *lit_magic_string_ex_array; /**< array of external magic strings */
|
||||
const lit_utf8_size_t *lit_magic_string_ex_sizes; /**< external magic string lengths */
|
||||
ecma_lit_storage_item_t *string_list_first_p; /**< first item of the literal string list */
|
||||
jmem_cpointer_t string_list_first_cp; /**< first item of the literal string list */
|
||||
#if ENABLED (JERRY_ES2015_BUILTIN_SYMBOL)
|
||||
ecma_lit_storage_item_t *symbol_list_first_p; /**< first item of the global symbol list */
|
||||
jmem_cpointer_t symbol_list_first_cp; /**< first item of the global symbol list */
|
||||
#endif /* ENABLED (JERRY_ES2015_BUILTIN_SYMBOL) */
|
||||
ecma_lit_storage_item_t *number_list_first_p; /**< first item of the literal number list */
|
||||
jmem_cpointer_t number_list_first_cp; /**< first item of the literal number list */
|
||||
jmem_cpointer_t ecma_global_lex_env_cp; /**< global lexical environment */
|
||||
|
||||
#if ENABLED (JERRY_ES2015_MODULE_SYSTEM)
|
||||
|
||||
Reference in New Issue
Block a user