From 9b7ceac572582fc1a569f2524ea67a286a503070 Mon Sep 17 00:00:00 2001 From: Robin Templeton Date: Wed, 9 Jan 2019 19:14:40 +0000 Subject: [PATCH] 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 --- js/src/builtin/ReflectParse.cpp | 2 +- js/src/frontend/BytecodeEmitter.cpp | 6 +++--- js/src/frontend/FoldConstants.cpp | 8 ++++---- js/src/frontend/NameFunctions.cpp | 2 +- js/src/frontend/ParseNode.h | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/js/src/builtin/ReflectParse.cpp b/js/src/builtin/ReflectParse.cpp index 1838caffbd90..f6683153910d 100644 --- a/js/src/builtin/ReflectParse.cpp +++ b/js/src/builtin/ReflectParse.cpp @@ -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().box()->value(); cx->check(x); val.setBigInt(x); diff --git a/js/src/frontend/BytecodeEmitter.cpp b/js/src/frontend/BytecodeEmitter.cpp index 840c5ea997e1..d55f5758f074 100644 --- a/js/src/frontend/BytecodeEmitter.cpp +++ b/js/src/frontend/BytecodeEmitter.cpp @@ -967,7 +967,7 @@ restart: return true; #ifdef ENABLE_BIGINT - case ParseNodeKind::BigInt: + case ParseNodeKind::BigIntExpr: MOZ_ASSERT(pn->is()); *answer = false; return true; @@ -4242,7 +4242,7 @@ bool ParseNode::getConstantValue(JSContext* cx, vp.setNumber(as().value()); return true; #ifdef ENABLE_BIGINT - case ParseNodeKind::BigInt: + case ParseNodeKind::BigIntExpr: vp.setBigInt(as().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().box()->value())) { return false; } diff --git a/js/src/frontend/FoldConstants.cpp b/js/src/frontend/FoldConstants.cpp index 6fa4c01d28c3..da711ce385bc 100644 --- a/js/src/frontend/FoldConstants.cpp +++ b/js/src/frontend/FoldConstants.cpp @@ -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().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 diff --git a/js/src/frontend/NameFunctions.cpp b/js/src/frontend/NameFunctions.cpp index 311c18ed00b2..972795d32800 100644 --- a/js/src/frontend/NameFunctions.cpp +++ b/js/src/frontend/NameFunctions.cpp @@ -468,7 +468,7 @@ class NameResolver { break; #ifdef ENABLE_BIGINT - case ParseNodeKind::BigInt: + case ParseNodeKind::BigIntExpr: MOZ_ASSERT(cur->is()); break; #endif diff --git a/js/src/frontend/ParseNode.h b/js/src/frontend/ParseNode.h index 5decc3fa1b0f..0162eb52583e 100644 --- a/js/src/frontend/ParseNode.h +++ b/js/src/frontend/ParseNode.h @@ -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; }