Move char type definitions and magic string processing functions to literal component.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
This commit is contained in:
@@ -32,7 +32,7 @@ vm_helper_for_in_enumerate_properties_names (ecma_object_t *obj_p) /**< starting
|
||||
* conversion (ECMA-262 v5, 12.6.4, step 4) */
|
||||
{
|
||||
const size_t bitmap_row_size = sizeof (uint32_t) * JERRY_BITSINBYTE;
|
||||
uint32_t names_hashes_bitmap[(1u << ECMA_STRING_HASH_BITS) / bitmap_row_size];
|
||||
uint32_t names_hashes_bitmap[(1u << LIT_STRING_HASH_BITS) / bitmap_row_size];
|
||||
|
||||
memset (names_hashes_bitmap, 0, sizeof (names_hashes_bitmap));
|
||||
|
||||
@@ -96,7 +96,7 @@ vm_helper_for_in_enumerate_properties_names (ecma_object_t *obj_p) /**< starting
|
||||
prop_name_p = ECMA_GET_NON_NULL_POINTER (ecma_string_t, prop_iter_p->u.named_accessor_property.name_p);
|
||||
}
|
||||
|
||||
ecma_string_hash_t hash = prop_name_p->hash;
|
||||
lit_string_hash_t hash = prop_name_p->hash;
|
||||
uint32_t bitmap_row = hash / bitmap_row_size;
|
||||
uint32_t bitmap_column = hash % bitmap_row_size;
|
||||
|
||||
|
||||
@@ -35,8 +35,8 @@ do_strict_eval_arguments_check (ecma_object_t *ref_base_lex_env_p, /**< base of
|
||||
{
|
||||
JERRY_ASSERT (ecma_is_lexical_environment (ref_base_lex_env_p));
|
||||
|
||||
ecma_string_t* magic_string_eval = ecma_get_magic_string (ECMA_MAGIC_STRING_EVAL);
|
||||
ecma_string_t* magic_string_arguments = ecma_get_magic_string (ECMA_MAGIC_STRING_ARGUMENTS);
|
||||
ecma_string_t* magic_string_eval = ecma_get_magic_string (LIT_MAGIC_STRING_EVAL);
|
||||
ecma_string_t* magic_string_arguments = ecma_get_magic_string (LIT_MAGIC_STRING_ARGUMENTS);
|
||||
|
||||
is_check_failed = (ecma_compare_ecma_strings (var_name_string_p,
|
||||
magic_string_eval)
|
||||
|
||||
@@ -1545,23 +1545,23 @@ opfunc_typeof (opcode_t opdata, /**< operation data */
|
||||
|
||||
if (ecma_is_value_undefined (typeof_arg))
|
||||
{
|
||||
type_str_p = ecma_get_magic_string (ECMA_MAGIC_STRING_UNDEFINED);
|
||||
type_str_p = ecma_get_magic_string (LIT_MAGIC_STRING_UNDEFINED);
|
||||
}
|
||||
else if (ecma_is_value_null (typeof_arg))
|
||||
{
|
||||
type_str_p = ecma_get_magic_string (ECMA_MAGIC_STRING_OBJECT);
|
||||
type_str_p = ecma_get_magic_string (LIT_MAGIC_STRING_OBJECT);
|
||||
}
|
||||
else if (ecma_is_value_boolean (typeof_arg))
|
||||
{
|
||||
type_str_p = ecma_get_magic_string (ECMA_MAGIC_STRING_BOOLEAN);
|
||||
type_str_p = ecma_get_magic_string (LIT_MAGIC_STRING_BOOLEAN);
|
||||
}
|
||||
else if (ecma_is_value_number (typeof_arg))
|
||||
{
|
||||
type_str_p = ecma_get_magic_string (ECMA_MAGIC_STRING_NUMBER);
|
||||
type_str_p = ecma_get_magic_string (LIT_MAGIC_STRING_NUMBER);
|
||||
}
|
||||
else if (ecma_is_value_string (typeof_arg))
|
||||
{
|
||||
type_str_p = ecma_get_magic_string (ECMA_MAGIC_STRING_STRING);
|
||||
type_str_p = ecma_get_magic_string (LIT_MAGIC_STRING_STRING);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1569,11 +1569,11 @@ opfunc_typeof (opcode_t opdata, /**< operation data */
|
||||
|
||||
if (ecma_op_is_callable (typeof_arg))
|
||||
{
|
||||
type_str_p = ecma_get_magic_string (ECMA_MAGIC_STRING_FUNCTION);
|
||||
type_str_p = ecma_get_magic_string (LIT_MAGIC_STRING_FUNCTION);
|
||||
}
|
||||
else
|
||||
{
|
||||
type_str_p = ecma_get_magic_string (ECMA_MAGIC_STRING_OBJECT);
|
||||
type_str_p = ecma_get_magic_string (LIT_MAGIC_STRING_OBJECT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user