Style fixes in liballocator, libecmaobjects, libecmaoperations: space between function name and opening parenthesis, no space after opening parenthesis/before closing parenthesis.
This commit is contained in:
@@ -38,43 +38,43 @@
|
||||
#include "ecma-gc.h"
|
||||
#include "mem-poolman.h"
|
||||
|
||||
JERRY_STATIC_ASSERT( sizeof (ecma_value_t) <= sizeof (uint16_t) );
|
||||
JERRY_STATIC_ASSERT( sizeof (ecma_property_t) <= sizeof (uint64_t) );
|
||||
JERRY_STATIC_ASSERT(sizeof (ecma_value_t) <= sizeof (uint16_t));
|
||||
JERRY_STATIC_ASSERT(sizeof (ecma_property_t) <= sizeof (uint64_t));
|
||||
|
||||
FIXME( Pack ecma_object_t )
|
||||
JERRY_STATIC_ASSERT( sizeof (ecma_object_t) <= 2 * sizeof (uint64_t) );
|
||||
FIXME(Pack ecma_object_t)
|
||||
JERRY_STATIC_ASSERT(sizeof (ecma_object_t) <= 2 * sizeof (uint64_t));
|
||||
|
||||
JERRY_STATIC_ASSERT( sizeof (ecma_array_header_t) <= sizeof (uint32_t) );
|
||||
JERRY_STATIC_ASSERT( sizeof (ecma_array_first_chunk_t) == sizeof(uint64_t) );
|
||||
JERRY_STATIC_ASSERT( sizeof (ecma_array_non_first_chunk_t) == sizeof(uint64_t) );
|
||||
JERRY_STATIC_ASSERT( sizeof (ecma_completion_value_t) == sizeof(uint32_t) );
|
||||
JERRY_STATIC_ASSERT(sizeof (ecma_array_header_t) <= sizeof (uint32_t));
|
||||
JERRY_STATIC_ASSERT(sizeof (ecma_array_first_chunk_t) == sizeof (uint64_t));
|
||||
JERRY_STATIC_ASSERT(sizeof (ecma_array_non_first_chunk_t) == sizeof (uint64_t));
|
||||
JERRY_STATIC_ASSERT(sizeof (ecma_completion_value_t) == sizeof (uint32_t));
|
||||
|
||||
/**
|
||||
* Template of an allocation routine.
|
||||
*
|
||||
* FIXME: Run GC only if allocation failed.
|
||||
*/
|
||||
#define ALLOC( ecma_type) ecma_ ## ecma_type ## _t * \
|
||||
#define ALLOC(ecma_type) ecma_ ## ecma_type ## _t * \
|
||||
ecma_alloc_ ## ecma_type (void) \
|
||||
{ \
|
||||
ecma_ ## ecma_type ## _t *p ## ecma_type = (ecma_ ## ecma_type ## _t *) \
|
||||
mem_pools_alloc(); \
|
||||
mem_pools_alloc (); \
|
||||
\
|
||||
if ( likely( p ## ecma_type != NULL ) ) \
|
||||
if (likely (p ## ecma_type != NULL)) \
|
||||
{ \
|
||||
return p ## ecma_type; \
|
||||
} \
|
||||
\
|
||||
for ( ecma_gc_gen_t gen_id = ECMA_GC_GEN_0; \
|
||||
for (ecma_gc_gen_t gen_id = ECMA_GC_GEN_0; \
|
||||
gen_id < ECMA_GC_GEN_COUNT; \
|
||||
gen_id++ ) \
|
||||
gen_id++) \
|
||||
{ \
|
||||
ecma_gc_run( gen_id ); \
|
||||
ecma_gc_run (gen_id); \
|
||||
\
|
||||
p ## ecma_type = (ecma_ ## ecma_type ## _t *) \
|
||||
mem_pools_alloc(); \
|
||||
mem_pools_alloc (); \
|
||||
\
|
||||
if ( likely( p ## ecma_type != NULL ) ) \
|
||||
if (likely (p ## ecma_type != NULL)) \
|
||||
{ \
|
||||
return p ## ecma_type; \
|
||||
} \
|
||||
@@ -85,18 +85,18 @@ ecma_alloc_ ## ecma_type (void) \
|
||||
/**
|
||||
* Deallocation routine template
|
||||
*/
|
||||
#define DEALLOC( ecma_type) void \
|
||||
ecma_dealloc_ ## ecma_type( ecma_ ## ecma_type ## _t *p ## ecma_type) \
|
||||
#define DEALLOC(ecma_type) void \
|
||||
ecma_dealloc_ ## ecma_type (ecma_ ## ecma_type ## _t *p ## ecma_type) \
|
||||
{ \
|
||||
mem_pools_free( (uint8_t*) p ## ecma_type); \
|
||||
mem_pools_free ((uint8_t*) p ## ecma_type); \
|
||||
}
|
||||
|
||||
/**
|
||||
* Declaration of alloc/free routine for specified ecma-type.
|
||||
*/
|
||||
#define DECLARE_ROUTINES_FOR( ecma_type) \
|
||||
ALLOC( ecma_type) \
|
||||
DEALLOC( ecma_type)
|
||||
#define DECLARE_ROUTINES_FOR(ecma_type) \
|
||||
ALLOC(ecma_type) \
|
||||
DEALLOC(ecma_type)
|
||||
|
||||
DECLARE_ROUTINES_FOR (object)
|
||||
DECLARE_ROUTINES_FOR (property)
|
||||
|
||||
Reference in New Issue
Block a user