Skip to content

Commit ff9ff8f

Browse files
authored
Update doxygen and fix documentation (#5106)
Update Doxyfile to version 1.9.1 Re-enable doxygen CI checker Fix some regular comments that should have been doc comments Document void return types for some inline functions explicitly Move start of some doxygen groups so they are included always, and not left out of certain ifdefs Ignore some doxygen warnings: Member (function) is not documented in headers Documented empty return type in headers Argument has multiple @param documentation sections JerryScript-DCO-1.0-Signed-off-by: Máté Tokodi [email protected]
1 parent bc408b1 commit ff9ff8f

31 files changed

+512
-208
lines changed

.github/workflows/gh-actions.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ jobs:
1717
python-version: '3.10'
1818
- run: sudo apt update
1919
# TODO: update checkers to current versions available in ubuntu 22.04
20-
# - run: sudo apt install doxygen clang-format-10 cppcheck python-serial
21-
- run: sudo apt install pylint
20+
# - run: sudo apt install clang-format-10 cppcheck python-serial
21+
- run: sudo apt install pylint doxygen
2222
- run: $RUNNER --check-signed-off=gh-actions
2323
if: ${{ always() }}
24-
# - run: $RUNNER --check-doxygen
25-
# if: ${{ always() }}
24+
- run: $RUNNER --check-doxygen
25+
if: ${{ always() }}
2626
# - run: $RUNNER --check-format
2727
# if: ${{ always() }}
2828
- run: $RUNNER --check-license

Doxyfile

Lines changed: 377 additions & 154 deletions
Large diffs are not rendered by default.

jerry-core/api/jerry-snapshot.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
#include "lit-char-helpers.h"
3232
#include "re-compiler.h"
3333

34+
/** \addtogroup jerrysnapshot Jerry snapshot operations
35+
* @{
36+
*/
37+
3438
#if JERRY_SNAPSHOT_SAVE || JERRY_SNAPSHOT_EXEC
3539

3640
/**
@@ -88,9 +92,6 @@ typedef struct
8892
bool class_found;
8993
} snapshot_globals_t;
9094

91-
/** \addtogroup jerrysnapshot Jerry snapshot operations
92-
* @{
93-
*/
9495

9596
/**
9697
* Write data into the specified buffer.
@@ -1045,10 +1046,6 @@ jerry_exec_snapshot (const uint32_t *snapshot_p, /**< snapshot */
10451046
#endif /* JERRY_SNAPSHOT_EXEC */
10461047
} /* jerry_exec_snapshot */
10471048

1048-
/**
1049-
* @}
1050-
*/
1051-
10521049
#if JERRY_SNAPSHOT_SAVE
10531050

10541051
/**
@@ -1716,3 +1713,7 @@ jerry_get_literals_from_snapshot (const uint32_t *snapshot_p, /**< input snapsho
17161713
return 0;
17171714
#endif /* JERRY_SNAPSHOT_SAVE */
17181715
} /* jerry_get_literals_from_snapshot */
1716+
1717+
/**
1718+
* @}
1719+
*/

jerry-core/api/jerryscript.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ 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
118120
*/
119121
static inline void JERRY_ATTR_ALWAYS_INLINE
120122
jerry_assert_api_enabled (void)
@@ -124,6 +126,8 @@ jerry_assert_api_enabled (void)
124126

125127
/**
126128
* Turn on API availability
129+
*
130+
* @return void
127131
*/
128132
static inline void JERRY_ATTR_ALWAYS_INLINE
129133
jerry_api_enable (void)
@@ -135,6 +139,8 @@ jerry_api_enable (void)
135139

136140
/**
137141
* Turn off API availability
142+
*
143+
* @return void
138144
*/
139145
static inline void JERRY_ATTR_ALWAYS_INLINE
140146
jerry_api_disable (void)

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ ecma_alloc_number (void)
6161

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

8688
/**
8789
* Dealloc memory from an ecma-object
90+
*
91+
* @return void
8892
*/
8993
extern inline void JERRY_ATTR_ALWAYS_INLINE
9094
ecma_dealloc_object (ecma_object_t *object_p) /**< object to be freed */
@@ -113,6 +117,8 @@ ecma_alloc_extended_object (size_t size) /**< size of object */
113117

114118
/**
115119
* Dealloc memory of an extended object
120+
*
121+
* @return void
116122
*/
117123
extern inline void JERRY_ATTR_ALWAYS_INLINE
118124
ecma_dealloc_extended_object (ecma_object_t *object_p, /**< extended object */
@@ -142,6 +148,8 @@ ecma_alloc_string (void)
142148

143149
/**
144150
* Dealloc memory from ecma-string descriptor
151+
*
152+
* @return void
145153
*/
146154
extern inline void JERRY_ATTR_ALWAYS_INLINE
147155
ecma_dealloc_string (ecma_string_t *string_p) /**< string to be freed */
@@ -170,6 +178,8 @@ ecma_alloc_extended_string (void)
170178

171179
/**
172180
* Dealloc memory from extended ecma-string descriptor
181+
*
182+
* @return void
173183
*/
174184
extern inline void JERRY_ATTR_ALWAYS_INLINE
175185
ecma_dealloc_extended_string (ecma_extended_string_t *ext_string_p) /**< extended string to be freed */
@@ -198,6 +208,8 @@ ecma_alloc_external_string (void)
198208

199209
/**
200210
* Dealloc memory from external ecma-string descriptor
211+
*
212+
* @return void
201213
*/
202214
extern inline void JERRY_ATTR_ALWAYS_INLINE
203215
ecma_dealloc_external_string (ecma_external_string_t *ext_string_p) /**< external string to be freed */
@@ -226,6 +238,8 @@ ecma_alloc_string_buffer (size_t size) /**< size of string */
226238

227239
/**
228240
* Dealloc memory of a string with character data
241+
*
242+
* @return void
229243
*/
230244
extern inline void JERRY_ATTR_ALWAYS_INLINE
231245
ecma_dealloc_string_buffer (ecma_string_t *string_p, /**< string with data */
@@ -255,6 +269,8 @@ ecma_alloc_property_pair (void)
255269

256270
/**
257271
* Dealloc memory of an ecma-property
272+
*
273+
* @return void
258274
*/
259275
extern inline void JERRY_ATTR_ALWAYS_INLINE
260276
ecma_dealloc_property_pair (ecma_property_pair_t *property_pair_p) /**< property pair to be freed */

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ ecma_init_gc_info (ecma_object_t *object_p) /**< object */
128128

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

154156
/**
155157
* Decrease reference counter of an object
158+
*
159+
* @return void
156160
*/
157161
extern inline void JERRY_ATTR_ALWAYS_INLINE
158162
ecma_deref_object (ecma_object_t *object_p) /**< object */
@@ -466,6 +470,8 @@ ecma_gc_mark_compiled_code (ecma_value_t script_value) /**< script value */
466470

467471
/**
468472
* Mark objects referenced by bound function object.
473+
*
474+
* @return void
469475
*/
470476
static void JERRY_ATTR_NOINLINE
471477
ecma_gc_mark_bound_function_object (ecma_object_t *object_p) /**< bound function object */

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ ecma_new_collection (void)
4949

5050
/**
5151
* Deallocate a collection of ecma values without freeing it's values
52+
*
53+
* @return void
5254
*/
5355
extern inline void JERRY_ATTR_ALWAYS_INLINE
5456
ecma_collection_destroy (ecma_collection_t *collection_p) /**< value collection */

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ typedef struct
7878

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

9193
/**
9294
* Multiply the high-precision number by ten.
95+
*
96+
* @return void
9397
*/
9498
static inline void JERRY_ATTR_ALWAYS_INLINE
9599
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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,8 @@ 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
852854
*/
853855
extern inline void JERRY_ATTR_ALWAYS_INLINE
854856
ecma_ref_ecma_string_non_direct (ecma_string_t *string_p) /**< string descriptor */
@@ -895,6 +897,8 @@ ecma_ref_ecma_string (ecma_string_t *string_p) /**< string descriptor */
895897
/**
896898
* Decrease reference counter and deallocate a non-direct ecma-string
897899
* if the counter becomes zero.
900+
*
901+
* @return void
898902
*/
899903
extern inline void JERRY_ATTR_ALWAYS_INLINE
900904
ecma_deref_ecma_string_non_direct (ecma_string_t *string_p) /**< ecma-string */
@@ -1168,6 +1172,8 @@ ecma_string_copy_to_buffer (const ecma_string_t *string_p, /**< ecma-string desc
11681172
* Convert ecma-string's contents to a cesu-8 string and put it to the buffer.
11691173
* It is the caller's responsibility to make sure that the string fits in the buffer.
11701174
* Check if the size of the string is equal with the size of the buffer.
1175+
*
1176+
* @return void
11711177
*/
11721178
extern inline void JERRY_ATTR_ALWAYS_INLINE
11731179
ecma_string_to_cesu8_bytes (const ecma_string_t *string_desc_p, /**< ecma-string descriptor */
@@ -2292,6 +2298,8 @@ ecma_string_trim_back (const lit_utf8_byte_t *start_p, /**< current string's sta
22922298
* Used by:
22932299
* - ecma_string_trim
22942300
* - ecma_utf8_string_to_number
2301+
*
2302+
* @return void
22952303
*/
22962304
extern inline void JERRY_ATTR_ALWAYS_INLINE
22972305
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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,8 @@ 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
942944
*/
943945
extern inline void JERRY_ATTR_ALWAYS_INLINE
944946
ecma_ref_if_object (ecma_value_t value) /**< value description */
@@ -951,6 +953,8 @@ ecma_ref_if_object (ecma_value_t value) /**< value description */
951953

952954
/**
953955
* Decrease reference counter of a value if it is an object.
956+
*
957+
* @return void
954958
*/
955959
extern inline void JERRY_ATTR_ALWAYS_INLINE
956960
ecma_deref_if_object (ecma_value_t value) /**< value description */
@@ -1136,6 +1140,8 @@ ecma_free_value (ecma_value_t value) /**< value description */
11361140
* faster for direct values since no function call is performed.
11371141
* It also increases the binary size so it is recommended for
11381142
* critical code paths only.
1143+
*
1144+
* @return void
11391145
*/
11401146
extern inline void JERRY_ATTR_ALWAYS_INLINE
11411147
ecma_fast_free_value (ecma_value_t value) /**< value description */
@@ -1160,6 +1166,8 @@ ecma_free_value_if_not_object (ecma_value_t value) /**< value description */
11601166

11611167
/**
11621168
* Free an ecma-value object
1169+
*
1170+
* @return void
11631171
*/
11641172
extern inline void JERRY_ATTR_ALWAYS_INLINE
11651173
ecma_free_object (ecma_value_t value) /**< value description */
@@ -1169,6 +1177,8 @@ ecma_free_object (ecma_value_t value) /**< value description */
11691177

11701178
/**
11711179
* Free an ecma-value number
1180+
*
1181+
* @return void
11721182
*/
11731183
extern inline void JERRY_ATTR_ALWAYS_INLINE
11741184
ecma_free_number (ecma_value_t value) /**< value description */

0 commit comments

Comments
 (0)