Skip to content

Commit 5480cc3

Browse files
authored
Doxygen comment update and PREDEFINED in Doxyfile is properly defined (#5186)
JerryScript-DCO-1.0-Signed-off-by: Yonggang Luo luoyonggang@gmail.com
1 parent 718a439 commit 5480cc3

19 files changed

+17
-87
lines changed

Doxyfile

+8-1
Original file line numberDiff line numberDiff line change
@@ -2216,7 +2216,14 @@ INCLUDE_FILE_PATTERNS =
22162216
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
22172217

22182218
PREDEFINED = "JERRY_STATIC_ASSERT(x,y)=" \
2219-
"JERRY_ATTR_FORMAT(x,y,z)="
2219+
"JERRY_ATTR_FORMAT(x,y,z)=" \
2220+
"JERRY_ATTR_ALWAYS_INLINE=" \
2221+
"JERRY_ATTR_NOINLINE=" \
2222+
"JERRY_ATTR_PURE=" \
2223+
"JERRY_ATTR_CONST=" \
2224+
"JERRY_ATTR_HOT=" \
2225+
"JERRY_ATTR_NORETURN=" \
2226+
"JERRY_ATTR_WEAK="
22202227

22212228
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
22222229
# tag can be used to specify a list of macro names that should be expanded. The

jerry-core/api/jerryscript.c

-6
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,6 @@ JERRY_STATIC_ASSERT (((NUMBER_ARITHMETIC_SUBTRACTION + ECMA_NUMBER_ARITHMETIC_OP
115115
* The API could not be invoked in the following cases:
116116
* - before jerry_init and after jerry_cleanup
117117
* - between enter to and return from a native free callback
118-
*
119-
* @return void
120118
*/
121119
static inline void JERRY_ATTR_ALWAYS_INLINE
122120
jerry_assert_api_enabled (void)
@@ -126,8 +124,6 @@ jerry_assert_api_enabled (void)
126124

127125
/**
128126
* Turn on API availability
129-
*
130-
* @return void
131127
*/
132128
static inline void JERRY_ATTR_ALWAYS_INLINE
133129
jerry_api_enable (void)
@@ -139,8 +135,6 @@ jerry_api_enable (void)
139135

140136
/**
141137
* Turn off API availability
142-
*
143-
* @return void
144138
*/
145139
static inline void JERRY_ATTR_ALWAYS_INLINE
146140
jerry_api_disable (void)

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

-16
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ ecma_alloc_number (void)
6161

6262
/**
6363
* Dealloc memory from an ecma-number
64-
*
65-
* @return void
6664
*/
6765
extern inline void JERRY_ATTR_ALWAYS_INLINE
6866
ecma_dealloc_number (ecma_number_t *number_p) /**< number to be freed */
@@ -87,8 +85,6 @@ ecma_alloc_object (void)
8785

8886
/**
8987
* Dealloc memory from an ecma-object
90-
*
91-
* @return void
9288
*/
9389
extern inline void JERRY_ATTR_ALWAYS_INLINE
9490
ecma_dealloc_object (ecma_object_t *object_p) /**< object to be freed */
@@ -117,8 +113,6 @@ ecma_alloc_extended_object (size_t size) /**< size of object */
117113

118114
/**
119115
* Dealloc memory of an extended object
120-
*
121-
* @return void
122116
*/
123117
extern inline void JERRY_ATTR_ALWAYS_INLINE
124118
ecma_dealloc_extended_object (ecma_object_t *object_p, /**< extended object */
@@ -148,8 +142,6 @@ ecma_alloc_string (void)
148142

149143
/**
150144
* Dealloc memory from ecma-string descriptor
151-
*
152-
* @return void
153145
*/
154146
extern inline void JERRY_ATTR_ALWAYS_INLINE
155147
ecma_dealloc_string (ecma_string_t *string_p) /**< string to be freed */
@@ -178,8 +170,6 @@ ecma_alloc_extended_string (void)
178170

179171
/**
180172
* Dealloc memory from extended ecma-string descriptor
181-
*
182-
* @return void
183173
*/
184174
extern inline void JERRY_ATTR_ALWAYS_INLINE
185175
ecma_dealloc_extended_string (ecma_extended_string_t *ext_string_p) /**< extended string to be freed */
@@ -208,8 +198,6 @@ ecma_alloc_external_string (void)
208198

209199
/**
210200
* Dealloc memory from external ecma-string descriptor
211-
*
212-
* @return void
213201
*/
214202
extern inline void JERRY_ATTR_ALWAYS_INLINE
215203
ecma_dealloc_external_string (ecma_external_string_t *ext_string_p) /**< external string to be freed */
@@ -238,8 +226,6 @@ ecma_alloc_string_buffer (size_t size) /**< size of string */
238226

239227
/**
240228
* Dealloc memory of a string with character data
241-
*
242-
* @return void
243229
*/
244230
extern inline void JERRY_ATTR_ALWAYS_INLINE
245231
ecma_dealloc_string_buffer (ecma_string_t *string_p, /**< string with data */
@@ -269,8 +255,6 @@ ecma_alloc_property_pair (void)
269255

270256
/**
271257
* Dealloc memory of an ecma-property
272-
*
273-
* @return void
274258
*/
275259
extern inline void JERRY_ATTR_ALWAYS_INLINE
276260
ecma_dealloc_property_pair (ecma_property_pair_t *property_pair_p) /**< property pair to be freed */

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

-6
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ ecma_init_gc_info (ecma_object_t *object_p) /**< object */
128128

129129
/**
130130
* Increase reference counter of an object
131-
*
132-
* @return void
133131
*/
134132
extern inline void JERRY_ATTR_ALWAYS_INLINE
135133
ecma_ref_object_inline (ecma_object_t *object_p) /**< object */
@@ -155,8 +153,6 @@ ecma_ref_object (ecma_object_t *object_p) /**< object */
155153

156154
/**
157155
* Decrease reference counter of an object
158-
*
159-
* @return void
160156
*/
161157
extern inline void JERRY_ATTR_ALWAYS_INLINE
162158
ecma_deref_object (ecma_object_t *object_p) /**< object */
@@ -470,8 +466,6 @@ ecma_gc_mark_compiled_code (ecma_value_t script_value) /**< script value */
470466

471467
/**
472468
* Mark objects referenced by bound function object.
473-
*
474-
* @return void
475469
*/
476470
static void JERRY_ATTR_NOINLINE
477471
ecma_gc_mark_bound_function_object (ecma_object_t *object_p) /**< bound function object */

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

-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ ecma_new_collection (void)
4949

5050
/**
5151
* Deallocate a collection of ecma values without freeing it's values
52-
*
53-
* @return void
5452
*/
5553
extern inline void JERRY_ATTR_ALWAYS_INLINE
5654
ecma_collection_destroy (ecma_collection_t *collection_p) /**< value collection */

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

+9-6
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ typedef struct
5252
* @return rounded high to uint64_t
5353
*/
5454
static uint64_t
55-
ecma_round_high_to_uint64 (ecma_uint128_t *num_p)
55+
ecma_round_high_to_uint64 (ecma_uint128_t *num_p) /**< 128-bit unsigned integer */
5656
{
5757
uint64_t masked_lo = num_p->lo & ~(1ULL << 63u);
5858
uint64_t masked_hi = num_p->hi & 0x1;
@@ -69,7 +69,8 @@ ecma_round_high_to_uint64 (ecma_uint128_t *num_p)
6969
* Left shift 128-bit integer by max 63 bits.
7070
*/
7171
static void JERRY_ATTR_ALWAYS_INLINE
72-
ecma_uint128_shift_left (ecma_uint128_t *num_p, int32_t shift)
72+
ecma_uint128_shift_left (ecma_uint128_t *num_p, /**< 128-bit unsigned integer */
73+
int32_t shift) /**< left shift count */
7374
{
7475
num_p->hi = (num_p->hi << shift) | (num_p->lo >> (64 - shift));
7576
num_p->lo <<= shift;
@@ -79,7 +80,8 @@ ecma_uint128_shift_left (ecma_uint128_t *num_p, int32_t shift)
7980
* Right shift 128-bit integer by max 63 bits.
8081
*/
8182
static void JERRY_ATTR_ALWAYS_INLINE
82-
ecma_uint128_shift_right (ecma_uint128_t *num_p, int32_t shift)
83+
ecma_uint128_shift_right (ecma_uint128_t *num_p, /**< 128-bit unsigned integer */
84+
int32_t shift) /**< right shift count */
8385
{
8486
num_p->lo = (num_p->lo >> shift) | (num_p->hi << (64 - shift));
8587
num_p->hi >>= shift;
@@ -89,7 +91,8 @@ ecma_uint128_shift_right (ecma_uint128_t *num_p, int32_t shift)
8991
* Add two 128-bit integer values and assign the result to the left one.
9092
*/
9193
static void
92-
ecma_uint128_add (ecma_uint128_t *left_p, ecma_uint128_t *right_p)
94+
ecma_uint128_add (ecma_uint128_t *left_p, /**< left 128-bit unsigned integer */
95+
ecma_uint128_t *right_p) /**< right 128-bit unsigned integer */
9396
{
9497
left_p->hi += right_p->hi;
9598
left_p->lo += right_p->lo;
@@ -104,7 +107,7 @@ ecma_uint128_add (ecma_uint128_t *left_p, ecma_uint128_t *right_p)
104107
* Multiply 128-bit integer by 10
105108
*/
106109
static void
107-
ecma_uint128_mul10 (ecma_uint128_t *num_p)
110+
ecma_uint128_mul10 (ecma_uint128_t *num_p) /**< 128-bit unsigned integer */
108111
{
109112
ecma_uint128_shift_left (num_p, 1u);
110113

@@ -130,7 +133,7 @@ ecma_uint128_mul10 (ecma_uint128_t *num_p)
130133
* Q = Q3 *2^96 + Q2 *2^64 + Q1 *2^32 + Q0 *2^0 // 128-bit quotient
131134
*/
132135
static void
133-
ecma_uint128_div10 (ecma_uint128_t *num_p)
136+
ecma_uint128_div10 (ecma_uint128_t *num_p) /**< 128-bit unsigned integer */
134137
{
135138
/* estimation of reciprocal of 10, 128 bits right of the binary point (T1 == T2) */
136139
const uint64_t tenth_l = 0x9999999aul;

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

-4
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ typedef struct
7878

7979
/**
8080
* Normalize the number by factoring in the error.
81-
*
82-
* @return void
8381
*/
8482
static inline void JERRY_ATTR_ALWAYS_INLINE
8583
ecma_normalize_high_prec_data (ecma_high_prec_t *hp_data_p) /**< [in, out] float pair */
@@ -92,8 +90,6 @@ ecma_normalize_high_prec_data (ecma_high_prec_t *hp_data_p) /**< [in, out] float
9290

9391
/**
9492
* Multiply the high-precision number by ten.
95-
*
96-
* @return void
9793
*/
9894
static inline void JERRY_ATTR_ALWAYS_INLINE
9995
ecma_multiply_high_prec_by_10 (ecma_high_prec_t *hp_data_p) /**< [in, out] high-precision number */

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

-8
Original file line numberDiff line numberDiff line change
@@ -849,8 +849,6 @@ ecma_concat_ecma_strings (ecma_string_t *string1_p, /**< first ecma-string */
849849

850850
/**
851851
* Increase reference counter of non-direct ecma-string.
852-
*
853-
* @return void
854852
*/
855853
extern inline void JERRY_ATTR_ALWAYS_INLINE
856854
ecma_ref_ecma_string_non_direct (ecma_string_t *string_p) /**< string descriptor */
@@ -897,8 +895,6 @@ ecma_ref_ecma_string (ecma_string_t *string_p) /**< string descriptor */
897895
/**
898896
* Decrease reference counter and deallocate a non-direct ecma-string
899897
* if the counter becomes zero.
900-
*
901-
* @return void
902898
*/
903899
extern inline void JERRY_ATTR_ALWAYS_INLINE
904900
ecma_deref_ecma_string_non_direct (ecma_string_t *string_p) /**< ecma-string */
@@ -1172,8 +1168,6 @@ ecma_string_copy_to_buffer (const ecma_string_t *string_p, /**< ecma-string desc
11721168
* Convert ecma-string's contents to a cesu-8 string and put it to the buffer.
11731169
* It is the caller's responsibility to make sure that the string fits in the buffer.
11741170
* Check if the size of the string is equal with the size of the buffer.
1175-
*
1176-
* @return void
11771171
*/
11781172
extern inline void JERRY_ATTR_ALWAYS_INLINE
11791173
ecma_string_to_cesu8_bytes (const ecma_string_t *string_desc_p, /**< ecma-string descriptor */
@@ -2298,8 +2292,6 @@ ecma_string_trim_back (const lit_utf8_byte_t *start_p, /**< current string's sta
22982292
* Used by:
22992293
* - ecma_string_trim
23002294
* - ecma_utf8_string_to_number
2301-
*
2302-
* @return void
23032295
*/
23042296
extern inline void JERRY_ATTR_ALWAYS_INLINE
23052297
ecma_string_trim_helper (const lit_utf8_byte_t **utf8_str_p, /**< [in, out] current string position */

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

-10
Original file line numberDiff line numberDiff line change
@@ -939,8 +939,6 @@ ecma_copy_value_if_not_object (ecma_value_t value) /**< value description */
939939

940940
/**
941941
* Increase reference counter of a value if it is an object.
942-
*
943-
* @return void
944942
*/
945943
extern inline void JERRY_ATTR_ALWAYS_INLINE
946944
ecma_ref_if_object (ecma_value_t value) /**< value description */
@@ -953,8 +951,6 @@ ecma_ref_if_object (ecma_value_t value) /**< value description */
953951

954952
/**
955953
* Decrease reference counter of a value if it is an object.
956-
*
957-
* @return void
958954
*/
959955
extern inline void JERRY_ATTR_ALWAYS_INLINE
960956
ecma_deref_if_object (ecma_value_t value) /**< value description */
@@ -1140,8 +1136,6 @@ ecma_free_value (ecma_value_t value) /**< value description */
11401136
* faster for direct values since no function call is performed.
11411137
* It also increases the binary size so it is recommended for
11421138
* critical code paths only.
1143-
*
1144-
* @return void
11451139
*/
11461140
extern inline void JERRY_ATTR_ALWAYS_INLINE
11471141
ecma_fast_free_value (ecma_value_t value) /**< value description */
@@ -1166,8 +1160,6 @@ ecma_free_value_if_not_object (ecma_value_t value) /**< value description */
11661160

11671161
/**
11681162
* Free an ecma-value object
1169-
*
1170-
* @return void
11711163
*/
11721164
extern inline void JERRY_ATTR_ALWAYS_INLINE
11731165
ecma_free_object (ecma_value_t value) /**< value description */
@@ -1177,8 +1169,6 @@ ecma_free_object (ecma_value_t value) /**< value description */
11771169

11781170
/**
11791171
* Free an ecma-value number
1180-
*
1181-
* @return void
11821172
*/
11831173
extern inline void JERRY_ATTR_ALWAYS_INLINE
11841174
ecma_free_number (ecma_value_t value) /**< value description */

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

-2
Original file line numberDiff line numberDiff line change
@@ -917,8 +917,6 @@ ecma_assert_object_contains_the_property (const ecma_object_t *object_p, /**< ec
917917
*
918918
* Note:
919919
* value previously stored in the property is freed
920-
*
921-
* @return void
922920
*/
923921
extern inline void JERRY_ATTR_ALWAYS_INLINE
924922
ecma_named_data_property_assign_value (ecma_object_t *obj_p, /**< object */

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

-2
Original file line numberDiff line numberDiff line change
@@ -3258,8 +3258,6 @@ ecma_op_ordinary_object_is_extensible (ecma_object_t *object_p) /**< object */
32583258

32593259
/**
32603260
* Set value of [[Extensible]] object's internal property.
3261-
*
3262-
* @return void
32633261
*/
32643262
void JERRY_ATTR_NOINLINE
32653263
ecma_op_ordinary_object_prevent_extensions (ecma_object_t *object_p) /**< object */

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

-4
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ ecma_promise_get_result (ecma_object_t *obj_p) /**< points to promise object */
6868

6969
/**
7070
* Set the PromiseResult of promise.
71-
*
72-
* @return void
7371
*/
7472
static inline void JERRY_ATTR_ALWAYS_INLINE
7573
ecma_promise_set_result (ecma_object_t *obj_p, /**< points to promise object */
@@ -99,8 +97,6 @@ ecma_promise_get_flags (ecma_object_t *obj_p) /**< points to promise object */
9997

10098
/**
10199
* Set the PromiseState of promise.
102-
*
103-
* @return void
104100
*/
105101
static inline void JERRY_ATTR_ALWAYS_INLINE
106102
ecma_promise_set_state (ecma_object_t *obj_p, /**< points to promise object */

jerry-core/include/jerryscript-port.h

-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ void jerry_port_init (void);
6161
* A libc-based port may implement this with exit() or abort(), or both.
6262
*
6363
* @param code: the cause of the error.
64-
* @return This function is expected to not return.
6564
*/
6665
void JERRY_ATTR_NORETURN jerry_port_fatal (jerry_fatal_code_t code);
6766

jerry-core/jcontext/jcontext.c

-6
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ jcontext_has_pending_abort (void)
4545

4646
/**
4747
* Set the abort flag for the context.
48-
*
49-
* @return void
5048
*/
5149
extern inline void JERRY_ATTR_ALWAYS_INLINE
5250
jcontext_set_abort_flag (bool is_abort) /**< true - if the abort flag should be set
@@ -66,8 +64,6 @@ jcontext_set_abort_flag (bool is_abort) /**< true - if the abort flag should be
6664

6765
/**
6866
* Set the exception flag for the context.
69-
*
70-
* @return void
7167
*/
7268
extern inline void JERRY_ATTR_ALWAYS_INLINE
7369
jcontext_set_exception_flag (bool is_exception) /**< true - if the exception flag should be set
@@ -85,8 +81,6 @@ jcontext_set_exception_flag (bool is_exception) /**< true - if the exception fla
8581

8682
/**
8783
* Raise exception from the given error value.
88-
*
89-
* @return void
9084
*/
9185
extern inline void JERRY_ATTR_ALWAYS_INLINE
9286
jcontext_raise_exception (ecma_value_t error) /**< error to raise */

jerry-core/jmem/jmem-heap.c

-4
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,6 @@ jmem_heap_insert_block (jmem_heap_free_t *block_p, /**< block to insert */
459459

460460
/**
461461
* Internal method for freeing a memory block.
462-
*
463-
* @return void
464462
*/
465463
void JERRY_ATTR_HOT
466464
jmem_heap_free_block_internal (void *ptr, /**< pointer to beginning of data space of the block */
@@ -695,8 +693,6 @@ jmem_heap_realloc_block (void *ptr, /**< memory region to reallocate */
695693

696694
/**
697695
* Free memory block
698-
*
699-
* @return void
700696
*/
701697
extern inline void JERRY_ATTR_HOT JERRY_ATTR_ALWAYS_INLINE
702698
jmem_heap_free_block (void *ptr, /**< pointer to beginning of data space of the block */

0 commit comments

Comments
 (0)