зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1383157 - change pn_type to a ParseNodeKind; r=jimb
MozReview-Commit-ID: 3woMGwYs3wY --HG-- extra : rebase_source : 5bd7fc25a4cbfbc288ce19650831b484757689ed
This commit is contained in:
Родитель
6201ca9f26
Коммит
adb3d74ff5
|
@ -179,7 +179,7 @@ class ObjectBox;
|
|||
*
|
||||
* The long comment after this enum block describes the kinds in detail.
|
||||
*/
|
||||
enum ParseNodeKind
|
||||
enum ParseNodeKind : uint16_t
|
||||
{
|
||||
#define EMIT_ENUM(name) PNK_##name,
|
||||
FOR_EACH_PARSE_NODE_KIND(EMIT_ENUM)
|
||||
|
@ -450,7 +450,11 @@ class PropertyAccess;
|
|||
|
||||
class ParseNode
|
||||
{
|
||||
uint16_t pn_type; /* PNK_* type */
|
||||
ParseNodeKind pn_type; /* PNK_* type */
|
||||
// pn_op and pn_arity are not declared as the correct enum types
|
||||
// due to difficulties with MS bitfield layout rules and a GCC
|
||||
// bug. See https://bugzilla.mozilla.org/show_bug.cgi?id=1383157#c4 for
|
||||
// details.
|
||||
uint8_t pn_op; /* see JSOp enum and jsopcode.tbl */
|
||||
uint8_t pn_arity:4; /* see ParseNodeArity enum */
|
||||
bool pn_parens:1; /* this expr was enclosed in parens */
|
||||
|
@ -494,7 +498,7 @@ class ParseNode
|
|||
|
||||
ParseNodeKind getKind() const {
|
||||
MOZ_ASSERT(pn_type < PNK_LIMIT);
|
||||
return ParseNodeKind(pn_type);
|
||||
return pn_type;
|
||||
}
|
||||
void setKind(ParseNodeKind kind) {
|
||||
MOZ_ASSERT(kind < PNK_LIMIT);
|
||||
|
|
Загрузка…
Ссылка в новой задаче