Bug 1518711 - Rename BigInt's ParseNodeKind to match the declaration from bug 1513040. r=jorendorff

Differential Revision: https://phabricator.services.mozilla.com/D16008

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Robin Templeton 2019-01-09 19:14:40 +00:00
parent b16b2cbba6
commit 9b7ceac572
5 changed files with 11 additions and 11 deletions

View File

@ -3126,7 +3126,7 @@ bool ASTSerializer::literal(ParseNode* pn, MutableHandleValue dst) {
break;
#ifdef ENABLE_BIGINT
case ParseNodeKind::BigInt: {
case ParseNodeKind::BigIntExpr: {
BigInt* x = pn->as<BigIntLiteral>().box()->value();
cx->check(x);
val.setBigInt(x);

View File

@ -967,7 +967,7 @@ restart:
return true;
#ifdef ENABLE_BIGINT
case ParseNodeKind::BigInt:
case ParseNodeKind::BigIntExpr:
MOZ_ASSERT(pn->is<BigIntLiteral>());
*answer = false;
return true;
@ -4242,7 +4242,7 @@ bool ParseNode::getConstantValue(JSContext* cx,
vp.setNumber(as<NumericLiteral>().value());
return true;
#ifdef ENABLE_BIGINT
case ParseNodeKind::BigInt:
case ParseNodeKind::BigIntExpr:
vp.setBigInt(as<BigIntLiteral>().box()->value());
return true;
#endif
@ -9167,7 +9167,7 @@ bool BytecodeEmitter::emitTree(
break;
#ifdef ENABLE_BIGINT
case ParseNodeKind::BigInt:
case ParseNodeKind::BigIntExpr:
if (!emitBigIntOp(pn->as<BigIntLiteral>().box()->value())) {
return false;
}

View File

@ -386,7 +386,7 @@ restart:
case ParseNodeKind::Elision:
case ParseNodeKind::NumberExpr:
#ifdef ENABLE_BIGINT
case ParseNodeKind::BigInt:
case ParseNodeKind::BigIntExpr:
#endif
case ParseNodeKind::NewExpr:
case ParseNodeKind::Generator:
@ -468,7 +468,7 @@ static bool IsEffectless(ParseNode* node) {
node->isKind(ParseNodeKind::TemplateStringExpr) ||
node->isKind(ParseNodeKind::NumberExpr) ||
#ifdef ENABLE_BIGINT
node->isKind(ParseNodeKind::BigInt) ||
node->isKind(ParseNodeKind::BigIntExpr) ||
#endif
node->isKind(ParseNodeKind::NullExpr) ||
node->isKind(ParseNodeKind::RawUndefinedExpr) ||
@ -486,7 +486,7 @@ static Truthiness Boolish(ParseNode* pn) {
: Falsy;
#ifdef ENABLE_BIGINT
case ParseNodeKind::BigInt:
case ParseNodeKind::BigIntExpr:
return (pn->as<BigIntLiteral>().box()->value()->toBoolean()) ? Truthy
: Falsy;
#endif
@ -562,7 +562,7 @@ static bool FoldTypeOfExpr(JSContext* cx, UnaryNode* node) {
result = cx->names().number;
}
#ifdef ENABLE_BIGINT
else if (expr->isKind(ParseNodeKind::BigInt)) {
else if (expr->isKind(ParseNodeKind::BigIntExpr)) {
result = cx->names().bigint;
}
#endif

View File

@ -468,7 +468,7 @@ class NameResolver {
break;
#ifdef ENABLE_BIGINT
case ParseNodeKind::BigInt:
case ParseNodeKind::BigIntExpr:
MOZ_ASSERT(cur->is<BigIntLiteral>());
break;
#endif

View File

@ -1545,12 +1545,12 @@ class NumericLiteral : public ParseNode {
class BigIntLiteral : public ParseNode {
public:
BigIntLiteral(BigIntBox* bibox, const TokenPos& pos)
: ParseNode(ParseNodeKind::BigInt, JSOP_NOP, pos) {
: ParseNode(ParseNodeKind::BigIntExpr, JSOP_NOP, pos) {
pn_u.bigint.box = bibox;
}
static bool test(const ParseNode& node) {
bool match = node.isKind(ParseNodeKind::BigInt);
bool match = node.isKind(ParseNodeKind::BigIntExpr);
MOZ_ASSERT_IF(match, node.isArity(PN_BIGINT));
return match;
}