Add new coding style rules and fix appeared issues.
JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
This commit is contained in:
@@ -99,7 +99,7 @@ fill_params_list (int_data_t *int_data, /**< interpreter context */
|
||||
const literal_index_t param_name_lit_idx = serializer_get_literal_id_by_uid (next_opcode.data.meta.data_1,
|
||||
int_data->pos);
|
||||
|
||||
params_names [param_index] = ecma_new_ecma_string_from_lit_index (param_name_lit_idx);
|
||||
params_names[param_index] = ecma_new_ecma_string_from_lit_index (param_name_lit_idx);
|
||||
|
||||
int_data->pos++;
|
||||
}
|
||||
|
||||
@@ -279,7 +279,6 @@ OP_ARGS_LIST (GETOP_DECL)
|
||||
typedef struct
|
||||
{
|
||||
uint8_t uids[4];
|
||||
}
|
||||
raw_opcode;
|
||||
} raw_opcode;
|
||||
|
||||
#endif /* OPCODES_H */
|
||||
|
||||
@@ -203,7 +203,7 @@ pp_printf (const char *format, opcode_t opcode, literal_index_t lit_ids[], opcod
|
||||
}
|
||||
|
||||
#define PP_OP(op_name, format) \
|
||||
case NAME_TO_ID(op_name): pp_printf (format, opm.op, opm.lit_id, oc); break;
|
||||
case NAME_TO_ID (op_name): pp_printf (format, opm.op, opm.lit_id, oc); break;
|
||||
#define VAR(i) var_to_str (opm.op, opm.lit_id, oc, i)
|
||||
#define OC(i, j) __extension__({ raw_opcode* raw = (raw_opcode *) &opm.op; \
|
||||
calc_opcode_counter_from_idx_idx (raw->uids[i], raw->uids[j]); })
|
||||
|
||||
+10
-10
@@ -119,8 +119,8 @@ interp_mem_stats_context_enter (int_data_t *int_data_p,
|
||||
|
||||
char indent_prefix[INTERP_MEM_PRINT_INDENTATION_MAX + 2];
|
||||
memset (indent_prefix, ' ', sizeof (indent_prefix));
|
||||
indent_prefix [indentation] = '|';
|
||||
indent_prefix [indentation + 1] = '\0';
|
||||
indent_prefix[indentation] = '|';
|
||||
indent_prefix[indentation + 1] = '\0';
|
||||
|
||||
int_data_p->context_peak_allocated_heap_bytes = 0;
|
||||
int_data_p->context_peak_waste_heap_bytes = 0;
|
||||
@@ -157,8 +157,8 @@ interp_mem_stats_context_exit (int_data_t *int_data_p,
|
||||
|
||||
char indent_prefix[INTERP_MEM_PRINT_INDENTATION_MAX + 2];
|
||||
memset (indent_prefix, ' ', sizeof (indent_prefix));
|
||||
indent_prefix [indentation] = '|';
|
||||
indent_prefix [indentation + 1] = '\0';
|
||||
indent_prefix[indentation] = '|';
|
||||
indent_prefix[indentation + 1] = '\0';
|
||||
|
||||
mem_heap_stats_t heap_stats_context_exit;
|
||||
mem_pools_stats_t pools_stats_context_exit;
|
||||
@@ -228,8 +228,8 @@ interp_mem_stats_opcode_enter (opcode_counter_t opcode_position,
|
||||
|
||||
char indent_prefix[INTERP_MEM_PRINT_INDENTATION_MAX + 2];
|
||||
memset (indent_prefix, ' ', sizeof (indent_prefix));
|
||||
indent_prefix [indentation] = '|';
|
||||
indent_prefix [indentation + 1] = '\0';
|
||||
indent_prefix[indentation] = '|';
|
||||
indent_prefix[indentation + 1] = '\0';
|
||||
|
||||
interp_mem_get_stats (out_heap_stats_p,
|
||||
out_pools_stats_p,
|
||||
@@ -238,7 +238,7 @@ interp_mem_stats_opcode_enter (opcode_counter_t opcode_position,
|
||||
opcode_t opcode = read_opcode (opcode_position);
|
||||
|
||||
printf ("%s-- Opcode: %s (position %u) --\n",
|
||||
indent_prefix, __op_names [opcode.op_idx], (uint32_t) opcode_position);
|
||||
indent_prefix, __op_names[opcode.op_idx], (uint32_t) opcode_position);
|
||||
|
||||
interp_mem_stats_print_indentation += INTERP_MEM_PRINT_INDENTATION_STEP;
|
||||
}
|
||||
@@ -261,8 +261,8 @@ interp_mem_stats_opcode_exit (int_data_t *int_data_p,
|
||||
|
||||
char indent_prefix[INTERP_MEM_PRINT_INDENTATION_MAX + 2];
|
||||
memset (indent_prefix, ' ', sizeof (indent_prefix));
|
||||
indent_prefix [indentation] = '|';
|
||||
indent_prefix [indentation + 1] = '\0';
|
||||
indent_prefix[indentation] = '|';
|
||||
indent_prefix[indentation + 1] = '\0';
|
||||
|
||||
mem_heap_stats_t heap_stats_after;
|
||||
mem_pools_stats_t pools_stats_after;
|
||||
@@ -328,7 +328,7 @@ interp_mem_stats_opcode_exit (int_data_t *int_data_p,
|
||||
}
|
||||
|
||||
printf ("%s-- End of execution of opcode %s (position %u) --\n\n",
|
||||
indent_prefix, __op_names [opcode.op_idx], opcode_position);
|
||||
indent_prefix, __op_names[opcode.op_idx], opcode_position);
|
||||
}
|
||||
#endif /* MEM_STATS */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user