Skip to content

Commit 79d1a3c

Browse files
akosthekissyichoi
authored andcommitted
Fix FILE_PATTERNS of Doxyfile and some of the issues it was hiding (#2446)
`FILE_PATTERNS` is a space-separated list, in contrary to what is suggested by its documentation. The pattern `*.h, *.c` does not match header files but files with `.h,` extension only. Rewriting the current comma-separated pattern makes Doxygen actually process header files. However, it also reveals several hitherto hidden issues (mostly missing documentation) in the code. This patch fixes some of these documentation problems (and lists the files with outstanding issues in a 'backlog'). JerryScript-DCO-1.0-Signed-off-by: Akos Kiss [email protected]
1 parent 29e7330 commit 79d1a3c

File tree

12 files changed

+181
-57
lines changed

12 files changed

+181
-57
lines changed

Doxyfile

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ INPUT_ENCODING = UTF-8
778778
# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
779779
# *.qsf, *.as and *.js.
780780

781-
FILE_PATTERNS = *.h, *.c
781+
FILE_PATTERNS = *.h *.c
782782

783783
# The RECURSIVE tag can be used to specify whether or not subdirectories should
784784
# be searched for input files as well.
@@ -793,7 +793,21 @@ RECURSIVE = YES
793793
# Note that relative paths are relative to the directory from which doxygen is
794794
# run.
795795

796-
EXCLUDE =
796+
# FIXME: None of these files are excluded light-heartedly. They should be
797+
# removed one-by-one and warnings reported by doxygen should be fixed by those
798+
# who are familiar with the undocumented parts.
799+
EXCLUDE = \
800+
jerry-core/ecma/base/ecma-globals.h \
801+
jerry-core/ecma/base/ecma-helpers.h \
802+
jerry-core/ecma/operations/ecma-exceptions.h \
803+
jerry-core/include/jerryscript-debugger-transport.h \
804+
jerry-core/jcontext/jcontext.h \
805+
jerry-core/parser/js/byte-code.h \
806+
jerry-core/parser/js/common.h \
807+
jerry-core/parser/js/js-lexer.h \
808+
jerry-core/parser/js/js-parser-internal.h \
809+
jerry-core/parser/regexp/re-parser.h \
810+
jerry-core/vm/vm-stack.h
797811

798812
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
799813
# directories that are symbolic links (a Unix file system feature) are excluded
@@ -809,7 +823,7 @@ EXCLUDE_SYMLINKS = NO
809823
# Note that the wildcards are matched against the file with absolute path, so to
810824
# exclude all test directories for example use the pattern */test/*
811825

812-
EXCLUDE_PATTERNS =
826+
EXCLUDE_PATTERNS = *.inc.h
813827

814828
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
815829
# (namespaces, classes, functions, etc.) that should be excluded from the
@@ -2000,7 +2014,7 @@ INCLUDE_FILE_PATTERNS =
20002014
# recursively expanded use the := operator instead of the = operator.
20012015
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
20022016

2003-
PREDEFINED = JERRY_STATIC_ASSERT(x,y)=
2017+
PREDEFINED = JERRY_STATIC_ASSERT(x,y)= JERRY_ATTR_FORMAT(x,y,z)=
20042018

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

jerry-core/ecma/base/ecma-globals.h

Lines changed: 53 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ typedef int32_t ecma_integer_value_t;
142142
*/
143143
#define ECMA_DIRECT_SHIFT 4
144144

145-
/* ECMA make simple value */
145+
/**
146+
* ECMA make simple value
147+
*/
146148
#define ECMA_MAKE_VALUE(value) \
147149
((((ecma_value_t) (value)) << ECMA_DIRECT_SHIFT) | ECMA_DIRECT_TYPE_SIMPLE_VALUE)
148150

@@ -171,25 +173,43 @@ enum
171173
* a special "base" value for vm */
172174
};
173175

176+
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32
174177
/**
175178
* Maximum integer number for an ecma value
176179
*/
177-
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32
178180
#define ECMA_INTEGER_NUMBER_MAX 0x7fffff
181+
/**
182+
* Maximum integer number for an ecma value (shifted left with ECMA_DIRECT_SHIFT)
183+
*/
179184
#define ECMA_INTEGER_NUMBER_MAX_SHIFTED 0x7fffff0
180185
#else /* CONFIG_ECMA_NUMBER_TYPE != CONFIG_ECMA_NUMBER_FLOAT32 */
186+
/**
187+
* Maximum integer number for an ecma value
188+
*/
181189
#define ECMA_INTEGER_NUMBER_MAX 0x7ffffff
190+
/**
191+
* Maximum integer number for an ecma value (shifted left with ECMA_DIRECT_SHIFT)
192+
*/
182193
#define ECMA_INTEGER_NUMBER_MAX_SHIFTED 0x7ffffff0
183194
#endif /* CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32 */
184195

196+
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32
185197
/**
186198
* Minimum integer number for an ecma value
187199
*/
188-
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32
189200
#define ECMA_INTEGER_NUMBER_MIN -0x7fffff
201+
/**
202+
* Minimum integer number for an ecma value (shifted left with ECMA_DIRECT_SHIFT)
203+
*/
190204
#define ECMA_INTEGER_NUMBER_MIN_SHIFTED -0x7fffff0
191205
#else /* CONFIG_ECMA_NUMBER_TYPE != CONFIG_ECMA_NUMBER_FLOAT32 */
206+
/**
207+
* Minimum integer number for an ecma value
208+
*/
192209
#define ECMA_INTEGER_NUMBER_MIN -0x8000000
210+
/**
211+
* Minimum integer number for an ecma value (shifted left with ECMA_DIRECT_SHIFT)
212+
*/
193213
#define ECMA_INTEGER_NUMBER_MIN_SHIFTED (-0x7fffffff - 1) /* -0x80000000 */
194214
#endif /* CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32 */
195215

@@ -708,33 +728,33 @@ typedef struct
708728
{
709729
ecma_object_t object; /**< object header */
710730

711-
/*
712-
* Description of extra fields. These extra fields depends on the object type.
731+
/**
732+
* Description of extra fields. These extra fields depend on the object type.
713733
*/
714734
union
715735
{
716736
ecma_built_in_props_t built_in; /**< built-in object part */
717737

718-
/*
738+
/**
719739
* Description of objects with class.
720740
*/
721741
struct
722742
{
723743
uint16_t class_id; /**< class id of the object */
724744
uint16_t extra_info; /**< extra information for the object
725-
e.g. array buffer type info (external/internal) */
745+
* e.g. array buffer type info (external/internal) */
726746

727-
/*
728-
* Description of extra fields. These extra fields depends on the class_id.
747+
/**
748+
* Description of extra fields. These extra fields depend on the class_id.
729749
*/
730750
union
731751
{
732752
ecma_value_t value; /**< value of the object (e.g. boolean, number, string, etc.) */
733-
uint32_t length; /**< length related property (e.g. length of ArrayBuffer) */
753+
uint32_t length; /**< length related property (e.g. length of ArrayBuffer) */
734754
} u;
735755
} class_prop;
736756

737-
/*
757+
/**
738758
* Description of function objects.
739759
*/
740760
struct
@@ -743,7 +763,7 @@ typedef struct
743763
ecma_value_t bytecode_cp; /**< function byte code */
744764
} function;
745765

746-
/*
766+
/**
747767
* Description of array objects.
748768
*/
749769
struct
@@ -752,14 +772,14 @@ typedef struct
752772
ecma_property_t length_prop; /**< length property */
753773
} array;
754774

755-
/*
775+
/**
756776
* Description of pseudo array objects.
757777
*/
758778
struct
759779
{
760780
uint8_t type; /**< pseudo array type, e.g. Arguments, TypedArray*/
761-
uint8_t extra_info; /**< extra infomations about the object.
762-
* e.g. element_width_shift for typed arrays */
781+
uint8_t extra_info; /**< extra information about the object.
782+
* e.g. element_width_shift for typed arrays */
763783
union
764784
{
765785
uint16_t length; /**< for arguments: length of names */
@@ -772,7 +792,7 @@ typedef struct
772792
} u2;
773793
} pseudo_array;
774794

775-
/*
795+
/**
776796
* Description of bound function object.
777797
*/
778798
struct
@@ -802,10 +822,10 @@ typedef struct
802822
uint16_t size; /**< real size >> JMEM_ALIGNMENT_LOG */
803823
uint16_t refs; /**< reference counter for the byte code */
804824
uint16_t status_flags; /**< various status flags:
805-
* CBC_CODE_FLAGS_FUNCTION flag tells whether
806-
* the byte code is function or regular expression.
807-
* If function, the other flags must be CBC_CODE_FLAGS...
808-
* If regexp, the other flags must be RE_FLAG... */
825+
* CBC_CODE_FLAGS_FUNCTION flag tells whether
826+
* the byte code is function or regular expression.
827+
* If function, the other flags must be CBC_CODE_FLAGS...
828+
* If regexp, the other flags must be RE_FLAG... */
809829
} ecma_compiled_code_t;
810830

811831
#ifdef JERRY_ENABLE_SNAPSHOT_EXEC
@@ -902,6 +922,7 @@ typedef struct
902922
* Description of an ecma-number
903923
*/
904924
typedef float ecma_number_t;
925+
905926
#define DOUBLE_TO_ECMA_NUMBER_T(value) (ecma_number_t) (value)
906927

907928
/**
@@ -937,6 +958,7 @@ typedef float ecma_number_t;
937958
* Description of an ecma-number
938959
*/
939960
typedef double ecma_number_t;
961+
940962
#define DOUBLE_TO_ECMA_NUMBER_T(value) value
941963

942964
/**
@@ -994,21 +1016,28 @@ typedef double ecma_number_t;
9941016
*/
9951017
#define ECMA_NUMBER_MINUS_ONE ((ecma_number_t) -1)
9961018

1019+
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32
9971020
/**
998-
* Minimum positive and maximum value of ecma-number
1021+
* Number.MIN_VALUE (i.e., the smallest positive value of ecma-number)
1022+
*
1023+
* See also: ECMA_262 v5, 15.7.3.3
9991024
*/
1000-
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32
10011025
# define ECMA_NUMBER_MIN_VALUE (FLT_MIN)
1026+
/**
1027+
* Number.MAX_VALUE (i.e., the maximum value of ecma-number)
1028+
*
1029+
* See also: ECMA_262 v5, 15.7.3.2
1030+
*/
10021031
# define ECMA_NUMBER_MAX_VALUE (FLT_MAX)
10031032
#elif CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64
10041033
/**
1005-
* Number.MAX_VALUE
1034+
* Number.MAX_VALUE (i.e., the maximum value of ecma-number)
10061035
*
10071036
* See also: ECMA_262 v5, 15.7.3.2
10081037
*/
10091038
# define ECMA_NUMBER_MAX_VALUE ((ecma_number_t) 1.7976931348623157e+308)
10101039
/**
1011-
* Number.MIN_VALUE
1040+
* Number.MIN_VALUE (i.e., the smallest positive value of ecma-number)
10121041
*
10131042
* See also: ECMA_262 v5, 15.7.3.3
10141043
*/

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ typedef ecma_value_t (*ecma_builtin_dispatch_call_t)(const ecma_value_t argument
5656
*/
5757
static const ecma_builtin_dispatch_routine_t ecma_builtin_routines[] =
5858
{
59+
/** @cond doxygen_suppress */
5960
#define BUILTIN(a, b, c, d, e)
6061
#define BUILTIN_ROUTINE(builtin_id, \
6162
object_type, \
@@ -76,13 +77,15 @@ static const ecma_builtin_dispatch_routine_t ecma_builtin_routines[] =
7677
#include "ecma-builtins.inc.h"
7778
#undef BUILTIN
7879
#undef BUILTIN_ROUTINE
80+
/** @endcond */
7981
};
8082

8183
/**
8284
* List of the built-in call functions.
8385
*/
8486
static const ecma_builtin_dispatch_call_t ecma_builtin_call_functions[] =
8587
{
88+
/** @cond doxygen_suppress */
8689
#define BUILTIN(a, b, c, d, e)
8790
#define BUILTIN_ROUTINE(builtin_id, \
8891
object_type, \
@@ -93,13 +96,15 @@ static const ecma_builtin_dispatch_call_t ecma_builtin_call_functions[] =
9396
#include "ecma-builtins.inc.h"
9497
#undef BUILTIN_ROUTINE
9598
#undef BUILTIN
99+
/** @endcond */
96100
};
97101

98102
/**
99103
* List of the built-in construct functions.
100104
*/
101105
static const ecma_builtin_dispatch_call_t ecma_builtin_construct_functions[] =
102106
{
107+
/** @cond doxygen_suppress */
103108
#define BUILTIN(a, b, c, d, e)
104109
#define BUILTIN_ROUTINE(builtin_id, \
105110
object_type, \
@@ -110,13 +115,15 @@ static const ecma_builtin_dispatch_call_t ecma_builtin_construct_functions[] =
110115
#include "ecma-builtins.inc.h"
111116
#undef BUILTIN_ROUTINE
112117
#undef BUILTIN
118+
/** @endcond */
113119
};
114120

115121
/**
116122
* Property descriptor lists for all built-ins.
117123
*/
118124
static const ecma_builtin_property_list_reference_t ecma_builtin_property_list_references[] =
119125
{
126+
/** @cond doxygen_suppress */
120127
#define BUILTIN(a, b, c, d, e)
121128
#define BUILTIN_ROUTINE(builtin_id, \
122129
object_type, \
@@ -137,6 +144,7 @@ static const ecma_builtin_property_list_reference_t ecma_builtin_property_list_r
137144
#include "ecma-builtins.inc.h"
138145
#undef BUILTIN_ROUTINE
139146
#undef BUILTIN
147+
/** @endcond */
140148
};
141149

142150
/**
@@ -435,6 +443,7 @@ ecma_instantiate_builtin (ecma_builtin_id_t id) /**< built-in id */
435443
JERRY_ASSERT (id < ECMA_BUILTIN_ID__COUNT);
436444
switch (id)
437445
{
446+
/** @cond doxygen_suppress */
438447
#define BUILTIN(builtin_id, \
439448
object_type, \
440449
object_prototype_builtin_id, \
@@ -452,6 +461,7 @@ ecma_instantiate_builtin (ecma_builtin_id_t id) /**< built-in id */
452461
#include "ecma-builtins.inc.h"
453462
#undef BUILTIN
454463
#undef BUILTIN_ROUTINE
464+
/** @endcond */
455465
default:
456466
{
457467
JERRY_UNREACHABLE (); /* The built-in is not implemented. */

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
*/
2424
typedef enum
2525
{
26+
/** @cond doxygen_suppress */
2627
#define BUILTIN(a, b, c, d, e)
2728
#define BUILTIN_ROUTINE(builtin_id, \
2829
object_type, \
@@ -43,6 +44,7 @@ typedef enum
4344
#include "ecma-builtins.inc.h"
4445
#undef BUILTIN
4546
#undef BUILTIN_ROUTINE
47+
/** @endcond */
4648
ECMA_BUILTIN_ID__COUNT /**< number of built-in objects */
4749
} ecma_builtin_id_t;
4850

jerry-core/ecma/builtin-objects/typedarray/ecma-builtin-typedarray-helpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
/** \addtogroup ecma ECMA
2323
* @{
2424
*
25-
* \addtogroup ecmabuiltinhelpers ECMA TypedArray helper operations
25+
* \addtogroup ecmabuiltinhelpers ECMA builtin helper operations
2626
* @{
2727
*/
2828

0 commit comments

Comments
 (0)