Fixing style according to rules defined in vera++ scripts.
This commit is contained in:
@@ -61,7 +61,8 @@
|
||||
putchar (' '); \
|
||||
} \
|
||||
printf ("^\n"); \
|
||||
printf ("SORRY, Unimplemented: Ln %lu, Col %lu: %s\n", (unsigned long) (line + 1), (unsigned long) (column + 1), MESSAGE); \
|
||||
printf ("SORRY, Unimplemented: Ln %lu, Col %lu: %s\n", \
|
||||
(unsigned long) (line + 1), (unsigned long) (column + 1), MESSAGE); \
|
||||
JERRY_UNIMPLEMENTED ("Unimplemented parser feature."); \
|
||||
} while (0)
|
||||
#else /* JERRY_NDEBUG */
|
||||
|
||||
+10
-1
@@ -26,7 +26,8 @@
|
||||
#define LP(s) create_literal_from_str_compute_len (s)
|
||||
#define NUM(s) create_literal_from_num (s)
|
||||
|
||||
static uint8_t opcode_sizes[] = {
|
||||
static uint8_t opcode_sizes[] =
|
||||
{
|
||||
OP_LIST (OPCODE_SIZE)
|
||||
0
|
||||
};
|
||||
@@ -43,15 +44,23 @@ opcodes_equal (const opcode_t *opcodes1, opcode_t *opcodes2, uint16_t size)
|
||||
uint8_t j;
|
||||
|
||||
if (opcode_num1 != opcode_num2)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (opcode_num1 == NAME_TO_ID (nop) || opcode_num1 == NAME_TO_ID (ret))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
for (j = 1; j < opcode_sizes[opcode_num1]; j++)
|
||||
{
|
||||
if (((uint8_t*)&opcodes1[i])[j] != ((uint8_t*)&opcodes2[i])[j])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ main( int __attr_unused___ argc,
|
||||
{
|
||||
for (uint32_t j = 0; j < test_sub_iters; j++)
|
||||
{
|
||||
size_t size = (unsigned int) rand() % ( test_threshold_block_size );
|
||||
size_t size = (size_t) rand () % test_threshold_block_size;
|
||||
ptrs[j] = (uint8_t*) mem_heap_alloc_block (size,
|
||||
(rand () % 2) ?
|
||||
MEM_HEAP_ALLOC_SHORT_TERM : MEM_HEAP_ALLOC_SHORT_TERM);
|
||||
@@ -124,7 +124,7 @@ main( int __attr_unused___ argc,
|
||||
JERRY_ASSERT(ptrs[j][k] == 0);
|
||||
}
|
||||
|
||||
size_t new_size = (unsigned int) rand() % ( test_threshold_block_size );
|
||||
size_t new_size = (size_t) rand () % (test_threshold_block_size);
|
||||
|
||||
if (mem_heap_try_resize_block (ptrs[j], new_size))
|
||||
{
|
||||
|
||||
@@ -35,7 +35,8 @@ const uint32_t test_iters = 64;
|
||||
// Subiterations count
|
||||
const uint32_t test_max_sub_iters = 1024;
|
||||
|
||||
#define TEST_POOL_SPACE_SIZE (sizeof (mem_pool_state_t) + (1ull << MEM_POOL_MAX_CHUNKS_NUMBER_LOG) * MEM_POOL_CHUNK_SIZE)
|
||||
#define TEST_POOL_SPACE_SIZE (sizeof (mem_pool_state_t) + \
|
||||
(1ull << MEM_POOL_MAX_CHUNKS_NUMBER_LOG) * MEM_POOL_CHUNK_SIZE)
|
||||
uint8_t test_pool [TEST_POOL_SPACE_SIZE] __attribute__ ((aligned (MEM_ALIGNMENT)));
|
||||
|
||||
uint8_t* ptrs[test_max_sub_iters];
|
||||
|
||||
@@ -38,7 +38,8 @@ main( int __attr_unused___ argc,
|
||||
parser_parse_program ();
|
||||
parser_free ();
|
||||
|
||||
opcode_t opcodes[] = {
|
||||
opcode_t opcodes[] =
|
||||
{
|
||||
getop_reg_var_decl (128, 129), // var tmp128 .. tmp129;
|
||||
getop_var_decl (0), // var a;
|
||||
getop_assignment (129, 1, 1), // tmp129 = 1: SMALLINT;
|
||||
|
||||
Reference in New Issue
Block a user