Change 'mem' namspace to 'jmem'

The 'mem_' prefix is too general, so it might clash with
symbols in other libraries. Renamed the directory, file,
funtion and type names.

Related issue: #1052

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
This commit is contained in:
László Langó
2016-05-13 14:09:31 +02:00
parent aaa3d22677
commit 92bb551d45
63 changed files with 1612 additions and 1612 deletions
@@ -276,7 +276,7 @@ ecma_op_array_object_define_own_property (ecma_object_t *obj_p, /**< the array o
ecma_length_t array_index_props_num = array_index_props_p->unit_number;
MEM_DEFINE_LOCAL_ARRAY (array_index_values_p, array_index_props_num, uint32_t);
JMEM_DEFINE_LOCAL_ARRAY (array_index_values_p, array_index_props_num, uint32_t);
ecma_collection_iterator_t iter;
ecma_collection_iterator_init (&iter, array_index_props_p);
@@ -339,7 +339,7 @@ ecma_op_array_object_define_own_property (ecma_object_t *obj_p, /**< the array o
}
}
MEM_FINALIZE_LOCAL_ARRAY (array_index_values_p);
JMEM_FINALIZE_LOCAL_ARRAY (array_index_values_p);
ecma_free_values_collection (array_index_props_p, true);
@@ -701,7 +701,7 @@ ecma_op_function_call (ecma_object_t *func_obj_p, /**< Function object */
ecma_length_t merged_args_list_len = bound_arg_list_p->unit_number + arguments_list_len;
MEM_DEFINE_LOCAL_ARRAY (merged_args_list_p, merged_args_list_len, ecma_value_t);
JMEM_DEFINE_LOCAL_ARRAY (merged_args_list_p, merged_args_list_len, ecma_value_t);
ecma_function_bind_merge_arg_lists (merged_args_list_p,
bound_arg_list_p,
@@ -714,7 +714,7 @@ ecma_op_function_call (ecma_object_t *func_obj_p, /**< Function object */
merged_args_list_p,
merged_args_list_len);
MEM_FINALIZE_LOCAL_ARRAY (merged_args_list_p);
JMEM_FINALIZE_LOCAL_ARRAY (merged_args_list_p);
}
else
{
@@ -892,7 +892,7 @@ ecma_op_function_construct (ecma_object_t *func_obj_p, /**< Function object */
ecma_length_t merged_args_list_len = bound_arg_list_p->unit_number + arguments_list_len;
MEM_DEFINE_LOCAL_ARRAY (merged_args_list_p, merged_args_list_len, ecma_value_t);
JMEM_DEFINE_LOCAL_ARRAY (merged_args_list_p, merged_args_list_len, ecma_value_t);
ecma_function_bind_merge_arg_lists (merged_args_list_p,
bound_arg_list_p,
@@ -904,7 +904,7 @@ ecma_op_function_construct (ecma_object_t *func_obj_p, /**< Function object */
merged_args_list_p,
merged_args_list_len);
MEM_FINALIZE_LOCAL_ARRAY (merged_args_list_p);
JMEM_FINALIZE_LOCAL_ARRAY (merged_args_list_p);
}
else
{
@@ -134,7 +134,7 @@ ecma_op_create_arguments_object (ecma_object_t *func_obj_p, /**< callee function
indx++)
{
// i.
if (literal_p[indx] == MEM_CP_NULL)
if (literal_p[indx] == JMEM_CP_NULL)
{
continue;
}
+6 -6
View File
@@ -734,10 +734,10 @@ ecma_op_object_get_property_names (ecma_object_t *obj_p, /**< object */
}
/* Second pass: collecting properties names into arrays */
MEM_DEFINE_LOCAL_ARRAY (names_p,
array_index_named_properties_count + string_named_properties_count,
ecma_string_t *);
MEM_DEFINE_LOCAL_ARRAY (array_index_names_p, array_index_named_properties_count, uint32_t);
JMEM_DEFINE_LOCAL_ARRAY (names_p,
array_index_named_properties_count + string_named_properties_count,
ecma_string_t *);
JMEM_DEFINE_LOCAL_ARRAY (array_index_names_p, array_index_named_properties_count, uint32_t);
uint32_t name_pos = array_index_named_properties_count + string_named_properties_count;
uint32_t array_index_name_pos = 0;
@@ -803,7 +803,7 @@ ecma_op_object_get_property_names (ecma_object_t *obj_p, /**< object */
JERRY_ASSERT (name_pos == 0);
MEM_FINALIZE_LOCAL_ARRAY (array_index_names_p);
JMEM_FINALIZE_LOCAL_ARRAY (array_index_names_p);
ecma_free_values_collection (prop_names_p, true);
@@ -870,7 +870,7 @@ ecma_op_object_get_property_names (ecma_object_t *obj_p, /**< object */
ecma_deref_ecma_string (name_p);
}
MEM_FINALIZE_LOCAL_ARRAY (names_p);
JMEM_FINALIZE_LOCAL_ARRAY (names_p);
}
ecma_free_values_collection (skipped_non_enumerable_p, true);
+1 -1
View File
@@ -35,7 +35,7 @@ typedef struct
ecma_value_t base;
/** referenced name */
__extension__ mem_cpointer_t referenced_name_cp : ECMA_POINTER_FIELD_WIDTH;
__extension__ jmem_cpointer_t referenced_name_cp : ECMA_POINTER_FIELD_WIDTH;
/** strict reference flag */
unsigned int is_strict : 1;
@@ -540,7 +540,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
const lit_utf8_byte_t *sub_str_p = NULL;
uint32_t array_size = re_ctx_p->num_of_captures + re_ctx_p->num_of_non_captures;
MEM_DEFINE_LOCAL_ARRAY (saved_bck_p, array_size, lit_utf8_byte_t *);
JMEM_DEFINE_LOCAL_ARRAY (saved_bck_p, array_size, lit_utf8_byte_t *);
size_t size = (size_t) (array_size) * sizeof (lit_utf8_byte_t *);
memcpy (saved_bck_p, re_ctx_p->saved_p, size);
@@ -592,7 +592,7 @@ re_match_regexp (re_matcher_ctx_t *re_ctx_p, /**< RegExp matcher context */
}
}
MEM_FINALIZE_LOCAL_ARRAY (saved_bck_p);
JMEM_FINALIZE_LOCAL_ARRAY (saved_bck_p);
return match_value;
}
case RE_OP_CHAR_CLASS:
@@ -1292,7 +1292,7 @@ ecma_regexp_exec_helper (ecma_value_t regexp_value, /**< RegExp object */
JERRY_ASSERT (re_ctx.num_of_captures % 2 == 0);
re_ctx.num_of_non_captures = bc_p->num_of_non_captures;
MEM_DEFINE_LOCAL_ARRAY (saved_p, re_ctx.num_of_captures + re_ctx.num_of_non_captures, const lit_utf8_byte_t *);
JMEM_DEFINE_LOCAL_ARRAY (saved_p, re_ctx.num_of_captures + re_ctx.num_of_non_captures, const lit_utf8_byte_t *);
for (uint32_t i = 0; i < re_ctx.num_of_captures + re_ctx.num_of_non_captures; i++)
{
@@ -1301,7 +1301,7 @@ ecma_regexp_exec_helper (ecma_value_t regexp_value, /**< RegExp object */
re_ctx.saved_p = saved_p;
uint32_t num_of_iter_length = (re_ctx.num_of_captures / 2) + (re_ctx.num_of_non_captures - 1);
MEM_DEFINE_LOCAL_ARRAY (num_of_iter_p, num_of_iter_length, uint32_t);
JMEM_DEFINE_LOCAL_ARRAY (num_of_iter_p, num_of_iter_length, uint32_t);
for (uint32_t i = 0; i < num_of_iter_length; i++)
{
@@ -1466,8 +1466,8 @@ ecma_regexp_exec_helper (ecma_value_t regexp_value, /**< RegExp object */
}
}
MEM_FINALIZE_LOCAL_ARRAY (num_of_iter_p);
MEM_FINALIZE_LOCAL_ARRAY (saved_p);
JMEM_FINALIZE_LOCAL_ARRAY (num_of_iter_p);
JMEM_FINALIZE_LOCAL_ARRAY (saved_p);
ECMA_FINALIZE_UTF8_STRING (input_buffer_p, input_buffer_size);
return ret_value;