Bug 1130811 - Remove the unused foldConstants bool from both ParseHandler classes. r=luke

This commit is contained in:
Jeff Walden 2015-02-10 00:58:49 -08:00
parent 362fa06d06
commit 5ae497f5e9
5 changed files with 8 additions and 12 deletions

View File

@ -27,7 +27,6 @@ class FullParseHandler
{
ParseNodeAllocator allocator;
TokenStream &tokenStream;
bool foldConstants;
ParseNode *allocParseNode(size_t size) {
MOZ_ASSERT(size == sizeof(ParseNode));
@ -71,11 +70,10 @@ class FullParseHandler
typedef Definition *DefinitionNode;
FullParseHandler(ExclusiveContext *cx, LifoAlloc &alloc,
TokenStream &tokenStream, bool foldConstants,
Parser<SyntaxParseHandler> *syntaxParser, LazyScript *lazyOuterFunction)
TokenStream &tokenStream, Parser<SyntaxParseHandler> *syntaxParser,
LazyScript *lazyOuterFunction)
: allocator(cx, alloc),
tokenStream(tokenStream),
foldConstants(foldConstants),
lazyOuterFunction_(lazyOuterFunction),
lazyInnerFunctionIndex(0),
syntaxParser(syntaxParser)
@ -220,7 +218,7 @@ class FullParseHandler
ParseNode *appendOrCreateList(ParseNodeKind kind, ParseNode *left, ParseNode *right,
ParseContext<FullParseHandler> *pc, JSOp op = JSOP_NOP)
{
return ParseNode::appendOrCreateList(kind, op, left, right, this, pc, foldConstants);
return ParseNode::appendOrCreateList(kind, op, left, right, this, pc);
}
ParseNode *newTernary(ParseNodeKind kind,

View File

@ -246,8 +246,7 @@ ParseNodeAllocator::allocNode()
ParseNode *
ParseNode::appendOrCreateList(ParseNodeKind kind, JSOp op, ParseNode *left, ParseNode *right,
FullParseHandler *handler, ParseContext<FullParseHandler> *pc,
bool foldConstants)
FullParseHandler *handler, ParseContext<FullParseHandler> *pc)
{
// The asm.js specification is written in ECMAScript grammar terms that
// specify *only* a binary tree. It's a royal pain to implement the asm.js

View File

@ -651,8 +651,7 @@ class ParseNode
*/
static ParseNode *
appendOrCreateList(ParseNodeKind kind, JSOp op, ParseNode *left, ParseNode *right,
FullParseHandler *handler, ParseContext<FullParseHandler> *pc,
bool foldConstants);
FullParseHandler *handler, ParseContext<FullParseHandler> *pc);
inline PropertyName *name() const;
inline JSAtom *atom() const;

View File

@ -516,7 +516,7 @@ Parser<ParseHandler>::Parser(ExclusiveContext *cx, LifoAlloc *alloc,
sawDeprecatedExpressionClosure(false),
sawDeprecatedLetBlock(false),
sawDeprecatedLetExpression(false),
handler(cx, *alloc, tokenStream, foldConstants, syntaxParser, lazyOuterFunction)
handler(cx, *alloc, tokenStream, syntaxParser, lazyOuterFunction)
{
{
AutoLockForExclusiveAccess lock(cx);

View File

@ -97,8 +97,8 @@ class SyntaxParseHandler
public:
SyntaxParseHandler(ExclusiveContext *cx, LifoAlloc &alloc,
TokenStream &tokenStream, bool foldConstants,
Parser<SyntaxParseHandler> *syntaxParser, LazyScript *lazyOuterFunction)
TokenStream &tokenStream, Parser<SyntaxParseHandler> *syntaxParser,
LazyScript *lazyOuterFunction)
: lastAtom(nullptr),
tokenStream(tokenStream)
{}