Skip to content

Commit 4f14877

Browse files
committed
Fix FILE_PATTERNS of Doxyfile and some of the issues it was hiding
`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 29f6ffc commit 4f14877

File tree

12 files changed

+183
-53
lines changed

12 files changed

+183
-53
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: 51 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ typedef int32_t ecma_integer_value_t;
142142
*/
143143
#define ECMA_DIRECT_SHIFT 4
144144

145-
/* ECMA make simple value */
145+
/** ECMA make simple value */
146146
#define ECMA_MAKE_VALUE(value) \
147147
((((ecma_value_t) (value)) << ECMA_DIRECT_SHIFT) | ECMA_DIRECT_TYPE_SIMPLE_VALUE)
148148

@@ -171,25 +171,43 @@ enum
171171
* a special "base" value for vm */
172172
};
173173

174+
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32
174175
/**
175176
* Maximum integer number for an ecma value
176177
*/
177-
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32
178178
#define ECMA_INTEGER_NUMBER_MAX 0x7fffff
179+
/**
180+
* Maximum integer number for an ecma value (shifted left with ECMA_DIRECT_SHIFT)
181+
*/
179182
#define ECMA_INTEGER_NUMBER_MAX_SHIFTED 0x7fffff0
180183
#else /* CONFIG_ECMA_NUMBER_TYPE != CONFIG_ECMA_NUMBER_FLOAT32 */
184+
/**
185+
* Maximum integer number for an ecma value
186+
*/
181187
#define ECMA_INTEGER_NUMBER_MAX 0x7ffffff
188+
/**
189+
* Maximum integer number for an ecma value (shifted left with ECMA_DIRECT_SHIFT)
190+
*/
182191
#define ECMA_INTEGER_NUMBER_MAX_SHIFTED 0x7ffffff0
183192
#endif /* CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32 */
184193

194+
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32
185195
/**
186196
* Minimum integer number for an ecma value
187197
*/
188-
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32
189198
#define ECMA_INTEGER_NUMBER_MIN -0x7fffff
199+
/**
200+
* Minimum integer number for an ecma value (shifted left with ECMA_DIRECT_SHIFT)
201+
*/
190202
#define ECMA_INTEGER_NUMBER_MIN_SHIFTED -0x7fffff0
191203
#else /* CONFIG_ECMA_NUMBER_TYPE != CONFIG_ECMA_NUMBER_FLOAT32 */
204+
/**
205+
* Minimum integer number for an ecma value
206+
*/
192207
#define ECMA_INTEGER_NUMBER_MIN -0x8000000
208+
/**
209+
* Minimum integer number for an ecma value (shifted left with ECMA_DIRECT_SHIFT)
210+
*/
193211
#define ECMA_INTEGER_NUMBER_MIN_SHIFTED (-0x7fffffff - 1) /* -0x80000000 */
194212
#endif /* CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32 */
195213

@@ -708,33 +726,33 @@ typedef struct
708726
{
709727
ecma_object_t object; /**< object header */
710728

711-
/*
712-
* Description of extra fields. These extra fields depends on the object type.
729+
/**
730+
* Description of extra fields. These extra fields depend on the object type.
713731
*/
714732
union
715733
{
716734
ecma_built_in_props_t built_in; /**< built-in object part */
717735

718-
/*
736+
/**
719737
* Description of objects with class.
720738
*/
721739
struct
722740
{
723741
uint16_t class_id; /**< class id of the object */
724742
uint16_t extra_info; /**< extra information for the object
725-
e.g. array buffer type info (external/internal) */
743+
* e.g. array buffer type info (external/internal) */
726744

727-
/*
728-
* Description of extra fields. These extra fields depends on the class_id.
745+
/**
746+
* Description of extra fields. These extra fields depend on the class_id.
729747
*/
730748
union
731749
{
732750
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) */
751+
uint32_t length; /**< length related property (e.g. length of ArrayBuffer) */
734752
} u;
735753
} class_prop;
736754

737-
/*
755+
/**
738756
* Description of function objects.
739757
*/
740758
struct
@@ -743,7 +761,7 @@ typedef struct
743761
ecma_value_t bytecode_cp; /**< function byte code */
744762
} function;
745763

746-
/*
764+
/**
747765
* Description of array objects.
748766
*/
749767
struct
@@ -752,14 +770,14 @@ typedef struct
752770
ecma_property_t length_prop; /**< length property */
753771
} array;
754772

755-
/*
773+
/**
756774
* Description of pseudo array objects.
757775
*/
758776
struct
759777
{
760778
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 */
779+
uint8_t extra_info; /**< extra information about the object.
780+
* e.g. element_width_shift for typed arrays */
763781
union
764782
{
765783
uint16_t length; /**< for arguments: length of names */
@@ -772,7 +790,7 @@ typedef struct
772790
} u2;
773791
} pseudo_array;
774792

775-
/*
793+
/**
776794
* Description of bound function object.
777795
*/
778796
struct
@@ -802,10 +820,10 @@ typedef struct
802820
uint16_t size; /**< real size >> JMEM_ALIGNMENT_LOG */
803821
uint16_t refs; /**< reference counter for the byte code */
804822
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... */
823+
* CBC_CODE_FLAGS_FUNCTION flag tells whether
824+
* the byte code is function or regular expression.
825+
* If function, the other flags must be CBC_CODE_FLAGS...
826+
* If regexp, the other flags must be RE_FLAG... */
809827
} ecma_compiled_code_t;
810828

811829
#ifdef JERRY_ENABLE_SNAPSHOT_EXEC
@@ -902,6 +920,7 @@ typedef struct
902920
* Description of an ecma-number
903921
*/
904922
typedef float ecma_number_t;
923+
905924
#define DOUBLE_TO_ECMA_NUMBER_T(value) (ecma_number_t) (value)
906925

907926
/**
@@ -937,6 +956,7 @@ typedef float ecma_number_t;
937956
* Description of an ecma-number
938957
*/
939958
typedef double ecma_number_t;
959+
940960
#define DOUBLE_TO_ECMA_NUMBER_T(value) value
941961

942962
/**
@@ -994,21 +1014,28 @@ typedef double ecma_number_t;
9941014
*/
9951015
#define ECMA_NUMBER_MINUS_ONE ((ecma_number_t) -1)
9961016

1017+
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32
9971018
/**
998-
* Minimum positive and maximum value of ecma-number
1019+
* Number.MIN_VALUE (i.e., the smallest positive value of ecma-number)
1020+
*
1021+
* See also: ECMA_262 v5, 15.7.3.3
9991022
*/
1000-
#if CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT32
10011023
# define ECMA_NUMBER_MIN_VALUE (FLT_MIN)
1024+
/**
1025+
* Number.MAX_VALUE (i.e., the maximum value of ecma-number)
1026+
*
1027+
* See also: ECMA_262 v5, 15.7.3.2
1028+
*/
10021029
# define ECMA_NUMBER_MAX_VALUE (FLT_MAX)
10031030
#elif CONFIG_ECMA_NUMBER_TYPE == CONFIG_ECMA_NUMBER_FLOAT64
10041031
/**
1005-
* Number.MAX_VALUE
1032+
* Number.MAX_VALUE (i.e., the maximum value of ecma-number)
10061033
*
10071034
* See also: ECMA_262 v5, 15.7.3.2
10081035
*/
10091036
# define ECMA_NUMBER_MAX_VALUE ((ecma_number_t) 1.7976931348623157e+308)
10101037
/**
1011-
* Number.MIN_VALUE
1038+
* Number.MIN_VALUE (i.e., the smallest positive value of ecma-number)
10121039
*
10131040
* See also: ECMA_262 v5, 15.7.3.3
10141041
*/

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)