Fix style issues and improve vera++ rules.

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-02-17 14:59:36 +00:00
parent db26cb2b79
commit a7715a5d78
35 changed files with 232 additions and 172 deletions
+2 -2
View File
@@ -61,10 +61,10 @@
/* The maximum of PARSER_CBC_STREAM_PAGE_SIZE is 127. */
#define PARSER_CBC_STREAM_PAGE_SIZE \
((uint32_t) (64 - sizeof (void*)))
((uint32_t) (64 - sizeof (void *)))
#define PARSER_STACK_PAGE_SIZE \
((uint32_t) (((sizeof (void*) > 4) ? 128 : 64) - sizeof (void*)))
((uint32_t) (((sizeof (void *) > 4) ? 128 : 64) - sizeof (void *)))
/* Avoid compiler warnings for += operations. */
#define PARSER_PLUS_EQUAL_U16(base, value) (base) = (uint16_t) ((base) + (value))
+6 -6
View File
@@ -146,7 +146,7 @@ static void
re_append_opcode (re_bytecode_ctx_t *bc_ctx_p, /**< RegExp bytecode context */
re_opcode_t opcode) /**< input opcode */
{
re_bytecode_list_append (bc_ctx_p, (uint8_t*) &opcode, sizeof (uint8_t));
re_bytecode_list_append (bc_ctx_p, (uint8_t *) &opcode, sizeof (uint8_t));
} /* re_append_opcode */
/**
@@ -156,7 +156,7 @@ static void
re_append_u32 (re_bytecode_ctx_t *bc_ctx_p, /**< RegExp bytecode context */
uint32_t value) /**< input value */
{
re_bytecode_list_append (bc_ctx_p, (uint8_t*) &value, sizeof (uint32_t));
re_bytecode_list_append (bc_ctx_p, (uint8_t *) &value, sizeof (uint32_t));
} /* re_append_u32 */
/**
@@ -178,7 +178,7 @@ re_insert_opcode (re_bytecode_ctx_t *bc_ctx_p, /**< RegExp bytecode context */
uint32_t offset, /**< distance from the start of the container */
re_opcode_t opcode) /**< input opcode */
{
re_bytecode_list_insert (bc_ctx_p, offset, (uint8_t*) &opcode, sizeof (uint8_t));
re_bytecode_list_insert (bc_ctx_p, offset, (uint8_t *) &opcode, sizeof (uint8_t));
} /* re_insert_opcode */
/**
@@ -189,7 +189,7 @@ re_insert_u32 (re_bytecode_ctx_t *bc_ctx_p, /**< RegExp bytecode context */
uint32_t offset, /**< distance from the start of the container */
uint32_t value) /**< input value */
{
re_bytecode_list_insert (bc_ctx_p, offset, (uint8_t*) &value, sizeof (uint32_t));
re_bytecode_list_insert (bc_ctx_p, offset, (uint8_t *) &value, sizeof (uint32_t));
} /* re_insert_u32 */
/**
@@ -209,7 +209,7 @@ re_get_opcode (uint8_t **bc_p) /**< pointer to bytecode start */
uint32_t
re_get_value (uint8_t **bc_p) /**< pointer to bytecode start */
{
uint32_t value = *((uint32_t*) *bc_p);
uint32_t value = *((uint32_t *) *bc_p);
(*bc_p) += sizeof (uint32_t);
return value;
} /* re_get_value */
@@ -223,7 +223,7 @@ re_append_char_class (void *re_ctx_p, /**< RegExp compiler context */
uint32_t end) /**< character class range to */
{
/* FIXME: Handle ignore case flag and add unicode support. */
re_compiler_ctx_t *ctx_p = (re_compiler_ctx_t*) re_ctx_p;
re_compiler_ctx_t *ctx_p = (re_compiler_ctx_t *) re_ctx_p;
re_append_u32 (ctx_p->bytecode_ctx_p, start);
re_append_u32 (ctx_p->bytecode_ctx_p, end);
ctx_p->parser_ctx_p->num_of_classes++;