Skip to content

Commit b66bd4f

Browse files
committed
Fix style issues and improve vera++ rules.
JerryScript-DCO-1.0-Signed-off-by: László Langó [email protected]
1 parent b2426a7 commit b66bd4f

31 files changed

+164
-158
lines changed

jerry-core/ecma/base/ecma-alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ JERRY_STATIC_ASSERT (sizeof (ecma_getter_setter_pointers_t) <= sizeof (uint64_t)
6969
#define DEALLOC(ecma_type) void \
7070
ecma_dealloc_ ## ecma_type (ecma_ ## ecma_type ## _t *p ## ecma_type) \
7171
{ \
72-
mem_pools_free ((uint8_t*) p ## ecma_type); \
72+
mem_pools_free ((uint8_t *) p ## ecma_type); \
7373
}
7474

7575
/**

jerry-core/ecma/base/ecma-gc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ ecma_gc_set_object_refs (ecma_object_t *object_p, /**< object */
117117
/**
118118
* Get next object in list of objects with same generation.
119119
*/
120-
static ecma_object_t*
120+
static ecma_object_t *
121121
ecma_gc_get_object_next (ecma_object_t *object_p) /**< object */
122122
{
123123
JERRY_ASSERT (object_p != NULL);

jerry-core/ecma/base/ecma-helpers-conversion.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1278,7 +1278,7 @@ ecma_number_to_decimal (ecma_number_t num, /**< ecma-number */
12781278
}
12791279

12801280
const int32_t int_part_shift = dot_shift;
1281-
const uint32_t frac_part_mask = ((((uint32_t)1) << int_part_shift) - 1);
1281+
const uint32_t frac_part_mask = ((((uint32_t) 1) << int_part_shift) - 1);
12821282

12831283
uint32_t int_part = fraction >> int_part_shift;
12841284
uint32_t frac_part = fraction & frac_part_mask;

jerry-core/ecma/base/ecma-helpers-string.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ ecma_init_ecma_string_from_magic_string_ex_id (ecma_string_t *string_p,
5959
*
6060
* @return pointer to the collection's header
6161
*/
62-
static ecma_collection_header_t*
62+
static ecma_collection_header_t *
6363
ecma_new_chars_collection (const lit_utf8_byte_t chars_buffer[], /**< utf-8 chars */
6464
lit_utf8_size_t chars_size) /**< size of buffer with chars */
6565
{
@@ -220,7 +220,7 @@ ecma_compare_chars_collection (const ecma_collection_header_t *header1_p, /**< f
220220
*
221221
* @return pointer to collection copy
222222
*/
223-
static ecma_collection_header_t*
223+
static ecma_collection_header_t *
224224
ecma_copy_chars_collection (const ecma_collection_header_t *collection_p) /**< collection's header */
225225
{
226226
JERRY_ASSERT (collection_p != NULL);
@@ -464,7 +464,7 @@ ecma_new_ecma_string_from_uint32 (uint32_t uint32_number) /**< UInt32-represente
464464
*
465465
* @return pointer to ecma-string descriptor
466466
*/
467-
ecma_string_t*
467+
ecma_string_t *
468468
ecma_new_ecma_string_from_number (ecma_number_t num) /**< ecma-number */
469469
{
470470
uint32_t uint32_num = ecma_number_to_uint32 (num);
@@ -506,7 +506,7 @@ ecma_new_ecma_string_from_number (ecma_number_t num) /**< ecma-number */
506506
*
507507
* @return pointer to ecma-string descriptor
508508
*/
509-
ecma_string_t*
509+
ecma_string_t *
510510
ecma_new_ecma_string_from_lit_cp (lit_cpointer_t lit_cp) /**< index in the literal table */
511511
{
512512
ecma_string_t *string_desc_p = ecma_alloc_string ();
@@ -521,7 +521,7 @@ ecma_new_ecma_string_from_lit_cp (lit_cpointer_t lit_cp) /**< index in the liter
521521
*
522522
* @return pointer to ecma-string descriptor
523523
*/
524-
ecma_string_t*
524+
ecma_string_t *
525525
ecma_new_ecma_string_from_magic_string_id (lit_magic_string_id_t id) /**< identifier of magic string */
526526
{
527527
JERRY_ASSERT (id < LIT_MAGIC_STRING__COUNT);
@@ -537,7 +537,7 @@ ecma_new_ecma_string_from_magic_string_id (lit_magic_string_id_t id) /**< identi
537537
*
538538
* @return pointer to ecma-string descriptor
539539
*/
540-
ecma_string_t*
540+
ecma_string_t *
541541
ecma_new_ecma_string_from_magic_string_ex_id (lit_magic_string_ex_id_t id) /**< identifier of externl magic string */
542542
{
543543
JERRY_ASSERT (id < lit_get_magic_string_ex_count ());
@@ -553,7 +553,7 @@ ecma_new_ecma_string_from_magic_string_ex_id (lit_magic_string_ex_id_t id) /**<
553553
*
554554
* @return concatenation of two ecma-strings
555555
*/
556-
ecma_string_t*
556+
ecma_string_t *
557557
ecma_concat_ecma_strings (ecma_string_t *string1_p, /**< first ecma-string */
558558
ecma_string_t *string2_p) /**< second ecma-string */
559559
{
@@ -593,7 +593,7 @@ ecma_concat_ecma_strings (ecma_string_t *string1_p, /**< first ecma-string */
593593

594594
ecma_string_t *str_concat_p = ecma_new_ecma_string_from_utf8 (str_p, buffer_size);
595595

596-
mem_heap_free_block ((void*) str_p);
596+
mem_heap_free_block ((void *) str_p);
597597

598598
return str_concat_p;
599599
} /* ecma_concat_ecma_strings */
@@ -603,7 +603,7 @@ ecma_concat_ecma_strings (ecma_string_t *string1_p, /**< first ecma-string */
603603
*
604604
* @return pointer to copy of ecma-string with reference counter set to 1
605605
*/
606-
static ecma_string_t*
606+
static ecma_string_t *
607607
ecma_copy_ecma_string (ecma_string_t *string_desc_p) /**< string descriptor */
608608
{
609609
JERRY_ASSERT (string_desc_p != NULL);
@@ -668,7 +668,7 @@ ecma_copy_ecma_string (ecma_string_t *string_desc_p) /**< string descriptor */
668668
* @return pointer to same ecma-string descriptor with increased reference counter
669669
* or the ecma-string's copy with reference counter set to 1
670670
*/
671-
ecma_string_t*
671+
ecma_string_t *
672672
ecma_copy_or_ref_ecma_string (ecma_string_t *string_desc_p) /**< string descriptor */
673673
{
674674
JERRY_ASSERT (string_desc_p != NULL);
@@ -719,7 +719,7 @@ ecma_deref_ecma_string (ecma_string_t *string_p) /**< ecma-string */
719719
return;
720720
}
721721

722-
switch ((ecma_string_container_t)string_p->container)
722+
switch ((ecma_string_container_t) string_p->container)
723723
{
724724
case ECMA_STRING_CONTAINER_HEAP_CHUNKS:
725725
{
@@ -786,7 +786,7 @@ ecma_string_to_number (const ecma_string_t *str_p) /**< ecma-string */
786786
{
787787
JERRY_ASSERT (str_p != NULL);
788788

789-
switch ((ecma_string_container_t)str_p->container)
789+
switch ((ecma_string_container_t) str_p->container)
790790
{
791791
case ECMA_STRING_CONTAINER_UINT32_IN_DESC:
792792
{
@@ -894,7 +894,7 @@ ecma_string_to_utf8_string (const ecma_string_t *string_desc_p, /**< ecma-string
894894
return -required_buffer_size;
895895
}
896896

897-
switch ((ecma_string_container_t)string_desc_p->container)
897+
switch ((ecma_string_container_t) string_desc_p->container)
898898
{
899899
case ECMA_STRING_CONTAINER_HEAP_CHUNKS:
900900
{
@@ -1205,12 +1205,12 @@ ecma_compare_ecma_strings_relational (const ecma_string_t *string1_p, /**< ecma-
12051205

12061206
if (is_utf8_string1_on_heap)
12071207
{
1208-
mem_heap_free_block ((void*) utf8_string1_p);
1208+
mem_heap_free_block ((void *) utf8_string1_p);
12091209
}
12101210

12111211
if (is_utf8_string2_on_heap)
12121212
{
1213-
mem_heap_free_block ((void*) utf8_string2_p);
1213+
mem_heap_free_block ((void *) utf8_string2_p);
12141214
}
12151215

12161216
return is_first_less_than_second;
@@ -1356,7 +1356,7 @@ ecma_string_get_size (const ecma_string_t *string_p) /**< ecma-string */
13561356
}
13571357
default:
13581358
{
1359-
JERRY_ASSERT ((ecma_string_container_t)string_p->container == ECMA_STRING_CONTAINER_HEAP_CHUNKS);
1359+
JERRY_ASSERT ((ecma_string_container_t) string_p->container == ECMA_STRING_CONTAINER_HEAP_CHUNKS);
13601360
const ecma_collection_header_t *collection_header_p = ECMA_GET_NON_NULL_POINTER (ecma_collection_header_t,
13611361
string_p->u.collection_cp);
13621362

@@ -1424,7 +1424,7 @@ ecma_string_get_byte_at_pos (const ecma_string_t *string_p, /**< ecma-string */
14241424
*
14251425
* @return ecma-string containing specified magic string
14261426
*/
1427-
ecma_string_t*
1427+
ecma_string_t *
14281428
ecma_get_magic_string (lit_magic_string_id_t id) /**< magic string id */
14291429
{
14301430
return ecma_new_ecma_string_from_magic_string_id (id);
@@ -1435,7 +1435,7 @@ ecma_get_magic_string (lit_magic_string_id_t id) /**< magic string id */
14351435
*
14361436
* @return ecma-string containing specified external magic string
14371437
*/
1438-
ecma_string_t*
1438+
ecma_string_t *
14391439
ecma_get_magic_string_ex (lit_magic_string_ex_id_t id) /**< external magic string id */
14401440
{
14411441
return ecma_new_ecma_string_from_magic_string_ex_id (id);

jerry-core/ecma/base/ecma-helpers.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
*
4040
* @return pointer to the object's descriptor
4141
*/
42-
ecma_object_t*
42+
ecma_object_t *
4343
ecma_create_object (ecma_object_t *prototype_object_p, /**< pointer to prototybe of the object (or NULL) */
4444
bool is_extensible, /**< value of extensible attribute */
4545
ecma_object_type_t type) /**< object type */
@@ -88,7 +88,7 @@ ecma_create_object (ecma_object_t *prototype_object_p, /**< pointer to prototybe
8888
*
8989
* @return pointer to the descriptor of lexical environment
9090
*/
91-
ecma_object_t*
91+
ecma_object_t *
9292
ecma_create_decl_lex_env (ecma_object_t *outer_lexical_environment_p) /**< outer lexical environment */
9393
{
9494
ecma_object_t *new_lexical_environment_p = ecma_alloc_object ();
@@ -138,7 +138,7 @@ ecma_create_decl_lex_env (ecma_object_t *outer_lexical_environment_p) /**< outer
138138
*
139139
* @return pointer to the descriptor of lexical environment
140140
*/
141-
ecma_object_t*
141+
ecma_object_t *
142142
ecma_create_object_lex_env (ecma_object_t *outer_lexical_environment_p, /**< outer lexical environment */
143143
ecma_object_t *binding_obj_p, /**< binding object */
144144
bool provide_this) /**< provideThis flag */
@@ -430,7 +430,7 @@ ecma_get_lex_env_binding_object (const ecma_object_t *object_p) /**< object-boun
430430
*
431431
* @return pointer to newly created property
432432
*/
433-
ecma_property_t*
433+
ecma_property_t *
434434
ecma_create_internal_property (ecma_object_t *object_p, /**< the object */
435435
ecma_internal_property_id_t property_id) /**< internal property identifier */
436436
{
@@ -459,7 +459,7 @@ ecma_create_internal_property (ecma_object_t *object_p, /**< the object */
459459
* @return pointer to the property, if it is found,
460460
* NULL - otherwise.
461461
*/
462-
ecma_property_t*
462+
ecma_property_t *
463463
ecma_find_internal_property (ecma_object_t *object_p, /**< object descriptor */
464464
ecma_internal_property_id_t property_id) /**< internal property identifier */
465465
{
@@ -492,7 +492,7 @@ ecma_find_internal_property (ecma_object_t *object_p, /**< object descriptor */
492492
*
493493
* @return pointer to the property
494494
*/
495-
ecma_property_t*
495+
ecma_property_t *
496496
ecma_get_internal_property (ecma_object_t *object_p, /**< object descriptor */
497497
ecma_internal_property_id_t property_id) /**< internal property identifier */
498498
{
@@ -509,7 +509,7 @@ ecma_get_internal_property (ecma_object_t *object_p, /**< object descriptor */
509509
*
510510
* @return pointer to newly created property
511511
*/
512-
ecma_property_t*
512+
ecma_property_t *
513513
ecma_create_named_data_property (ecma_object_t *obj_p, /**< object */
514514
ecma_string_t *name_p, /**< property name */
515515
bool is_writable, /**< 'Writable' attribute */
@@ -553,7 +553,7 @@ ecma_create_named_data_property (ecma_object_t *obj_p, /**< object */
553553
*
554554
* @return pointer to newly created property
555555
*/
556-
ecma_property_t*
556+
ecma_property_t *
557557
ecma_create_named_accessor_property (ecma_object_t *obj_p, /**< object */
558558
ecma_string_t *name_p, /**< property name */
559559
ecma_object_t *get_p, /**< getter */
@@ -606,7 +606,7 @@ ecma_create_named_accessor_property (ecma_object_t *obj_p, /**< object */
606606
* @return pointer to the property, if it is found,
607607
* NULL - otherwise.
608608
*/
609-
ecma_property_t*
609+
ecma_property_t *
610610
ecma_find_named_property (ecma_object_t *obj_p, /**< object to find property in */
611611
ecma_string_t *name_p) /**< property's name */
612612
{
@@ -663,7 +663,7 @@ ecma_find_named_property (ecma_object_t *obj_p, /**< object to find property in
663663
* @return pointer to the property, if it is found,
664664
* NULL - otherwise.
665665
*/
666-
ecma_property_t*
666+
ecma_property_t *
667667
ecma_get_named_property (ecma_object_t *obj_p, /**< object to find property in */
668668
ecma_string_t *name_p) /**< property's name */
669669
{
@@ -686,7 +686,7 @@ ecma_get_named_property (ecma_object_t *obj_p, /**< object to find property in *
686686
* @return pointer to the property, if it is found,
687687
* NULL - otherwise.
688688
*/
689-
ecma_property_t*
689+
ecma_property_t *
690690
ecma_get_named_data_property (ecma_object_t *obj_p, /**< object to find property in */
691691
ecma_string_t *name_p) /**< property's name */
692692
{
@@ -1009,7 +1009,7 @@ ecma_named_data_property_assign_value (ecma_object_t *obj_p, /**< object */
10091009
*
10101010
* @return pointer to object - getter of the property
10111011
*/
1012-
ecma_object_t*
1012+
ecma_object_t *
10131013
ecma_get_named_accessor_property_getter (const ecma_property_t *prop_p) /**< named accessor property */
10141014
{
10151015
JERRY_ASSERT (prop_p->type == ECMA_PROPERTY_NAMEDACCESSOR);
@@ -1026,7 +1026,7 @@ ecma_get_named_accessor_property_getter (const ecma_property_t *prop_p) /**< nam
10261026
*
10271027
* @return pointer to object - setter of the property
10281028
*/
1029-
ecma_object_t*
1029+
ecma_object_t *
10301030
ecma_get_named_accessor_property_setter (const ecma_property_t *prop_p) /**< named accessor property */
10311031
{
10321032
JERRY_ASSERT (prop_p->type == ECMA_PROPERTY_NAMEDACCESSOR);

jerry-core/ecma/builtin-objects/ecma-builtins.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ ecma_builtin_is (ecma_object_t *obj_p, /**< pointer to an object */
7171
*
7272
* @return pointer to the object's instance
7373
*/
74-
ecma_object_t*
74+
ecma_object_t *
7575
ecma_builtin_get (ecma_builtin_id_t builtin_id) /**< id of built-in to check on */
7676
{
7777
JERRY_ASSERT (builtin_id < ECMA_BUILTIN_ID__COUNT);
@@ -94,7 +94,7 @@ ecma_builtin_get (ecma_builtin_id_t builtin_id) /**< id of built-in to check on
9494
*
9595
* @return pointer to the object
9696
*/
97-
static ecma_object_t*
97+
static ecma_object_t *
9898
ecma_builtin_init_object (ecma_builtin_id_t obj_builtin_id, /**< built-in ID */
9999
ecma_object_t *prototype_obj_p, /**< prototype object */
100100
ecma_object_type_t obj_type, /**< object's type */
@@ -284,7 +284,7 @@ ecma_finalize_builtins (void)
284284
* @return pointer property, if one was instantiated,
285285
* NULL - otherwise.
286286
*/
287-
ecma_property_t*
287+
ecma_property_t *
288288
ecma_builtin_try_to_instantiate_property (ecma_object_t *object_p, /**< object */
289289
ecma_string_t *string_p) /**< property's name */
290290
{
@@ -461,7 +461,7 @@ ecma_builtin_list_lazy_property_names (ecma_object_t *object_p, /**< a built-in
461461
*
462462
* @return pointer to constructed Function object
463463
*/
464-
ecma_object_t*
464+
ecma_object_t *
465465
ecma_builtin_make_function_object_for_routine (ecma_builtin_id_t builtin_id, /**< identifier of built-in object
466466
that initially contains property
467467
with the routine */

jerry-core/ecma/operations/ecma-conversion.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ ecma_op_to_object (ecma_value_t value) /**< ecma value */
435435
*
436436
* @return constructed object
437437
*/
438-
ecma_object_t*
438+
ecma_object_t *
439439
ecma_op_from_property_descriptor (const ecma_property_descriptor_t *src_prop_desc_p) /**< property descriptor */
440440
{
441441
// 2.

jerry-core/ecma/operations/ecma-exceptions.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* @return pointer to ecma-object representing specified error
3636
* with reference counter set to one.
3737
*/
38-
ecma_object_t*
38+
ecma_object_t *
3939
ecma_new_standard_error (ecma_standard_error_t error_type) /**< native error type */
4040
{
4141
#ifndef CONFIG_ECMA_COMPACT_PROFILE_DISABLE_ERROR_BUILTINS
@@ -112,7 +112,7 @@ ecma_new_standard_error (ecma_standard_error_t error_type) /**< native error typ
112112
* @return pointer to ecma-object representing specified error
113113
* with reference counter set to one.
114114
*/
115-
ecma_object_t*
115+
ecma_object_t *
116116
ecma_new_standard_error_with_message (ecma_standard_error_t error_type, /**< native error type */
117117
ecma_string_t *message_string_p) /**< message string */
118118
{

jerry-core/ecma/operations/ecma-function-object.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ ecma_function_bind_merge_arg_lists (ecma_value_t *merged_args_list_p, /**< desti
133133
*
134134
* @return pointer to newly created Function object
135135
*/
136-
ecma_object_t*
136+
ecma_object_t *
137137
ecma_op_create_function_object (ecma_object_t *scope_p, /**< function's scope */
138138
bool is_decl_in_strict_mode, /**< is function declared in strict mode code? */
139139
const ecma_compiled_code_t *bytecode_data_p) /**< byte-code array */
@@ -377,7 +377,7 @@ ecma_op_function_try_lazy_instantiate_property (ecma_object_t *obj_p, /**< the f
377377
* current invocation,
378378
* NULL (i.e. ecma-undefined) - otherwise.
379379
*/
380-
ecma_property_t*
380+
ecma_property_t *
381381
ecma_op_function_object_get_own_property (ecma_object_t *obj_p, /**< the function object */
382382
ecma_string_t *property_name_p) /**< property name */
383383
{
@@ -413,7 +413,7 @@ ecma_op_function_object_get_own_property (ecma_object_t *obj_p, /**< the functio
413413
*
414414
* @return pointer to newly created external function object
415415
*/
416-
ecma_object_t*
416+
ecma_object_t *
417417
ecma_op_create_external_function_object (ecma_external_pointer_t code_p) /**< pointer to external native handler */
418418
{
419419
ecma_object_t *prototype_obj_p = ecma_builtin_get (ECMA_BUILTIN_ID_FUNCTION_PROTOTYPE);

0 commit comments

Comments
 (0)