Skip to content

Commit 64b16bf

Browse files
LaszloLangoyichoi
authored andcommitted
Update Doxygen config file and fix Doxygen warnings (#2324)
A lot of warnings remained hibben because 'EXTRACT_ALL' was previously set to YES. JerryScript-DCO-1.0-Signed-off-by: László Langó [email protected]
1 parent fb6259b commit 64b16bf

28 files changed

+315
-88
lines changed

Doxyfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ IDL_PROPERTY_SUPPORT = YES
341341
# all members of a group must be documented explicitly.
342342
# The default value is: NO.
343343

344-
DISTRIBUTE_GROUP_DOC = NO
344+
DISTRIBUTE_GROUP_DOC = YES
345345

346346
# Set the SUBGROUPING tag to YES to allow class member groups of the same type
347347
# (for instance a group of public functions) to be put as a subgroup of that
@@ -409,7 +409,7 @@ LOOKUP_CACHE_SIZE = 0
409409
# normally produced when WARNINGS is set to YES.
410410
# The default value is: NO.
411411

412-
EXTRACT_ALL = YES
412+
EXTRACT_ALL = NO
413413

414414
# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
415415
# be included in the documentation.
@@ -1960,15 +1960,15 @@ ENABLE_PREPROCESSING = YES
19601960
# The default value is: NO.
19611961
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
19621962

1963-
MACRO_EXPANSION = NO
1963+
MACRO_EXPANSION = YES
19641964

19651965
# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
19661966
# the macro expansion is limited to the macros specified with the PREDEFINED and
19671967
# EXPAND_AS_DEFINED tags.
19681968
# The default value is: NO.
19691969
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
19701970

1971-
EXPAND_ONLY_PREDEF = NO
1971+
EXPAND_ONLY_PREDEF = YES
19721972

19731973
# If the SEARCH_INCLUDES tag is set to YES, the include files in the
19741974
# INCLUDE_PATH will be searched if a #include is found.
@@ -2000,7 +2000,7 @@ INCLUDE_FILE_PATTERNS =
20002000
# recursively expanded use the := operator instead of the = operator.
20012001
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
20022002

2003-
PREDEFINED =
2003+
PREDEFINED = JERRY_STATIC_ASSERT(x,y)=
20042004

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

jerry-core/api/jerry.c

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,8 @@ jerry_value_get_type (const jerry_value_t value) /**< input value to check */
869869
* @return true - if the specified feature is enabled,
870870
* false - otherwise
871871
*/
872-
bool jerry_is_feature_enabled (const jerry_feature_t feature)
872+
bool
873+
jerry_is_feature_enabled (const jerry_feature_t feature) /**< feature to check */
873874
{
874875
JERRY_ASSERT (feature < JERRY_FEATURE__COUNT);
875876

@@ -929,7 +930,7 @@ bool jerry_is_feature_enabled (const jerry_feature_t feature)
929930
* Clear the error flag
930931
*/
931932
void
932-
jerry_value_clear_error_flag (jerry_value_t *value_p)
933+
jerry_value_clear_error_flag (jerry_value_t *value_p) /**< api value */
933934
{
934935
jerry_assert_api_available ();
935936

@@ -943,7 +944,7 @@ jerry_value_clear_error_flag (jerry_value_t *value_p)
943944
* Set the error flag if the value is not an error reference.
944945
*/
945946
void
946-
jerry_value_set_error_flag (jerry_value_t *value_p)
947+
jerry_value_set_error_flag (jerry_value_t *value_p) /**< api value */
947948
{
948949
jerry_assert_api_available ();
949950

@@ -966,7 +967,7 @@ jerry_value_set_error_flag (jerry_value_t *value_p)
966967
* Set both the abort and error flags if the value is not an error reference.
967968
*/
968969
void
969-
jerry_value_set_abort_flag (jerry_value_t *value_p)
970+
jerry_value_set_abort_flag (jerry_value_t *value_p) /**< api value */
970971
{
971972
jerry_assert_api_available ();
972973

@@ -1505,7 +1506,7 @@ jerry_create_string_sz (const jerry_char_t *str_p, /**< pointer to string */
15051506
* @return length of the given array
15061507
*/
15071508
uint32_t
1508-
jerry_get_array_length (const jerry_value_t value)
1509+
jerry_get_array_length (const jerry_value_t value) /**< api value */
15091510
{
15101511
jerry_assert_api_available ();
15111512

@@ -1557,7 +1558,7 @@ jerry_get_string_size (const jerry_value_t value) /**< input string */
15571558
* @return number of bytes in the buffer needed to represent the UTF-8 encoded string
15581559
*/
15591560
jerry_size_t
1560-
jerry_get_utf8_string_size (const jerry_value_t value)
1561+
jerry_get_utf8_string_size (const jerry_value_t value) /**< input string */
15611562
{
15621563
jerry_assert_api_available ();
15631564

@@ -2494,8 +2495,9 @@ jerry_set_object_native_handle (const jerry_value_t obj_val, /**< object to set
24942495
* @return true - traversal was interrupted by the callback.
24952496
* false - otherwise - traversal visited all objects.
24962497
*/
2497-
bool jerry_objects_foreach (jerry_objects_foreach_t foreach_p,
2498-
void *user_data_p)
2498+
bool
2499+
jerry_objects_foreach (jerry_objects_foreach_t foreach_p, /**< function pointer of the iterator function */
2500+
void *user_data_p) /**< pointer to user data */
24992501
{
25002502
jerry_assert_api_available ();
25012503

@@ -2522,9 +2524,11 @@ bool jerry_objects_foreach (jerry_objects_foreach_t foreach_p,
25222524
* false - otherwise - traversal visited all objects.
25232525
*/
25242526
bool
2525-
jerry_objects_foreach_by_native_info (const jerry_object_native_info_t *native_info_p,
2526-
jerry_objects_foreach_by_native_info_t foreach_p,
2527-
void *user_data_p)
2527+
jerry_objects_foreach_by_native_info (const jerry_object_native_info_t *native_info_p, /**< the type info
2528+
* of the native pointer */
2529+
jerry_objects_foreach_by_native_info_t foreach_p, /**< function to apply for
2530+
* each matching object */
2531+
void *user_data_p) /**< pointer to user data */
25282532
{
25292533
jerry_assert_api_available ();
25302534

@@ -2757,7 +2761,7 @@ jerry_is_valid_cesu8_string (const jerry_char_t *cesu8_buf_p, /**< CESU-8 string
27572761
(lit_utf8_size_t) buf_size);
27582762
} /* jerry_is_valid_cesu8_string */
27592763

2760-
/*
2764+
/**
27612765
* Create a jerry instance for external context.
27622766
*
27632767
* @return the pointer to the instance.
@@ -2866,7 +2870,7 @@ jerry_set_vm_exec_stop_callback (jerry_vm_exec_stop_callback_t stop_cb, /**< per
28662870
* @return array value
28672871
*/
28682872
jerry_value_t
2869-
jerry_get_backtrace (uint32_t max_depth)
2873+
jerry_get_backtrace (uint32_t max_depth) /**< depth limit of the backtrace */
28702874
{
28712875
return vm_get_backtrace (max_depth);
28722876
} /* jerry_get_backtrace */
@@ -3143,14 +3147,20 @@ jerry_value_is_typedarray (jerry_value_t value) /**< value to check if it is a T
31433147
} /* jerry_value_is_typedarray */
31443148

31453149
#ifndef CONFIG_DISABLE_ES2015_TYPEDARRAY_BUILTIN
3150+
/**
3151+
* TypedArray mapping type
3152+
*/
31463153
typedef struct
31473154
{
3148-
jerry_typedarray_type_t api_type;
3149-
ecma_builtin_id_t prototype_id;
3150-
lit_magic_string_id_t lit_id;
3151-
uint8_t element_size_shift;
3155+
jerry_typedarray_type_t api_type; /**< api type */
3156+
ecma_builtin_id_t prototype_id; /**< prototype ID */
3157+
lit_magic_string_id_t lit_id; /**< literal ID */
3158+
uint8_t element_size_shift; /**< element size shift */
31523159
} jerry_typedarray_mapping_t;
31533160

3161+
/**
3162+
* List of TypedArray mappings
3163+
*/
31543164
static jerry_typedarray_mapping_t jerry_typedarray_mappings[] =
31553165
{
31563166
#define TYPEDARRAY_ENTRY(NAME, LIT_NAME, SIZE_SHIFT) \

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@
5555

5656
/**
5757
* Get next object in list of objects with same generation.
58+
*
59+
* @return pointer to the next ecma-object
60+
* NULL - if there is no next ecma-object
5861
*/
5962
static inline ecma_object_t *
6063
ecma_gc_get_object_next (ecma_object_t *object_p) /**< object */
@@ -78,6 +81,9 @@ ecma_gc_set_object_next (ecma_object_t *object_p, /**< object */
7881

7982
/**
8083
* Get visited flag of the object.
84+
*
85+
* @return true - if visited
86+
* false - otherwise
8187
*/
8288
static inline bool
8389
ecma_gc_is_object_visited (ecma_object_t *object_p) /**< object */

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

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -322,20 +322,29 @@
322322
ECMA_NUMBER_CONVERSION_128BIT_INTEGER_CHECK_PARTS_ARE_32BIT (name); \
323323
}
324324

325+
/**
326+
* Value of epsilon
327+
*/
325328
#define EPSILON 0.0000001
326329

327330
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64
328331
/**
329-
* Number.MAX_VALUE and Number.MIN_VALUE exponent parts while using 64 bit float representation
332+
* Number.MAX_VALUE exponent part when using 64 bit float representation.
330333
*/
331-
# define NUMBER_MAX_DECIMAL_EXPONENT 308
332-
# define NUMBER_MIN_DECIMAL_EXPONENT -324
334+
#define NUMBER_MAX_DECIMAL_EXPONENT 308
335+
/**
336+
* Number.MIN_VALUE exponent part when using 64 bit float representation.
337+
*/
338+
#define NUMBER_MIN_DECIMAL_EXPONENT -324
333339
#elif CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32
334340
/**
335-
* Number.MAX_VALUE and Number.MIN_VALUE exponent parts while using 32 bit float representation
341+
* Number.MAX_VALUE exponent part when using 32 bit float representation.
336342
*/
337-
# define NUMBER_MAX_DECIMAL_EXPONENT 38
338-
# define NUMBER_MIN_DECIMAL_EXPONENT -45
343+
#define NUMBER_MAX_DECIMAL_EXPONENT 38
344+
/**
345+
* Number.MIN_VALUE exponent part when using 32 bit float representation.
346+
*/
347+
#define NUMBER_MIN_DECIMAL_EXPONENT -45
339348
#endif /* CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64 */
340349

341350
/**
@@ -934,13 +943,15 @@ ecma_number_to_int32 (ecma_number_t num) /**< ecma-number */
934943
} /* ecma_number_to_int32 */
935944

936945
/**
937-
* Perform conversion of ecma-number to decimal representation with decimal exponent
946+
* Perform conversion of ecma-number to decimal representation with decimal exponent.
938947
*
939948
* Note:
940949
* The calculated values correspond to s, n, k parameters in ECMA-262 v5, 9.8.1, item 5:
941950
* - parameter out_digits_p corresponds to s, the digits of the number;
942951
* - parameter out_decimal_exp_p corresponds to n, the decimal exponent;
943952
* - return value corresponds to k, the number of digits.
953+
*
954+
* @return the number of digits
944955
*/
945956
lit_utf8_size_t
946957
ecma_number_to_decimal (ecma_number_t num, /**< ecma-number */
@@ -1068,14 +1079,16 @@ ecma_double_to_binary_floating_point (double val, /**< ecma number */
10681079
} /* ecma_double_to_binary_floating_point */
10691080

10701081
/**
1071-
* Perform conversion of ecma-number to equivalent binary floating-point number representation with decimal exponent
1072-
*
1073-
* Note:
1074-
* The calculated values correspond to s, n, k parameters in ECMA-262 v5, 9.8.1, item 5:
1075-
* - parameter out_digits_p corresponds to s, the digits of the number;
1076-
* - parameter out_decimal_exp_p corresponds to n, the decimal exponent;
1077-
* - return value corresponds to k, the number of digits.
1078-
*/
1082+
* Perform conversion of ecma-number to equivalent binary floating-point number representation with decimal exponent.
1083+
*
1084+
* Note:
1085+
* The calculated values correspond to s, n, k parameters in ECMA-262 v5, 9.8.1, item 5:
1086+
* - parameter out_digits_p corresponds to s, the digits of the number;
1087+
* - parameter out_decimal_exp_p corresponds to n, the decimal exponent;
1088+
* - return value corresponds to k, the number of digits.
1089+
*
1090+
* @return the number of digits
1091+
*/
10791092
lit_utf8_size_t
10801093
ecma_number_to_binary_floating_point_number (ecma_number_t num, /**< ecma-number */
10811094
lit_utf8_byte_t *out_digits_p, /**< [out] buffer to fill with digits */

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,17 @@
5454
*/
5555

5656
/**
57-
* Floating point format definitions
57+
* Floating point format definitions (next float value)
5858
*/
5959
#define ECMA_NEXT_FLOAT(value) (nextafter ((value), INFINITY))
60+
/**
61+
* Floating point format definitions (previous float value)
62+
*/
6063
#define ECMA_PREV_FLOAT(value) (nextafter ((value), -INFINITY))
6164

65+
/**
66+
* Value of epsilon
67+
*/
6268
#define ERROL0_EPSILON 0.0000001
6369

6470
/**

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ JERRY_STATIC_ASSERT (ECMA_DIRECT_SHIFT == ECMA_VALUE_SHIFT + 1,
3131

3232
JERRY_STATIC_ASSERT (((1 << (ECMA_DIRECT_SHIFT - 1)) | ECMA_TYPE_DIRECT) == ECMA_DIRECT_TYPE_SIMPLE_VALUE,
3333
currently_directly_encoded_values_start_after_direct_type_simple_value);
34-
34+
/**
35+
* Position of the sign bit in ecma-numbers
36+
*/
3537
#define ECMA_NUMBER_SIGN_POS (ECMA_NUMBER_FRACTION_WIDTH + \
3638
ECMA_NUMBER_BIASED_EXP_WIDTH)
3739

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

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ ecma_new_ecma_string_from_uint32 (uint32_t uint32_number) /**< uint32 value of t
410410
* @return pointer to ecma-string descriptor
411411
*/
412412
ecma_string_t *
413-
ecma_get_ecma_string_from_uint32 (uint32_t uint32_number)
413+
ecma_get_ecma_string_from_uint32 (uint32_t uint32_number) /**< input number */
414414
{
415415
JERRY_ASSERT (uint32_number <= ECMA_DIRECT_STRING_MAX_IMM);
416416

@@ -839,8 +839,8 @@ ecma_concat_ecma_strings (ecma_string_t *string1_p, /**< first ecma-string */
839839
* @return concatenation of an ecma-string and a magic string
840840
*/
841841
ecma_string_t *
842-
ecma_append_magic_string_to_string (ecma_string_t *string1_p,
843-
lit_magic_string_id_t string2_id)
842+
ecma_append_magic_string_to_string (ecma_string_t *string1_p, /**< string descriptor */
843+
lit_magic_string_id_t string2_id) /**< magic string ID */
844844
{
845845
if (JERRY_UNLIKELY (ecma_string_is_empty (string1_p)))
846846
{
@@ -953,6 +953,8 @@ ecma_deref_ecma_string (ecma_string_t *string_p) /**< ecma-string */
953953

954954
/**
955955
* Convert ecma-string to number
956+
*
957+
* @return converted ecma-number
956958
*/
957959
ecma_number_t
958960
ecma_string_to_number (const ecma_string_t *string_p) /**< ecma-string */
@@ -1560,7 +1562,11 @@ ecma_string_is_length (const ecma_string_t *string_p) /**< property name */
15601562
return ecma_compare_ecma_string_to_magic_id (string_p, LIT_MAGIC_STRING_LENGTH);
15611563
} /* ecma_string_is_length */
15621564

1563-
1565+
/**
1566+
* Converts a property name into a string
1567+
*
1568+
* @return pointer to the converted ecma string
1569+
*/
15641570
static inline ecma_string_t * JERRY_ATTR_ALWAYS_INLINE
15651571
ecma_property_to_string (ecma_property_t property, /**< property name type */
15661572
jmem_cpointer_t prop_name_cp) /**< property name compressed pointer */
@@ -1914,7 +1920,7 @@ ecma_compare_ecma_strings_relational (const ecma_string_t *string1_p, /**< ecma-
19141920
utf8_string2_size);
19151921
} /* ecma_compare_ecma_strings_relational */
19161922

1917-
/*
1923+
/**
19181924
* Special value to represent that no size is available.
19191925
*/
19201926
#define ECMA_STRING_NO_ASCII_SIZE 0xffff

0 commit comments

Comments
 (0)