Sixteen bit hash for strings.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2016-06-27 03:04:50 -07:00
parent 0a32c97755
commit e9a47aff95
4 changed files with 27 additions and 17 deletions
+8 -3
View File
@@ -126,11 +126,16 @@ typedef uint32_t lit_code_point_t;
/**
* ECMA string hash
*/
typedef uint8_t lit_string_hash_t;
typedef uint16_t lit_string_hash_t;
/**
* ECMA string hash value length, in bits
* Maximum value of ECMA string hash + 1
*
* Note:
* On ARM, this constant can be encoded as an immediate value
* while 0xffffu cannot be. Hence using this constant reduces
* binary size and improves performance.
*/
#define LIT_STRING_HASH_BITS (sizeof (lit_string_hash_t) * JERRY_BITSINBYTE)
#define LIT_STRING_HASH_LIMIT 0x10000u
#endif /* !LIT_GLOBALS_H */