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
+1 -1
View File
@@ -38,7 +38,7 @@ util_free_literal (lexer_literal_t *literal_p) /**< literal */
{
if (!(literal_p->status_flags & LEXER_FLAG_SOURCE_PTR))
{
mem_heap_free_block_size_stored ((void *) literal_p->u.char_p);
jmem_heap_free_block_size_stored ((void *) literal_p->u.char_p);
}
}
else if ((literal_p->type == LEXER_FUNCTION_LITERAL)
+1 -1
View File
@@ -45,7 +45,7 @@
#include "ecma-globals.h"
#include "ecma-regexp-object.h"
#include "lit-literal.h"
#include "mem-heap.h"
#include "jmem-heap.h"
/* Immediate management. */
+1 -1
View File
@@ -1202,7 +1202,7 @@ lexer_process_char_literal (parser_context_t *context_p, /**< context */
if (has_escape)
{
literal_p->u.char_p = (uint8_t *) mem_heap_alloc_block_store_size (length);
literal_p->u.char_p = (uint8_t *) jmem_heap_alloc_block_store_size (length);
memcpy ((uint8_t *) literal_p->u.char_p, char_p, length);
}
else
+1 -1
View File
@@ -54,7 +54,7 @@
/* Maximum code size.
* Limit: 16777215. Recommended: 65535, 16777215. */
#ifndef PARSER_MAXIMUM_CODE_SIZE
#define PARSER_MAXIMUM_CODE_SIZE (65535 << (MEM_ALIGNMENT_LOG))
#define PARSER_MAXIMUM_CODE_SIZE (65535 << (JMEM_ALIGNMENT_LOG))
#endif /* !PARSER_MAXIMUM_CODE_SIZE */
/* Maximum number of values pushed onto the stack by a function.
+4 -4
View File
@@ -39,7 +39,7 @@ parser_malloc (parser_context_t *context_p, /**< context */
void *result;
JERRY_ASSERT (size > 0);
result = mem_heap_alloc_block (size);
result = jmem_heap_alloc_block (size);
if (result == 0)
{
parser_raise_error (context_p, PARSER_ERR_OUT_OF_MEMORY);
@@ -53,7 +53,7 @@ parser_malloc (parser_context_t *context_p, /**< context */
void parser_free (void *ptr, /**< pointer to free */
size_t size) /**< size of the memory block */
{
mem_heap_free_block (ptr, size);
jmem_heap_free_block (ptr, size);
} /* parser_free */
/**
@@ -68,7 +68,7 @@ parser_malloc_local (parser_context_t *context_p, /**< context */
void *result;
JERRY_ASSERT (size > 0);
result = mem_heap_alloc_block (size);
result = jmem_heap_alloc_block (size);
if (result == 0)
{
parser_raise_error (context_p, PARSER_ERR_OUT_OF_MEMORY);
@@ -82,7 +82,7 @@ parser_malloc_local (parser_context_t *context_p, /**< context */
void parser_free_local (void *ptr, /**< pointer to free */
size_t size) /**< size of the memory */
{
mem_heap_free_block (ptr, size);
jmem_heap_free_block (ptr, size);
} /* parser_free_local */
/**********************************************************************/
+5 -5
View File
@@ -105,7 +105,7 @@ parser_compute_indicies (parser_context_t *context_p, /**< context */
if (!(literal_p->status_flags & LEXER_FLAG_SOURCE_PTR))
{
mem_heap_free_block_size_stored ((void *) char_p);
jmem_heap_free_block_size_stored ((void *) char_p);
}
}
}
@@ -527,7 +527,7 @@ parser_generate_initializers (parser_context_t *context_p, /**< context */
if (!context_p->is_show_opcodes
&& !(literal_p->status_flags & LEXER_FLAG_SOURCE_PTR))
{
mem_heap_free_block_size_stored ((void *) literal_p->u.char_p);
jmem_heap_free_block_size_stored ((void *) literal_p->u.char_p);
}
#else /* !PARSER_DUMP_BYTE_CODE */
literal_pool_p[literal_p->prop.index] = literal_p->u.value;
@@ -1460,12 +1460,12 @@ parser_post_processing (parser_context_t *context_p) /**< context */
}
total_size += length + context_p->literal_count * sizeof (lit_cpointer_t);
total_size = JERRY_ALIGNUP (total_size, MEM_ALIGNMENT);
total_size = JERRY_ALIGNUP (total_size, JMEM_ALIGNMENT);
compiled_code_p = (ecma_compiled_code_t *) parser_malloc (context_p, total_size);
byte_code_p = (uint8_t *) compiled_code_p;
compiled_code_p->size = (uint16_t) (total_size >> MEM_ALIGNMENT_LOG);
compiled_code_p->size = (uint16_t) (total_size >> JMEM_ALIGNMENT_LOG);
compiled_code_p->refs = 1;
compiled_code_p->status_flags = CBC_CODE_FLAGS_FUNCTION;
@@ -1695,7 +1695,7 @@ parser_post_processing (parser_context_t *context_p) /**< context */
if ((literal_p->type == LEXER_IDENT_LITERAL || literal_p->type == LEXER_STRING_LITERAL)
&& !(literal_p->status_flags & LEXER_FLAG_SOURCE_PTR))
{
mem_heap_free_block_size_stored ((void *) literal_p->u.char_p);
jmem_heap_free_block_size_stored ((void *) literal_p->u.char_p);
}
}
}