Convert SN_MAKE_TERMINATOR and SN_IS_TERMINATOR to inline functions to avoid clang+ccache warnings about over-parenthesized equality expressions. No bug, rs=terrence

--HG--
extra : rebase_source : 50b8f70501a481a4dda715284ccd9a21bbfa0eb6
This commit is contained in:
Jeff Walden 2013-07-15 15:26:04 -07:00
Родитель 8bad2a44e0
Коммит 997a76eb45
1 изменённых файлов: 13 добавлений и 4 удалений

Просмотреть файл

@ -81,6 +81,19 @@ enum SrcNoteType {
SRC_XDELTA = 24 /* 24-31 are for extended delta notes */
};
/* A source note array is terminated by an all-zero element. */
inline void
SN_MAKE_TERMINATOR(jssrcnote *sn)
{
*sn = SRC_NULL;
}
inline bool
SN_IS_TERMINATOR(jssrcnote *sn)
{
return *sn == SRC_NULL;
}
} // namespace js
#define SN_TYPE_BITS 5
@ -141,10 +154,6 @@ enum SrcNoteType {
: js_SrcNoteLength(sn))
#define SN_NEXT(sn) ((sn) + SN_LENGTH(sn))
/* A source note array is terminated by an all-zero element. */
#define SN_MAKE_TERMINATOR(sn) (*(sn) = SRC_NULL)
#define SN_IS_TERMINATOR(sn) (*(sn) == SRC_NULL)
struct JSSrcNoteSpec {
const char *name; /* name for disassembly/debugging output */
int8_t arity; /* number of offset operands */